<< Back to previous view

[QB-2845] Variable not being resolved in Perforce repository
Created: 16/Nov/16  Updated: 13/Jan/17

Status: Resolved
Project: QuickBuild
Component/s: None
Affects Version/s: 6.1.31
Fix Version/s: 6.1.36, 7.0.0

Type: Bug Priority: Major
Reporter: David Keane Assigned To: Robin Shen
Resolution: Fixed Votes: 0
Remaining Estimate: Unknown Time Spent: Unknown
Original Estimate: Unknown
Environment: RHEL


 Description   
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'.

 Comments   
Comment by Robin Shen [ 17/Nov/16 12:48 AM ]
Is this error happening all the time since then?
Comment by 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'...
Comment by 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.
Comment by 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.
Generated at Tue May 21 03:18:50 UTC 2024 using JIRA 189.