hudson.plugins.git.GitException: Failed to fetch from git@XXX:YYY.git

Jenkins JIRA | ellen shen | 1 year ago
  1. 0

    0. Jenkins slave run for couple days. 1. Git fetches failed one day suddenly. 2. Complaint Putty class java.lang.NoClassDefFoundError. although it exists under ~/.jenkins/cache/jars in that slave. I assume the jenkins cache is messed up somehow or at least slave process suddenly has wrong memory of whats in the cache. so I did below test. 1. disconnect the jenkins slave to kill slave java process. 2. rm -rf ~/.jenkins/cache/jars. 3. bring jenkins slave back online(launche method ssh) 4. I did see the ~/.jenkins/cache/jars filled with jars. but it does not include PuTTYKey and it does not even include class JavaVMArguments.class. 5. if manually copied jar files in another functional jenkins slave to the cache and re-launche agent, those jars/classes still cant be recognized by slave java process. Note: the master jvm uses jdk1.7.75, the slave uses jdk1.7.79. 12:42:12 - ERROR: Error fetching remote repo 'origin' 12:42:12 - hudson.plugins.git.GitException: Failed to fetch from git@XXX:YYY.git 12:42:12 - at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:735) 12:42:12 - at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:983) 12:42:12 - at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1016) 12:42:12 - at hudson.scm.SCM.checkout(SCM.java:488) 12:42:12 - at hudson.model.AbstractProject.checkout(AbstractProject.java:1257) 12:42:12 - at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622) 12:42:12 - at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 12:42:12 - at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528) 12:42:12 - at hudson.model.Run.execute(Run.java:1745) 12:42:12 - at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 12:42:12 - at hudson.model.ResourceController.execute(ResourceController.java:89) 12:42:12 - at hudson.model.Executor.run(Executor.java:240) 12:42:12 - Caused by: hudson.plugins.git.GitException: java.io.IOException: Remote call on a004999.com failed 12:42:12 - at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:172) 12:42:12 - at sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source) 12:42:12 - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 12:42:12 - at java.lang.reflect.Method.invoke(Method.java:606) 12:42:12 - at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131) 12:42:12 - at com.sun.proxy.$Proxy48.execute(Unknown Source) 12:42:12 - at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:733) 12:42:12 - ... 11 more 12:42:12 - Caused by: java.io.IOException: Remote call on a004999.com failed 12:42:12 - at hudson.remoting.Channel.call(Channel.java:760) 12:42:12 - at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145) 12:42:12 - ... 17 more 12:42:12 - Caused by: java.lang.NoClassDefFoundError: org/kohsuke/putty/PuTTYKey 12:42:12 - at com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey.getPrivateKeys(BasicSSHUserPrivateKey.java:132) 12:42:12 - at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.createSshKeyFile(CliGitAPIImpl.java:1417) 12:42:12 - at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1295) 12:42:12 - at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:86) 12:42:12 - at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:324) 12:42:12 - at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152) 12:42:12 - at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145) 12:42:12 - at hudson.remoting.UserRequest.perform(UserRequest.java:121) 12:42:12 - at hudson.remoting.UserRequest.perform(UserRequest.java:49) 12:42:12 - at hudson.remoting.Request$2.run(Request.java:324) 12:42:12 - at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) 12:42:12 - at java.util.concurrent.FutureTask.run(FutureTask.java:262) 12:42:12 - at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 12:42:12 - at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 12:42:12 - at java.lang.Thread.run(Thread.java:745) 12:42:12 - at ......remote call to a004999.com(Native Method) 12:42:12 - at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1356) 12:42:12 - at hudson.remoting.UserResponse.retrieve(UserRequest.java:221) 12:42:12 - at hudson.remoting.Channel.call(Channel.java:752) 12:42:12 - ... 18 more 12:42:12 - ERROR: Error fetching remote repo 'origin' 12:42:12 - Recording test results

    Jenkins JIRA | 1 year ago | ellen shen
    hudson.plugins.git.GitException: Failed to fetch from git@XXX:YYY.git
  2. 0

    0. Jenkins slave run for couple days. 1. Git fetches failed one day suddenly. 2. Complaint Putty class java.lang.NoClassDefFoundError. although it exists under ~/.jenkins/cache/jars in that slave. I assume the jenkins cache is messed up somehow or at least slave process suddenly has wrong memory of whats in the cache. so I did below test. 1. disconnect the jenkins slave to kill slave java process. 2. rm -rf ~/.jenkins/cache/jars. 3. bring jenkins slave back online(launche method ssh) 4. I did see the ~/.jenkins/cache/jars filled with jars. but it does not include PuTTYKey and it does not even include class JavaVMArguments.class. 5. if manually copied jar files in another functional jenkins slave to the cache and re-launche agent, those jars/classes still cant be recognized by slave java process. Note: the master jvm uses jdk1.7.75, the slave uses jdk1.7.79. 12:42:12 - ERROR: Error fetching remote repo 'origin' 12:42:12 - hudson.plugins.git.GitException: Failed to fetch from git@XXX:YYY.git 12:42:12 - at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:735) 12:42:12 - at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:983) 12:42:12 - at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1016) 12:42:12 - at hudson.scm.SCM.checkout(SCM.java:488) 12:42:12 - at hudson.model.AbstractProject.checkout(AbstractProject.java:1257) 12:42:12 - at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622) 12:42:12 - at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) 12:42:12 - at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528) 12:42:12 - at hudson.model.Run.execute(Run.java:1745) 12:42:12 - at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) 12:42:12 - at hudson.model.ResourceController.execute(ResourceController.java:89) 12:42:12 - at hudson.model.Executor.run(Executor.java:240) 12:42:12 - Caused by: hudson.plugins.git.GitException: java.io.IOException: Remote call on a004999.com failed 12:42:12 - at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:172) 12:42:12 - at sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source) 12:42:12 - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 12:42:12 - at java.lang.reflect.Method.invoke(Method.java:606) 12:42:12 - at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131) 12:42:12 - at com.sun.proxy.$Proxy48.execute(Unknown Source) 12:42:12 - at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:733) 12:42:12 - ... 11 more 12:42:12 - Caused by: java.io.IOException: Remote call on a004999.com failed 12:42:12 - at hudson.remoting.Channel.call(Channel.java:760) 12:42:12 - at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145) 12:42:12 - ... 17 more 12:42:12 - Caused by: java.lang.NoClassDefFoundError: org/kohsuke/putty/PuTTYKey 12:42:12 - at com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey.getPrivateKeys(BasicSSHUserPrivateKey.java:132) 12:42:12 - at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.createSshKeyFile(CliGitAPIImpl.java:1417) 12:42:12 - at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1295) 12:42:12 - at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:86) 12:42:12 - at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:324) 12:42:12 - at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152) 12:42:12 - at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145) 12:42:12 - at hudson.remoting.UserRequest.perform(UserRequest.java:121) 12:42:12 - at hudson.remoting.UserRequest.perform(UserRequest.java:49) 12:42:12 - at hudson.remoting.Request$2.run(Request.java:324) 12:42:12 - at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) 12:42:12 - at java.util.concurrent.FutureTask.run(FutureTask.java:262) 12:42:12 - at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 12:42:12 - at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 12:42:12 - at java.lang.Thread.run(Thread.java:745) 12:42:12 - at ......remote call to a004999.com(Native Method) 12:42:12 - at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1356) 12:42:12 - at hudson.remoting.UserResponse.retrieve(UserRequest.java:221) 12:42:12 - at hudson.remoting.Channel.call(Channel.java:752) 12:42:12 - ... 18 more 12:42:12 - ERROR: Error fetching remote repo 'origin' 12:42:12 - Recording test results

    Jenkins JIRA | 1 year ago | ellen shen
    hudson.plugins.git.GitException: Failed to fetch from git@XXX:YYY.git
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Redeploy from Hudson to Jenkins with classnotfound exception

    Google Groups | 6 years ago | Josch
    java.lang.NoClassDefFoundError: org/kohsuke/graph_layouter/Navigator
  5. 0

    Hudson plugin for Yammer-API Stapler Exception?

    Stack Overflow | 6 years ago | StackOverFlow
    java.lang.NoClassDefFoundError: org/kohsuke/stapler/StaplerFallback

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoClassDefFoundError

      org/kohsuke/putty/PuTTYKey

      at com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey.getPrivateKeys()
    2. com.cloudbees.jenkins
      BasicSSHUserPrivateKey.getPrivateKeys
      1. com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey.getPrivateKeys(BasicSSHUserPrivateKey.java:132)
      1 frame
    3. org.jenkinsci.plugins
      RemoteGitImpl$CommandInvocationHandler$1.call
      1. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.createSshKeyFile(CliGitAPIImpl.java:1417)
      2. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1295)
      3. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:86)
      4. org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:324)
      5. org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152)
      6. org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145)
      6 frames
    4. Hudson :: Remoting Layer
      InterceptingExecutorService$1.call
      1. hudson.remoting.UserRequest.perform(UserRequest.java:121)
      2. hudson.remoting.UserRequest.perform(UserRequest.java:49)
      3. hudson.remoting.Request$2.run(Request.java:324)
      4. hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      4 frames
    5. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:262)
      2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      4. java.lang.Thread.run(Thread.java:745)
      4 frames