Rob Langley commented on Bug JENKINS-24467

So I've done a little more investigation, it would appear the git ls-remote command is being run on the Debian master rather than the windows slave. To ascertain this I renamed every git.exe on the windows machine which made no difference, after reverting them I did the same to /usr/bin/git which resulted in the following error:

Started on 28-Aug-2014 10:17:24
Polling SCM changes on XXX
Using strategy: Default
[poll] Last Built Revision: Revision 131f327074161ac81f7dc523363ec08841739669 (origin/master)
 > git ls-remote -h git@XXX:XXX/XXX.git master # timeout=10
FATAL: hudson.plugins.git.GitException: Error performing command: git ls-remote -h git@XXX:XXX/XXX.git master
hudson.util.IOException2: hudson.plugins.git.GitException: Error performing command: git ls-remote -h g...@github.bromium.net:rob-langley/glowing-octo-dangerzone.git master
	at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:462)
	at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:357)
	at hudson.scm.SCM.poll(SCM.java:374)
	at org.jenkinsci.plugins.multiplescms.MultiSCM.compareRemoteRevisionWith(MultiSCM.java:92)
	at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:357)
	at hudson.scm.SCM.poll(SCM.java:374)
	at hudson.model.AbstractProject.pollWithWorkspace(AbstractProject.java:1449)
	at hudson.model.AbstractProject._poll(AbstractProject.java:1420)
	at hudson.model.AbstractProject.poll(AbstractProject.java:1331)
	at com.cloudbees.jenkins.GitHubPushTrigger$1.runPolling(GitHubPushTrigger.java:73)
	at com.cloudbees.jenkins.GitHubPushTrigger$1.run(GitHubPushTrigger.java:98)
	at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	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:724)
Caused by: hudson.plugins.git.GitException: Error performing command: git ls-remote -h git@XXX:XXX/XXX.git master
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1414)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1195)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1119)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1110)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:2004)
	at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:495)
	at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:460)
	... 18 more
Caused by: java.io.IOException: Cannot run program "git": error=2, No such file or directory
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
	at hudson.Proc$LocalProc.<init>(Proc.java:244)
	at hudson.Proc$LocalProc.<init>(Proc.java:216)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:780)
	at hudson.Launcher$ProcStarter.start(Launcher.java:360)
	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1403)
	... 24 more
Caused by: java.io.IOException: error=2, No such file or directory
	at java.lang.UNIXProcess.forkAndExec(Native Method)
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:135)
	at java.lang.ProcessImpl.start(ProcessImpl.java:130)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
	... 29 more
Done. Took 16 ms
No changes

Following up from this I swapped /usr/bin/git for a shell script that echo'ed the path and got:

C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell 1.0\;C:\Program Files (x86)\Git in;C:\Program Files (x86)\Java\jre7 in

Which is completely wrong for a Debian box, I think the polling is picking up the path from the last build job then either incorrectly trying to use it on the Debian box or incorrectly running the polling on the Debian box. I imagine it's probably the former.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to