Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-34082

Git fetch fails on Windows as service, succeeds as JNLP slave

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major Major
    • other
    • None

      I launched agent from browser on slave (node slave agent) and job builds correctly.
      But when I install "as a service", service started good and jenkins master will see this node is active, then job starts but it can not fetch git repository. Why slave agent work fine, but service work incorrectly?
      Please help to configure service on Windows Server 2008 x86 (Amazon).
      Here is the job console:

      Started by user User
      [EnvInject] - Loading node environment variables.
      Building remotely on windows_x86 (Windows_x86) in workspace D:\Jenkins_workspace
      > C:\Program Files\Git\cmd\git.exe rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from the remote Git repository
      > C:\Program Files\Git\cmd\git.exe config remote.origin.url https://my_repo/scm/git/git_RB3 # timeout=10
      Fetching upstream changes from https://my_repo/scm/git/git_RB3
      > C:\Program Files\Git\cmd\git.exe --version # timeout=10
      using .gitcredentials to set credentials
      > C:\Program Files\Git\cmd\git.exe config --local credential.username builduser # timeout=10
      > C:\Program Files\Git\cmd\git.exe config --local credential.helper store --file=\"C:\Users\jenkins\AppData\Local\Temp\git2110423309356276453.credentials\" # timeout=10
      > C:\Program Files\Git\cmd\git.exe -c core.askpass=true fetch --tags --progress https://my_repo/scm/git/git_RB3 +refs/heads/:refs/remotes/origin/
      ERROR: Timeout after 10 minutes
      > C:\Program Files\Git\cmd\git.exe config --local --remove-section credential # timeout=10
      ERROR: Error fetching remote repo 'origin'
      hudson.plugins.git.GitException: Failed to fetch from https://my_repo/scm/git/git_RB3
      at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:810)
      at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1066)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1097)
      at hudson.scm.SCM.checkout(SCM.java:485)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
      at hudson.model.Run.execute(Run.java:1738)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:410)
      Caused by: hudson.plugins.git.GitException: Command "C:\Program Files\Git\cmd\git.exe -c core.askpass=true fetch --tags --progress https://my_repo/scm/git/git_RB3 +refs/heads/:refs/remotes/origin/" returned status code -1:
      stdout:
      stderr:
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1719)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1463)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:63)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:314)
      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:120)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:332)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at hudson.remoting.Engine$1$1.run(Engine.java:85)
      at java.lang.Thread.run(Unknown Source)
      at ......remote call to windows_x86(Native Method)
      at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
      at hudson.remoting.UserResponse.retrieve(UserRequest.java:220)
      at hudson.remoting.Channel.call(Channel.java:781)
      at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131)
      at com.sun.proxy.$Proxy60.execute(Unknown Source)
      at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:808)
      ... 11 more
      ERROR: null
      Finished: FAILURE

            Unassigned Unassigned
            14163314 Serg Pr
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: