java.lang.InterruptedException: P4: Unable to setup workspace: com.perforce.p4java.exception.AccessException: Perforce password (P4PASSWD) invalid or unset.

Jenkins JIRA | Russ Tremain | 2 years ago
  1. 0

    Experiencing some weird behavior re: tickets and p4 jenkins plugin. BEFORE: {noformat} [~jenkins] root# rm .p4tickets [~jenkins] root# ls -al {noformat} NOW GO TO JENKINS, and test password credential AFTER: {noformat} [~jenkins] root# ls -al total 8 drwxr-xr-x+ 4 jenkins staff 136 Mar 10 15:55 ./ drwxr-xr-x 9 root admin 306 Mar 10 15:31 ../ -r-------- 1 root staff 68 Mar 10 15:55 .p4tickets {noformat} So the act of testing the password credential adds a ticket file. Next, I remove .p4tickets and test my ticketed credential. Does not create {{.p4tickets}} and test succeeds. Now I go to a job that depends on ticketed credential I just tested, and run it. Job fails with: {noformat} SEVERE: P4: Unable to use Workspace: com.perforce.p4java.exception.AccessException: Perforce password (P4PASSWD) invalid or unset. com.perforce.p4java.exception.AccessException: Perforce password (P4PASSWD) invalid or unset. at com.perforce.p4java.impl.mapbased.server.Server.handleErrorStr(Server.java:4987) at com.perforce.p4java.impl.mapbased.server.Server.getClient(Server.java:2433) at org.jenkinsci.plugins.p4.client.ClientHelper.clientLogin(ClientHelper.java:69) at org.jenkinsci.plugins.p4.client.ClientHelper.<init>(ClientHelper.java:63) at org.jenkinsci.plugins.p4.tasks.AbstractTask.getConnection(AbstractTask.java:78) at org.jenkinsci.plugins.p4.tasks.AbstractTask.setWorkspace(AbstractTask.java:50) at org.jenkinsci.plugins.p4.PerforceScm.checkout(PerforceScm.java:278) at hudson.model.AbstractProject.checkout(AbstractProject.java:1252) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:615) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:524) at hudson.model.Run.execute(Run.java:1706) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:232) Mar 10, 2015 4:02:07 PM org.jenkinsci.plugins.p4.tasks.AbstractTask setWorkspace SEVERE: P4: Unable to setup workspace: com.perforce.p4java.exception.AccessException: Perforce password (P4PASSWD) invalid or unset. Mar 10, 2015 4:02:07 PM hudson.model.Run execute INFO: p4ws-main_build_linux-x64 #5 aborted java.lang.InterruptedException: P4: Unable to setup workspace: com.perforce.p4java.exception.AccessException: Perforce password (P4PASSWD) invalid or unset. at org.jenkinsci.plugins.p4.tasks.AbstractTask.setWorkspace(AbstractTask.java:63) at org.jenkinsci.plugins.p4.PerforceScm.checkout(PerforceScm.java:278) at hudson.model.AbstractProject.checkout(AbstractProject.java:1252) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:615) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:524) at hudson.model.Run.execute(Run.java:1706) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:232) {noformat} Finally, I go back and test the password version, which recreates .p4tickets. Now I use my ticketed credential and it works. Long story short, {{$P4TICKETS}} has to exist before you can use a ticket. That is unexpected and does not conform to normal p4 command-line behavior, e.g: {noformat} $ p4 -p perforce:1666 -P <TICKET-STRING> -u <PERFORCE-USER> login -s User <PERFORCE-USER> ticket expires in 200403 hours 47 minutes. {noformat} This works with or without {{$P4TICKETS}} file, and does not create it.

    Jenkins JIRA | 2 years ago | Russ Tremain
    java.lang.InterruptedException: P4: Unable to setup workspace: com.perforce.p4java.exception.AccessException: Perforce password (P4PASSWD) invalid or unset.
  2. 0

    Experiencing some weird behavior re: tickets and p4 jenkins plugin. BEFORE: {noformat} [~jenkins] root# rm .p4tickets [~jenkins] root# ls -al {noformat} NOW GO TO JENKINS, and test password credential AFTER: {noformat} [~jenkins] root# ls -al total 8 drwxr-xr-x+ 4 jenkins staff 136 Mar 10 15:55 ./ drwxr-xr-x 9 root admin 306 Mar 10 15:31 ../ -r-------- 1 root staff 68 Mar 10 15:55 .p4tickets {noformat} So the act of testing the password credential adds a ticket file. Next, I remove .p4tickets and test my ticketed credential. Does not create {{.p4tickets}} and test succeeds. Now I go to a job that depends on ticketed credential I just tested, and run it. Job fails with: {noformat} SEVERE: P4: Unable to use Workspace: com.perforce.p4java.exception.AccessException: Perforce password (P4PASSWD) invalid or unset. com.perforce.p4java.exception.AccessException: Perforce password (P4PASSWD) invalid or unset. at com.perforce.p4java.impl.mapbased.server.Server.handleErrorStr(Server.java:4987) at com.perforce.p4java.impl.mapbased.server.Server.getClient(Server.java:2433) at org.jenkinsci.plugins.p4.client.ClientHelper.clientLogin(ClientHelper.java:69) at org.jenkinsci.plugins.p4.client.ClientHelper.<init>(ClientHelper.java:63) at org.jenkinsci.plugins.p4.tasks.AbstractTask.getConnection(AbstractTask.java:78) at org.jenkinsci.plugins.p4.tasks.AbstractTask.setWorkspace(AbstractTask.java:50) at org.jenkinsci.plugins.p4.PerforceScm.checkout(PerforceScm.java:278) at hudson.model.AbstractProject.checkout(AbstractProject.java:1252) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:615) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:524) at hudson.model.Run.execute(Run.java:1706) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:232) Mar 10, 2015 4:02:07 PM org.jenkinsci.plugins.p4.tasks.AbstractTask setWorkspace SEVERE: P4: Unable to setup workspace: com.perforce.p4java.exception.AccessException: Perforce password (P4PASSWD) invalid or unset. Mar 10, 2015 4:02:07 PM hudson.model.Run execute INFO: p4ws-main_build_linux-x64 #5 aborted java.lang.InterruptedException: P4: Unable to setup workspace: com.perforce.p4java.exception.AccessException: Perforce password (P4PASSWD) invalid or unset. at org.jenkinsci.plugins.p4.tasks.AbstractTask.setWorkspace(AbstractTask.java:63) at org.jenkinsci.plugins.p4.PerforceScm.checkout(PerforceScm.java:278) at hudson.model.AbstractProject.checkout(AbstractProject.java:1252) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:615) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:524) at hudson.model.Run.execute(Run.java:1706) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:232) {noformat} Finally, I go back and test the password version, which recreates .p4tickets. Now I use my ticketed credential and it works. Long story short, {{$P4TICKETS}} has to exist before you can use a ticket. That is unexpected and does not conform to normal p4 command-line behavior, e.g: {noformat} $ p4 -p perforce:1666 -P <TICKET-STRING> -u <PERFORCE-USER> login -s User <PERFORCE-USER> ticket expires in 200403 hours 47 minutes. {noformat} This works with or without {{$P4TICKETS}} file, and does not create it.

    Jenkins JIRA | 2 years ago | Russ Tremain
    java.lang.InterruptedException: P4: Unable to setup workspace: com.perforce.p4java.exception.AccessException: Perforce password (P4PASSWD) invalid or unset.
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    I have configured a global Perforce Ticket Credential with a hard coded Ticket value (tried using P4TICKETS, but was unable to test the connection successfully). I am able to successfully test the connection from the credential configuration page, but when I select the credentials for a project, perforce polling fails with the following error: Perforce Software Polling Log Started on Apr 15, 2015 6:10:00 PM Polling SCM changes on master P4: Polling on: master with:nance-cmtest-prod-jenkins FATAL: SCM polling aborted java.lang.InterruptedException: P4: Unable to setup workspace: com.perforce.p4java.exception.AccessException: Perforce password (P4PASSWD) invalid or unset. at org.jenkinsci.plugins.p4.tasks.AbstractTask.setWorkspace(AbstractTask.java:63) at org.jenkinsci.plugins.p4.PerforceScm.pollWorkspace(PerforceScm.java:223) at org.jenkinsci.plugins.p4.PerforceScm.compareRemoteRevisionWith(PerforceScm.java:179) at hudson.scm.SCM.compareRemoteRevisionWith(SCM.java:380) at hudson.scm.SCM.poll(SCM.java:397) at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1467) at hudson.model.AbstractProject._poll(AbstractProject.java:1438) at hudson.model.AbstractProject.poll(AbstractProject.java:1349) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:510) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:539) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) 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) Done. Took 35 ms No changes I wouldn't expect for it to be trying to use P4PASSWD, and am wondering if this is a misconfiguration or if something is broken.

    Jenkins JIRA | 2 years ago | Greg Nance
    java.lang.InterruptedException: P4: Unable to setup workspace: com.perforce.p4java.exception.AccessException: Perforce password (P4PASSWD) invalid or unset.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.InterruptedException

      P4: Unable to setup workspace: com.perforce.p4java.exception.AccessException: Perforce password (P4PASSWD) invalid or unset.

      at org.jenkinsci.plugins.p4.tasks.AbstractTask.setWorkspace()
    2. org.jenkinsci.plugins
      PerforceScm.checkout
      1. org.jenkinsci.plugins.p4.tasks.AbstractTask.setWorkspace(AbstractTask.java:63)
      2. org.jenkinsci.plugins.p4.PerforceScm.checkout(PerforceScm.java:278)
      2 frames
    3. Hudson
      AbstractBuild$AbstractBuildExecution.defaultCheckout
      1. hudson.model.AbstractProject.checkout(AbstractProject.java:1252)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:615)
      2 frames
    4. jenkins.scm
      SCMCheckoutStrategy.checkout
      1. jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      1 frame
    5. Hudson
      Executor.run
      1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:524)
      2. hudson.model.Run.execute(Run.java:1706)
      3. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      4. hudson.model.ResourceController.execute(ResourceController.java:88)
      5. hudson.model.Executor.run(Executor.java:232)
      5 frames