$P4PORTcom.tek42.perforce.PerforceException: Connect to server failed; check $P4PORT

Jenkins JIRA | Omar Ahmad | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    This is similar to JENKINS-5661 which was set to Resolve as it could not be re-produced. I have created a slave which is activated on the same machine as the master instance of Jenkins, and I also have slaves which reside on other machines. When running a job on the slave which is on the same machine as the master instance of Jenkins, I get the error below, however this error does not occur when running the same job with the same configuration on a slave node which does not run on the same machine as the Jenkins master instance. Also, this was working for me before, however I recently upgraded Jenkins and all plugins. Caught exception communicating with perforce. Connect to server failed; check $P4PORTcom.tek42.perforce.PerforceException: Connect to server failed; check $P4PORT at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:406) at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:301) at com.tek42.perforce.parse.Workspaces.getWorkspace(Workspaces.java:61) at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1615) at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1576) at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:892) at hudson.model.AbstractProject.checkout(AbstractProject.java:1414) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:671) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:580) at hudson.model.Run.execute(Run.java:1684) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) ERROR: Unable to communicate with perforce. Connect to server failed; check $P4PORT

    Jenkins JIRA | 3 years ago | Omar Ahmad
    $P4PORTcom.tek42.perforce.PerforceException: Connect to server failed; check $P4PORT
  2. 0

    This is similar to JENKINS-5661 which was set to Resolve as it could not be re-produced. I have created a slave which is activated on the same machine as the master instance of Jenkins, and I also have slaves which reside on other machines. When running a job on the slave which is on the same machine as the master instance of Jenkins, I get the error below, however this error does not occur when running the same job with the same configuration on a slave node which does not run on the same machine as the Jenkins master instance. Also, this was working for me before, however I recently upgraded Jenkins and all plugins. Caught exception communicating with perforce. Connect to server failed; check $P4PORTcom.tek42.perforce.PerforceException: Connect to server failed; check $P4PORT at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:406) at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:301) at com.tek42.perforce.parse.Workspaces.getWorkspace(Workspaces.java:61) at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1615) at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1576) at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:892) at hudson.model.AbstractProject.checkout(AbstractProject.java:1414) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:671) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:580) at hudson.model.Run.execute(Run.java:1684) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) ERROR: Unable to communicate with perforce. Connect to server failed; check $P4PORT

    Jenkins JIRA | 3 years ago | Omar Ahmad
    $P4PORTcom.tek42.perforce.PerforceException: Connect to server failed; check $P4PORT
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Trying to set up jenkins with perforce plugin: unable to check workspace against depot

    Stack Overflow | 3 years ago | Brian
    $P4PORTcom.tek42.perforce.PerforceException: Connect to server failed; check $P4PORT

    1 unregistered visitors
    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. $P4PORTcom.tek42.perforce.PerforceException

      Connect to server failed; check $P4PORT

      at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse()
    2. com.tek42.perforce
      Workspaces.getWorkspace
      1. com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:406)
      2. com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:301)
      3. com.tek42.perforce.parse.Workspaces.getWorkspace(Workspaces.java:61)
      3 frames
    3. hudson.plugins.perforce
      PerforceSCM.checkout
      1. hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1615)
      2. hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1576)
      3. hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:892)
      3 frames
    4. Hudson
      AbstractBuild$AbstractBuildExecution.defaultCheckout
      1. hudson.model.AbstractProject.checkout(AbstractProject.java:1414)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:671)
      2 frames
    5. jenkins.scm
      SCMCheckoutStrategy.checkout
      1. jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
      1 frame
    6. Hudson
      Run.execute
      1. hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:580)
      2. hudson.model.Run.execute(Run.java:1684)
      2 frames
    7. Hudson Maven Embedder
      MavenModuleSetBuild.run
      1. hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
      1 frame
    8. Hudson
      Executor.run
      1. hudson.model.ResourceController.execute(ResourceController.java:88)
      2. hudson.model.Executor.run(Executor.java:231)
      2 frames