[JIRA] [git-plugin] (JENKINS-24125) Git Polling fails for job restricted to Mac OS X slave (with Windows master)

10 views
Skip to first unread message

rick.foos@solengtech.com (JIRA)

unread,
Aug 26, 2015, 12:29:04 PM8/26/15
to jenkinsc...@googlegroups.com
Rick Foos reopened an issue
 

I am currently having the same issue on a Windows Master, Ubuntu Slave Jenkins ver. 1.626

The default git is C:\Cygin64\bin\git.exe, which works on the windows master.

A second definition for linux, /usr/bin/git, is set in configure system, and for the Linux slave.

The slave is ignoring this in the pre-build SCM step, and using the default windows git from windows.

[EnvInject] - Loading node environment variables.
[EnvInject] - Preparing an environment for the build.
[EnvInject] - Keeping Jenkins system variables.
[EnvInject] - Keeping Jenkins build variables.
[EnvInject] - Executing and processing the following script content:
printenv

[jenkins-slave-61] $ bash -xe /tmp/hudson1628961445242564055.sh
+ printenv
BUILD_URL=http://192.168.29.61:8080/job/ambiqtools-eclipse-installer/6/
XDG_SESSION_ID=42
HUDSON_SERVER_COOKIE=7b724dbd927d388d
SHELL=/bin/bash
SSH_CLIENT=192.168.29.61 51590 22
BUILD_TAG=jenkins-ambiqtools-eclipse-installer-6
ROOT_BUILD_CAUSE=MANUALTRIGGER
JOB_URL=http://192.168.29.61:8080/job/ambiqtools-eclipse-installer/
USER=rfoos
executor label=kvm-u1504-mars
JENKINS_HOME=C:\jenkins
MAIL=/var/mail/rfoos
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
_=/usr/bin/printenv
BUILD_CAUSE_MANUALTRIGGER=true
PWD=/home/rfoos/jenkins-slave-61
HUDSON_URL=http://192.168.29.61:8080/
LANG=en_US.UTF-8
JOB_NAME=ambiqtools-eclipse-installer
BUILD_DISPLAY_NAME=#6
JENKINS_URL=http://192.168.29.61:8080/
BUILD_CAUSE=MANUALTRIGGER
BUILD_ID=6
SHLVL=2
HOME=/home/rfoos
EXECUTOR_NUMBER=0
JENKINS_SERVER_COOKIE=7b724dbd927d388d
NODE_LABELS=jenkins-slave-61 kvm-u1504-mars
LOGNAME=rfoos
SSH_CONNECTION=192.168.29.61 51590 192.168.29.153 22
HUDSON_HOME=C:\jenkins
NODE_NAME=kvm-u1504-mars
BUILD_NUMBER=6
XDG_RUNTIME_DIR=/run/user/1000
ROOT_BUILD_CAUSE_MANUALTRIGGER=true
HUDSON_COOKIE=f54968a0-ef1a-4adc-9ef9-f21caec71a68
[EnvInject] - Script executed successfully.
[EnvInject] - Injecting contributions.
Building remotely on kvm-u1504-mars (jenkins-slave-61) in workspace /home/rfoos/jenkins-slave-61/sharedspace/ambiqtools-eclipse-installer
Cloning the remote Git repository
Cloning repository http://git.eclipse.org/gitroot/oomph/org.eclipse.oomph.git
> C:\Cygwin64\bin\git.exe init /home/rfoos/jenkins-slave-61/sharedspace/ambiqtools-eclipse-installer # timeout=10
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Could not init /home/rfoos/jenkins-slave-61/sharedspace/ambiqtools-eclipse-installer
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$4.execute(CliGitAPIImpl.java:606)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:462)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145)
at hudson.remoting.UserRequest.perform(UserRequest.java:121)
at hudson.remoting.UserRequest.perform(UserRequest.java:49)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at ......remote call to kvm-u1504-mars(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1413)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
at hudson.remoting.Channel.call(Channel.java:778)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131)
at com.sun.proxy.$Proxy68.execute(Unknown Source)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1003)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1043)
at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:129)
at hudson.scm.SCM.checkout(SCM.java:485)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1277)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
at hudson.model.Run.execute(Run.java:1741)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:408)
Caused by: hudson.plugins.git.GitException: Error performing command: C:\Cygwin64\bin\git.exe init /home/rfoos/jenkins-slave-61/sharedspace/ambiqtools-eclipse-installer
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1647)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1616)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1612)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1254)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$4.execute(CliGitAPIImpl.java:604)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:462)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145)
at hudson.remoting.UserRequest.perform(UserRequest.java:121)
at hudson.remoting.UserRequest.perform(UserRequest.java:49)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: Cannot run program "C:\Cygwin64\bin\git.exe" (in directory "/home/rfoos/jenkins-slave-61/sharedspace/ambiqtools-eclipse-installer"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
at hudson.Proc$LocalProc.<init>(Proc.java:216)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:816)
at hudson.Launcher$ProcStarter.start(Launcher.java:382)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1636)
... 15 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:248)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
... 20 more
ERROR: null
Archiving artifacts
Finished: FAILURE

Jenkins / Bug JENKINS-24125
Git Polling fails for job restricted to Mac OS X slave (with Windows master)
Change By: Rick Foos
Resolution: Not A Defect
Status: Closed Reopened
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

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

unread,
Aug 27, 2015, 3:23:01 PM8/27/15
to jenkinsc...@googlegroups.com
Mark Waite commented on Bug JENKINS-24125
 
Re: Git Polling fails for job restricted to Mac OS X slave (with Windows master)

Rick Foos does it have the same behavior if you assign the tool location as part of the slave node definition, rather than assigning it as part of a separate implementation of git at the system level?

I tried the following steps and did not see the problem (note, these steps are different than the steps I believe you used to show the problem):

  1. Configure a Windows Jenkins with git plugin 2.4.0 and git client plugin 1.19.0 using Windows git 2.5.0
  2. Define the git location as C:\Program Files\Git\bin\git.exe in the system wide tools definition
  3. Add a Linux slave node
  4. Define a git based job which runs only on the Linux slave node
  5. Run the job, confirm it fails because the slave node by default uses the git location specified by the master node
  6. Modify the slave node configuration to define a git location as "/usr/bin/git"
  7. Run the job, confirm it now succeeds because the git location can be found

If you can confirm that work around, that will help show that the problem is specific to alternate git implementations (as defined by the plugin) rather than alternate git locations.

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

unread,
Aug 27, 2015, 3:24:01 PM8/27/15
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-24125
[~rickfoosusa] does it have the same behavior if you assign the tool location as part of the slave node definition, rather than assigning it as part of a separate  implementation  system-wide installation  of git  at the system level ?


I tried the following steps and did not see the problem (note, these steps are different than the steps I believe you used to show the problem):

# Configure a Windows Jenkins with git plugin 2.4.0 and git client plugin 1.19.0 using Windows git 2.5.0
# Define the git location as C:\Program Files\Git\bin\git.exe in the system wide tools definition
# Add a Linux slave node
# Define a git based job which runs only on the Linux slave node
# Run the job, confirm it fails because the slave node by default uses the git location specified by the master node
# Modify the slave node configuration to define a git location as "/usr/bin/git"
# Run the job, confirm it now succeeds because the git location can be found


If you can confirm that work around, that will help show that the problem is specific to alternate git implementations (as defined by the plugin) rather than alternate git locations.

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

unread,
Aug 27, 2015, 3:26:04 PM8/27/15
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-24125
[~rickfoosusa] does it have the same behavior if you assign the tool location as part of the slave node definition, rather than assigning it as part of a separate system-wide installation of git?


I tried the following steps and did not see the problem (note, these steps are different than the steps I believe you used to show the problem):

# Configure a Windows Jenkins with git plugin 2.4.0 and git client plugin 1.19.0 using Windows git 2.5.0
# Define the git location as C:\Program Files\Git\bin\git.exe in the system wide tools definition
# Add a Linux slave node
# Define a git based job which runs only on the Linux slave node
# Run the job, confirm it fails because the slave node by default uses the git location specified by the master node
# Modify the slave node configuration to define a git location as "/usr/bin/git"
# Run the job, confirm it now succeeds because the git location can be found

If you can confirm that work around, that will help show that the problem is specific to alternate git implementations (as defined by the plugin) rather than alternate git locations.


I believe the steps you took to show the problem were:


I tried the following steps and did not see the problem (note, these steps are different than the steps I believe you used to show the problem):

# Configure a Windows Jenkins with git plugin 2.4.0 and git client plugin 1.19.0 using Windows git 2.5.0
# Define the git location as C:\Program Files\Git\bin\git.exe in the system wide tools definition
# Add a Linux slave node
# Define a git based job which runs only on the Linux slave node
# Run the job, confirm it fails because the slave node by default uses the git location specified by the master node
# Add a git installation called "Linux" with git location as "/usr/bin/git"
# Configure the job to use the Linux git instead of the default git
# Run the job, confirm it fails with the same message when it should succeed because the git location can be found (*this is the bug*)

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

unread,
Aug 27, 2015, 3:27:02 PM8/27/15
to jenkinsc...@googlegroups.com

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

unread,
Aug 27, 2015, 3:27:03 PM8/27/15
to jenkinsc...@googlegroups.com
Mark Waite edited a comment on Bug JENKINS-24125
[~rickfoosusa] does it have the same behavior if you assign the tool location as part of the slave node definition, rather than assigning it as part of a separate system-wide installation of git?

I tried the following steps and did not see the problem (note, these steps are different than the steps I believe you used to show the problem):

# Configure a Windows Jenkins with git plugin 2.4.0 and git client plugin 1.19.0 using Windows git 2.5.0
# Define the git location as C:\Program Files\Git\bin\git.exe in the system wide tools definition
# Add a Linux slave node
# Define a git based job which runs only on the Linux slave node
# Run the job, confirm it fails because the slave node by default uses the git location specified by the master node
# Modify the slave node configuration to define a git location as "/usr/bin/git"
# Run the job, confirm it now succeeds because the git location can be found

If you can confirm that work around, that will help show that the problem is specific to alternate git implementations (as defined by the plugin) rather than alternate git locations.

I believe the steps you took to show the problem were:

# Configure a Windows Jenkins with git plugin 2.4.0 and git client plugin 1.19.0 using Windows git 2.5.0
# Define the git location as C:\Program Files\Git\bin\git.exe in the system wide tools definition
# Add a Linux slave node
# Define a git based job which runs only on the Linux slave node
# Run the job, confirm it fails because the slave node by default uses the git location specified by the master node
# Add a git installation called " Linux Mac " with git location as "/usr/bin/git"
# Configure the job to use the
 Linux  Mac  git instead of the default git

# Run the job, confirm it fails with the same message when it should succeed because the git location can be found (*this is the bug*)

stephen.tunney@gmail.com (JIRA)

unread,
Aug 15, 2018, 10:30:02 AM8/15/18
to jenkinsc...@googlegroups.com

I have seemed to hit the same issue but in reverse, my master is on Ubuntu and my slaves are Windows.  Fetching submodules or even using the 

Source Code Management

Configuration system to load common groovy scripts with the LoadLibrary()_ call produces the same error as noted above, the one difference is that it is trying to launch C:\Program Files\Git\cmd\git.exe from a unix shell fork.

This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

nicolas.deloof@gmail.com (JIRA)

unread,
Apr 24, 2019, 10:31:02 AM4/24/19
to jenkinsc...@googlegroups.com
Nicolas De Loof assigned an issue to Unassigned
 
Change By: Nicolas De Loof
Assignee: Nicolas De Loof
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

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

unread,
Jan 8, 2020, 7:02:05 AM1/8/20
to jenkinsc...@googlegroups.com
Change By: Mark Waite
Status: Reopened Open
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages