In my blog I am set on a mission to describe cases of severe code or environment dysfunction which wasn’t documented on forums and took me quite a while to figure out. The following case falls into the above category. I am working on integrating Jenkins as our CI environment and we use Perforce as source control. At first I have set up Windows node and utilized P4 plugin to manage the workspace and the update process. This went relatively smoothly. However, when I tried to set up Ubuntu node, I got a not-so-informative error:
Building remotely on GW Builder 1 in workspace /jenkins/workspace/CI
Using remote perforce client: buildbot_builder-hz-1_ci-1763989916
[CI] $ p4 workspace -o buildbot_builder-hz-1_ci-1763989916
Caught exception communicating with perforce. No output for: p4 workspace -o buildbot_builder-hz-1_ci-1763989916 com.tek42.perforce.PerforceException: No output for: p4 workspace -o buildbot_builder-hz-1_ci-1763989916
at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:408)
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:1641)
at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1602)
at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:907)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1270)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531)
at hudson.model.Run.execute(Run.java:1741)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:374)
ERROR: Unable to communicate with perforce. No output for: p4 workspace -o buildbot_builder-hz-1_ci-1763989916
Warning: you have no plugins providing access control for builds, so falling back to legacy behavior of permitting any downstream builds to be triggered
Finished: FAILURE
All forum posts mentioning this exception are dated 2011 or older. To make a long story short, after several hours of desperation, I went over node VM settings and notice scarce RAM settings (512 MB). After I boosted it to 2 GB, the problem disappeared.