-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Windows 2008R2 Slave.
We've been trying to configure a Windows 2008R2 slave (our first slave with this OS) to run a job that is already known to run successfully on other Windows XP and 2003 machines. We know that the plugin runs fine on a Windows 2008 master.
We have confirmed that Perforce has been installed successfully by running all the equivalent commands from the command line and have checked and double checked the configuration and executable locations.
We suspect that the problem is associated with the fact that with Windows 2008 the command line syntax has become far more strict and that the Perforce plugin uses different code paths to build the command line and execute the perforce process. On the master the plugin uses the Launcher classes to run the Perforce binary but on the slave it appears to use CmdLineExecutor class.
The following exception is seen in the logs:
[TEST_util] $ C:\PROGRA~1\Perforce\p4.exe workspace -o hudson_1_glp_4.0_utility_test-3510769
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:381)
at com.tek42.perforce.parse.AbstractPerforceTemplate.getPerforceResponse(AbstractPerforceTemplate.java:291)
at com.tek42.perforce.parse.Workspaces.getWorkspace(Workspaces.java:53)
at hudson.plugins.perforce.PerforceSCM.getPerforceWorkspace(PerforceSCM.java:1183)
at hudson.plugins.perforce.PerforceSCM.checkout(PerforceSCM.java:574)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1180)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:506)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:422)
at hudson.model.Run.run(Run.java:1362)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:145)
- is duplicated by
-
JENKINS-9695 Perforce Plugin running on a Windows 2008R2 slave fails to poll or check out.
-
- Resolved
-
I can probably shed some light on this for you.
Basically when it runs
c:\\Users\\nbem3al\\p4-catch.bat workspace -o jenkins-AO_SISO_AT-smoketest-CIT1-1858902131
It doesn't return any error message that the plugin knows about, so it proceeds as if nothing is wrong. This should throw some kind of parsing error early on, but I guess it's not robust enough. From there it 'changes' the client view from nothing (since nothing intelligible was returned) to the new view. The batch script just eats it, and the plugin continues on happily.
The Last build changeset is from the previous successful build (I guess you had it on a different slave before) so it's not actually getting it from perforce.
It's not until it tries to parse the output of the counter command that it fails. There's a check in there to make sure the result is in fact a number. In this case, the batch script was returning "Access is denied." because of the illegal file write.
So you aren't actually getting any further, the plugin just doesn't know to look for that kind of error.
So back to the issue at hand.
If the environment variables are being set correctly, but the connection is still failing that can really only mean one thing. Windows is likely blocking connections from child processes. That would explain why it works by hand, but not through the slave agent.
This really wouldn't surprise me, because I think you need to add it as an exception to the windows firewall for outgoing connections. It might be working on my test machine because I'm using the Administrator account with the firewall disabled. Tomorrow I'll try to see if I can replicate the results by re-enabling the firewall and running the slave as a general user.