History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-2845
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Robin Shen
Reporter: David Keane
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Variable not being resolved in Perforce repository

Created: 16/Nov/16 02:31 PM   Updated: 13/Jan/17 02:02 PM
Component/s: None
Affects Version/s: 6.1.31
Fix Version/s: 6.1.36, 7.0.0

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: RHEL


 Description  « Hide
Builds where working fine ( 11 successful builds) and then suddenly the variable used in the "User Name" of the Perforce repository was not being resolved resulting in the exception below

ccess for user '${vars.getValue("p4RepoUser")}' has not been enabled by 'p4 protect'.
14:07:16,287 ERROR - Error pumping stream.
    com.pmease.quickbuild.QuickbuildException: Failed to run command: p4 -p perforce.lavastorm.com:1666 -u ${vars.getValue("p4RepoUser")} login -p
    Command return code: 1
    Command error output: Access for user '${vars.getValue("p4RepoUser")}' has not been enabled by 'p4 protect'.

 All   Comments   Work Log   Change History      Sort Order:
Robin Shen [17/Nov/16 12:48 AM]
Is this error happening all the time since then?

David Keane [29/Nov/16 10:27 AM]
This was happening consistently. I finally hardcoded the user instead of using a variable. I switched this back again to use the variable at the end of last week and build started to work fine again but today I received the same error

10:23:11,024 ERROR - Access for user '${vars.getValue("p4RepoUser")}' has not been enabled by 'p4 protect'.
10:23:11,024 ERROR - Error pumping stream.
    com.pmease.quickbuild.QuickbuildException: Failed to run command: p4 -p perforce.lavastorm.com:1666 -u ${vars.getValue("p4RepoUser")} login -p
    Command return code: 1
    Command error output: Access for user '${vars.getValue("p4RepoUser")}' has not been enabled by 'p4 protect'.
        at com.pmease.quickbuild.execution.Commandline$ExecuteResult.buildException(Commandline.java:491)
        at com.pmease.quickbuild.execution.Commandline$ExecuteResult.checkReturnCode(Commandline.java:506)
        at com.pmease.quickbuild.plugin.scm.perforce.PerforceRepository.getTicket(PerforceRepository.java:1326)
        at com.pmease.quickbuild.plugin.scm.perforce.PerforceRepository$$EnhancerByCGLIB$$232806b1.CGLIB$getTicket$29(<generated>)
        at com.pmease.quickbuild.plugin.scm.perforce.PerforceRepository$$EnhancerByCGLIB$$232806b1$$FastClassByCGLIB$$e595285f.invoke(<generated>)
        at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:215)
        at com.pmease.quickbuild.DefaultScriptEngine$Interpolator.intercept(DefaultScriptEngine.java:261)
        at com.pmease.quickbuild.plugin.scm.perforce.PerforceRepository$$EnhancerByCGLIB$$232806b1.getTicket(<generated>)
        at com.pmease.quickbuild.plugin.scm.perforce.PerforceRepository$3.mask(PerforceRepository.java:435)
        at com.pmease.quickbuild.execution.Commandline$1.consume(Commandline.java:335)
        at com.pmease.quickbuild.execution.LineConsumer.processBuffer(LineConsumer.java:86)
        at com.pmease.quickbuild.execution.LineConsumer.write(LineConsumer.java:73)
        at java.io.OutputStream.write(OutputStream.java:116)
        at com.pmease.quickbuild.execution.ProcessStreamPumper$1.run(ProcessStreamPumper.java:91)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
10:23:11,125 ERROR - Access for user '${vars.getValue("p4RepoUser")}' has not been enabled by 'p4 protect'.
10:23:11,143 INFO - Getting changes of 'LavastormPerforceBostonLAESrc' since ***** '3.0.3.772'...

Robin Shen [30/Nov/16 12:40 AM]
Can you please send your database backup to [robin AT pmease DOT com] for diagnostics? Also please let me know the configuration in question.

Robin Shen [07/Dec/16 01:33 AM]
Turns out that the user name and password is not interpolated when it tries to get the ticket for replacing in log message. This normally happens when a different perforce repository other than the repository being used for checkout is used to calculate the next version number.