[JIRA] [git] (JENKINS-20512) Git Plugin 2.0: Failure on Git Polling Log when using option "Branches to build" on Git Plugin for Jenkins

96 views
Skip to first unread message

peleg@hp.com (JIRA)

unread,
Nov 11, 2013, 7:21:57 AM11/11/13
to jenkinsc...@googlegroups.com
Change By: Ronen Peleg (11/Nov/13 12:20 PM)
Environment: Jenkins version 1.509.4 on Windows 2008 R2 
Slave is running on Windows Server 2008 R2
Jenkins GIT plugin v2.0
Jenkins GIT client plugin v1.4.6
GIT Client for Windows v1.8
.4 (preview20130916)
Description: Hi,

I am experiencing a problem on the GIT polling and here are the details: 

When the option "Branches to build" on GIT Plugin for Jenkins is "blank" or "**" the GIT polling working just fine but when I entered "master" or "origin/master" or other to option "Branches to build" the GIT polling crashes with the following error (see also
 snapshot  snapshots ):

Started on Nov 11, 2013 1:15:13 PM
Using strategy: Default
[poll] Last Built Revision: Revision 1d530845b2467e9e342fbf19e101c1291e1458a9 (origin/master)
FATAL: Error performing command: ls-remote -h ssh://g...@mymachine0005.us.mycompany.com:7999/LT/ltpc.git master
hudson.util.IOException2: Error performing command: ls-remote -h ssh://g...@mymachine0005.us.mycompany.com:7999/LT/ltpc.git master
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:458)
at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:356)
at hudson.scm.SCM.poll(SCM.java:373)
at hudson.model.AbstractProject._poll(AbstractProject.java:1530)
at hudson.model.AbstractProject.poll(AbstractProject.java:1455)
at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:439)
at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:468)
at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: hudson.plugins.git.GitException: Error performing command: ls-remote -h ssh://g...@mymachine0005.us.mycompany.com:7999/LT/ltpc.git master
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:988)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:920)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:1297)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:488)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:456)
... 13 more
Caused by: java.io.IOException: Cannot run program "git.exe": CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:773)
at hudson.Launcher$ProcStarter.start(Launcher.java:353)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:977)
... 17 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 23 more
Done. Took 0.37 sec
No changes

Any Idea?

Thank You for your support,
Ronen.
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

peleg@hp.com (JIRA)

unread,
Nov 11, 2013, 6:40:57 AM11/11/13
to jenkinsc...@googlegroups.com
Change By: Ronen Peleg (11/Nov/13 11:40 AM)
Summary:
Git Plugin 2.0: Failure on Git Polling Log when using option "Branches to build" on Git Plugin for Jenkins
Environment: Jenkins version 1.509.4 on Windows 2008 R2
Slave is running on Windows Server 2008 R2
Jenkins GIT plugin v2.0
Jenkins GIT client plugin v1.4.6
GIT Client for Windows v1.8

peleg@hp.com (JIRA)

unread,
Nov 11, 2013, 6:32:57 AM11/11/13
to jenkinsc...@googlegroups.com
Issue Type: Bug Bug
Assignee: Sega
Attachments: gitpollingissue.JPG, gitpollingok.JPG
Components: git
Created: 11/Nov/13 11:32 AM
Description:

Hi,

I am experiencing a problem on the GIT polling and here are the details:

When the option "Branches to build" on GIT Plugin for Jenkins is "blank" or "**" the GIT polling working just fine but when I entered "master" or "origin/master" or other to option "Branches to build" the GIT polling crashes with the following error (see also snapshot):

Due Date: 11/Nov/13 12:00 AM
Environment:
Jenkins version 1.509.4 on Windows 2008 R2
Jenkins GIT plugin v2.0
Jenkins GIT client plugin v1.4.6
GIT Client for Windows v1.8
Project: Jenkins
Labels: polling scm git,
Priority: Critical Critical
Reporter: Sega

cdoucette@everyscape.com (JIRA)

unread,
Nov 20, 2013, 1:51:57 PM11/20/13
to jenkinsc...@googlegroups.com

I've experienced this problem in a different way. Our jenkins installation (master node) is on a Windows machine. We also have a mac mini running a slave node. There are two installations of git that are configured - one is for "Windows" and the other is for "Mac". We must define which installation of git to use for each job - or the wrong one is used and the git commands fail. We also do SCM polling. With Git plugin 1.5, git polling on the Windows machine works fine. With Git plugin 2.0, it attempts to use the Mac installation of git on Windows to do the polling, and the polling fails.

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 5, 2014, 9:30:38 AM2/5/14
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-20512

I agree with Charles' observation. If the plugin cannot find Git, then it cannot perform its work. You can either configure the location of Git for the slave as needed, or configure the slave, or consider adding "jgit" as a Git implementation on your master configuration, then define the job to use jgit rather than command line git.

The JGit implementation is not as full featured as the command line git implementation, so there are use cases which it does not meet. You could attempt it and see if it meets your needs.

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 5, 2014, 9:28:38 PM2/5/14
to jenkinsc...@googlegroups.com
Mark Waite resolved Bug JENKINS-20512 as Not A Defect

If git is not configured in the Jenkins configuration, then the plugin cannot use the git executable and cannot perform any operations.

Change By: Mark Waite (06/Feb/14 2:28 AM)
Status: Open Resolved
Resolution: Not A Defect

maglovato@gmail.com (JIRA)

unread,
Jul 3, 2014, 3:20:05 PM7/3/14
to jenkinsc...@googlegroups.com

I am facing this problem. BUT git is properly configured. My system is Master on Linux, one slave is also Linux, and other is Windows. The problem is only related to the Windows Slave. It works nicely, till the problem happens. The only way to fix it is restarting Jenkins. Its a real problem, and affecting my teamwork. People ask me why the build was not triggered, and I then ask them to commit something else, after I quickly reboot Jenkins.

The error I get:

Git Polling Log

Started on Jul 3, 2014 3:10:24 PM
Using strategy: Default
[poll] Last Built Revision: Revision 8ae038f280a0faa58243ec1df7af64d961a951c8 (origin/master)
using GIT_SSH to set credentials
> C:\git\cmd\git.exe ls-remote -h git@gitlab:group/repo.git master
FATAL: hudson.plugins.git.GitException: Error performing command: C:\git\cmd\git.exe ls-remote -h git@gitlab:group/repo.git master
hudson.util.IOException2: hudson.plugins.git.GitException: Error performing command: C:\git\cmd\git.exe ls-remote -h git@gitlab:group/repo.git master
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:459)


at hudson.scm.SCM._compareRemoteRevisionWith(SCM.java:356)
at hudson.scm.SCM.poll(SCM.java:373)

at hudson.model.AbstractProject._poll(AbstractProject.java:1584)
at hudson.model.AbstractProject.poll(AbstractProject.java:1493)
at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:462)
at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:491)
at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118)
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:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)
Caused by: hudson.plugins.git.GitException: Error performing command: C:\git\cmd\git.exe ls-remote -h git@gitlab:group/repo.git master
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1332)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1186)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1110)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1101)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getHeadRev(CliGitAPIImpl.java:1788)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWithImpl(GitSCM.java:492)
at hudson.plugins.git.GitSCM.compareRemoteRevisionWith(GitSCM.java:457)
... 13 more
Caused by: java.io.IOException: Cannot run program "C:\git\cmd\git.exe": java.io.IOException: error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:488)


at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:773)
at hudson.Launcher$ProcStarter.start(Launcher.java:353)

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1321)
... 19 more
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)
at java.lang.ProcessImpl.start(ProcessImpl.java:81)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:470)
... 24 more
Done. Took 68 ms
No changes

I know, it looks like git.exe is not there. But it is, really is. After restarting Jenkins, this happens (on another repo I was able to see the same error, and not I can push something).

Started on Jul 3, 2014 4:04:40 PM
Polling SCM changes on WINMACHINE
Using strategy: Default
[poll] Last Built Revision: Revision 62e80167e7067ede25727c3cb96885551694c860 (origin/master)
> C:\git\cmd\git.exe rev-parse --is-inside-work-tree
Fetching changes from the remote Git repositories
> C:\git\cmd\git.exe config remote.origin.url git@gitlab:tools/repo.git
Fetching upstream changes from git@gitlab:tools/repo.git
> C:\git\cmd\git.exe --version
using GIT_SSH to set credentials
> C:\git\cmd\git.exe fetch --tags --progress git@gitlab:tools/repo.git +refs/heads/:refs/remotes/origin/
Polling for changes in
Seen branch in repository origin/master
Seen 1 remote branch
> C:\git\cmd\git.exe log --full-history --no-abbrev --format=raw -M -m --raw 62e80167e7067ede25727c3cb96885551694c860..bb82f97faa7e27ba53c600050c8bef66df7fe5d0
Done. Took 18 sec
Changes found

Interesting is that now, right below the date, it says:
"Polling SCM changes on WINMACHINE"
This was not available on previous information...
It cannot be trying to go to the wrong machine... or "no-machine"? Its odd...

And I am using "branches to build" = */master

Lovato

maglovato@gmail.com (JIRA)

unread,
Jul 3, 2014, 3:20:05 PM7/3/14
to jenkinsc...@googlegroups.com

I am reopening it since I am facing this, and the only fix I can do is rebooting Jenkins. Then everything starts to work again, for a while.

Looks like a defect.

Best
Lovato

Change By: Marco Lovato (03/Jul/14 7:18 PM)
Resolution: Not A Defect
Status: Resolved Reopened

maglovato@gmail.com (JIRA)

unread,
Jul 7, 2014, 8:45:04 AM7/7/14
to jenkinsc...@googlegroups.com

at java.lang.UNIXProcess.<init>(UNIXProcess.java:164)

Why I got an UNUXProcess error, if I am running it on a WinMachine? Does it make sense?

Lovato

mark.earl.waite@gmail.com (JIRA)

unread,
Jul 7, 2014, 9:00:04 AM7/7/14
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-20512

Marco Lovato I can't duplicate your bug report. The conditions you describe for your bug report seem quite different from the conditions on this bug report. This bug report failed consistently, while you said "the only fix I can do is rebooting Jenkins". I don't think reopening this bug report with an entirely new set of symptoms is the best way to handle the bug. Could you submit a new bug report rather than combining your very different set of symptoms with this bug report?

When you submit the new bug report, could you also include information with the bug report confirming you've taken steps like the following:

  • Check the git installation on the master node
    • Define a job
    • Restrict the job to execute on the master node
    • Add the additional behaviour to force polling using workspace
    • Run "git --version" as a build step
    • Configure polling with some interval and verify it polls as expected
  • Check the git installation on the Linux slave
    • Define a job
    • Restrict the job to execute on the Linux slave
    • Add the additional behaviour to force polling using workspace
    • Run "git --version" as a build step
    • Configure polling with some interval and verify it polls as expected
  • Check the git installation on the windows slave
    • Define a job
    • Restrict the job to execute on the windows slave
    • Add the additional behaviour to force polling using workspace
    • Run "git --version" as a build step
    • Configure polling with some interval and verify it polls as expected

That output will help confirm that the git configuration in Jenkins is correct and that Jenkins can find git on the master and on each slave node when it starts.

maglovato@gmail.com (JIRA)

unread,
Jul 10, 2014, 9:37:03 AM7/10/14
to jenkinsc...@googlegroups.com

jglick@cloudbees.com (JIRA)

unread,
Aug 28, 2014, 11:02:10 AM8/28/14
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Oct 11, 2014, 10:44:21 PM10/11/14
to jenkinsc...@googlegroups.com

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 13, 2015, 7:58:32 AM2/13/15
to jenkinsc...@googlegroups.com
Mark Waite resolved Bug JENKINS-20512 as Fixed

Fixed earlier, then reopened by Marco Lovato with a different bug. Closing it again

Change By: Mark Waite (13/Feb/15 12:56 PM)
Status: Open Resolved
Resolution: Fixed

mark.earl.waite@gmail.com (JIRA)

unread,
Feb 13, 2015, 7:58:32 AM2/13/15
to jenkinsc...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages