Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

How to debug p4 client error? #3902

prgross ·

We have a configuration we use to test out new build servers. We target the steps to a new machine and run a number of builds to check the environment. This has worked fine for 6+ months.

Last week, we started getting a Perforce error from the p4 client command that QB executes and the build won't run. Happens on all machines.

The message from Perforce is:
Failed to run command: p4 -p server:1666 -u user -P **** -c qb-mach-998 client -i
Command return code: 1
Command error output: Error in client specification
Error detected at lien 10.
Stream '//Streams/' is not the correct format of '//depotname/string'

Nothing has changed in the configuration.

Note: the QB Repository uses a variable "stream" that is appended to '//Streams/' to identify the stream. This value appears not to be passed in. This is the same setup (and repository) we use for all our production builds, which are still working fine.

  • I'm looking for suggestions on how to debug this, since everything takes place internal to QB. Log messages are in the system log and are sparse and unhelpful.
  • solved #9
  • replies 8
  • views 1804
  • stars 1
robinshen ADMIN ·

You may print the variable value at appropriate places to debug such problem:
groovy:
logger.info("stream: " + vars.getValue("stream"));

prgross ·

The error occurs while checking the build condition, so the build doesn't ever start. The error message appears in a red box on the configuration overview page.

Where would be the appropriate place to put the groovy script, since none of the steps get executed?

robinshen ADMIN ·

You may put it in snapshot taking script in advanced setting of the configuration.

prgross ·

The error goes away when I make the debugging script the Snapshot taking script. It shows the variable is set. I believe it also means the configuration doesn't take a snapshot.

When I put the debugging script as a Pre-Queue Script, I see the variable is set, but the failure comes back (apparently while taking a snapshot).

I changed the Repository to have a constant value for the stream (//Streams/Mainline) rather than use the variable, and I still see the same error for the snapshot, where it only shows "//Streams/", having lost the "Mainline" portion.

So, the problem looks to be with the Snapshot Taking - how can I get some insight on what's going awry? (The steps, repositories, and variables and other settings are almost all inherited from parent configurations, and are working fine for all our production builds.)

robinshen ADMIN ·

Can you please send the database backup to [robin AT pmease DOT com] and let me know the configuration in problem?

prgross ·

I'm still waiting for permission. Is there anything I can look for in the dump, or other things I can check in the meantime?

robinshen ADMIN ·

There are too many reasons causing such issue considering QB's scripting ability. Or can you reproduce this issue with a sample database for a brand new QB set up? You can then send the sample database to me.

prgross ·

I determined the problem. The configuration's steps changed when inherited steps were modified, and this added a second perforce repository. That one also uses a (different) variable to define the stream, and the variable wasn't set. I didn't realize that was a new reference (and it was down near the end of the configuration), and the error message didn't mention the new variable, instead using "stream" (this may be a generic usage rather than a variable name - we just happened to call our variable "stream" for the first repository.

So, problem is solved.