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

Git Clone fails on slave

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Labels:
      None
    • Environment:
      Master: Docker container with Jenkins 1.625.3
      Slave: Docker container with ubuntu:wily + openssh-server + openjdk-8-jdk + maven 3.3.9 + git 2.5.0
    • Similar Issues:

      Description

      When I try a build using a salve I am getting the following error

      Started by user stojan.sljivic
      [EnvInject] - Loading node environment variables.
      Building remotely on maven-slave (maven) in workspace /workspace/workspace/test
       > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
      Fetching changes from the remote Git repository
       > /usr/bin/git config remote.origin.url git@gitlab.com:sdev/perun.git # timeout=10
      Fetching upstream changes from git@gitlab.com:sdev/perun.git
       > /usr/bin/git --version # timeout=10
      using GIT_SSH to set credentials jenkins ssh-rsa key
      ERROR: Error fetching remote repo 'origin'
      hudson.plugins.git.GitException: Failed to fetch from git@gitlab.com:sdev/perun.git
      	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:763)
      	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1012)
      	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1043)
      	at hudson.scm.SCM.checkout(SCM.java:485)
      	at hudson.model.AbstractProject.checkout(AbstractProject.java:1275)
      	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: java.io.IOException: Remote call on maven-slave failed
      	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:172)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:497)
      	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131)
      	at com.sun.proxy.$Proxy51.execute(Unknown Source)
      	at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:761)
      	... 11 more
      Caused by: java.io.IOException: Remote call on maven-slave failed
      	at hudson.remoting.Channel.call(Channel.java:789)
      	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145)
      	... 18 more
      Caused by: java.lang.AssertionError: java.io.EOFException
      	at org.kohsuke.putty.KeyReader.read(KeyReader.java:63)
      	at org.kohsuke.putty.KeyReader.readInt(KeyReader.java:71)
      	at org.kohsuke.putty.PuTTYKey.toOpenSSH(PuTTYKey.java:198)
      	at com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey.getPrivateKeys(BasicSSHUserPrivateKey.java:135)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.createSshKeyFile(CliGitAPIImpl.java:1432)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1300)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:62)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:313)
      	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: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 maven-slave(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)
      	... 19 more
      Caused by: java.io.EOFException
      	at java.io.DataInputStream.readFully(DataInputStream.java:197)
      	at java.io.DataInputStream.readFully(DataInputStream.java:169)
      	at org.kohsuke.putty.KeyReader.read(KeyReader.java:60)
      	at org.kohsuke.putty.KeyReader.readInt(KeyReader.java:71)
      	at org.kohsuke.putty.PuTTYKey.toOpenSSH(PuTTYKey.java:198)
      	at com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey.getPrivateKeys(BasicSSHUserPrivateKey.java:135)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.createSshKeyFile(CliGitAPIImpl.java:1432)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1300)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:62)
      	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:313)
      	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: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)
      ERROR: null
      Started calculate disk usage of build
      Finished Calculation of disk usage of build in 0 seconds
      Started calculate disk usage of workspace
      Finished Calculation of disk usage of workspace in 0 seconds
      Finished: FAILURE
      

      For git authentication I use the key named "jenkins ssh-rsa key" and private key is entered directly in the master Jenkins web interface.

        Attachments

          Activity

          Hide
          ssljivic Stojan Sljivic added a comment -

          Forgot to mention - slave is ubuntu wily and has open-ssh server, git, maven and Open JDK 8.

          Show
          ssljivic Stojan Sljivic added a comment - Forgot to mention - slave is ubuntu wily and has open-ssh server, git, maven and Open JDK 8.
          Hide
          ssljivic Stojan Sljivic added a comment -

          Hi Mark Waite any update on this issue. Do you need any additional info for this issue?

          Show
          ssljivic Stojan Sljivic added a comment - Hi Mark Waite any update on this issue. Do you need any additional info for this issue?
          Hide
          markewaite Mark Waite added a comment -

          I don't know how to duplicate your problem. As far as I can tell, the failure is deep in the credentials methods provided by the Jenkins credentials plugin. The reference to Putty in the stack trace makes me wonder if you somehow registered an id_rsa.ppk file from Putty rather than registering an id_rsa file from OpenSSH. However, that may be a completely expected part of the call stack.

          Since the message appears from a slave, does it also appear if you force the same job to run on the master?

          Are you able to use a private key based checkout with a different private key?

          Show
          markewaite Mark Waite added a comment - I don't know how to duplicate your problem. As far as I can tell, the failure is deep in the credentials methods provided by the Jenkins credentials plugin. The reference to Putty in the stack trace makes me wonder if you somehow registered an id_rsa.ppk file from Putty rather than registering an id_rsa file from OpenSSH. However, that may be a completely expected part of the call stack. Since the message appears from a slave, does it also appear if you force the same job to run on the master? Are you able to use a private key based checkout with a different private key?
          Hide
          markewaite Mark Waite added a comment -

          I can't duplicate this problem. If more information is available to show the problem with current code, it can be reopened with that additional information.

          Show
          markewaite Mark Waite added a comment - I can't duplicate this problem. If more information is available to show the problem with current code, it can be reopened with that additional information.

            People

            • Assignee:
              Unassigned
              Reporter:
              ssljivic Stojan Sljivic
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: