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

jgit compatibility with Jenkins version 2.277.2 - getting exception "remote call agent failed" on calling checkout()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • git-client-plugin
    • None
    • Jenkins version - 2.277.2
      git client plugin version - 3.7.1
      jdk version - 1.8.0_112

      Upon upgrading the Jenkins version to 2.277.2, we are getting the below error while calling `checkout` function for some GitHub repositories and not for all.

       

      after noticing the line "The recommended git tool is: jgit " on console(and not on earlier Jenkins version job's console), in Jenkins global tool configuration we have 2 git clients configured jgit and git client(available on disk).

      pipeline steps too shows job failed at this line, so tried removing jgit and checkout worked just fine.

      is there any dependency here with jgit or possibly jdk version and Jenkins version 2.277.2 ?

      code :

      def repoUrl = 'git@repopath.git' 
      checkoutFromScm scm:  [ 
         $class : 'GitSCM', 
         branches : [[name: 'testing']], 
         userRemoteConfigs: [[ url : repoUrl, 
                             credentialsId: getGitCredentialId(repoUrl) ]]  //
      getGitCredentialId- shared-lib function
        ], 
      changelog: false, 
      poll: false
      

      error :

      [Pipeline] checkout
      The recommended git tool is: jgit
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to ######agentname
      		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1800)
      		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
      		at hudson.remoting.Channel.call(Channel.java:1001)
      		at hudson.FilePath.act(FilePath.java:1158)
      		at hudson.FilePath.act(FilePath.java:1147)
      		at org.jenkinsci.plugins.gitclient.Git.getClient(Git.java:121)
      		at hudson.plugins.git.GitSCM.createClient(GitSCM.java:906)
      		at hudson.plugins.git.GitSCM.createClient(GitSCM.java:837)
      		at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1290)
      		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:125)
      		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)
      		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
      		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      java.lang.NoClassDefFoundError: Could not initialize class org.jenkinsci.plugins.gitclient.trilead.TrileadSessionFactory
      	at org.jenkinsci.plugins.gitclient.JGitAPIImpl.<init>(JGitAPIImpl.java:158)
      	at org.jenkinsci.plugins.gitclient.JGitAPIImpl.<init>(JGitAPIImpl.java:147)
      	at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:160)
      	at org.jenkinsci.plugins.gitclient.Git$GitAPIMasterToSlaveFileCallable.invoke(Git.java:149)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3314)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:211)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      	at hudson.remoting.Request$2.run(Request.java:376)
      	at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)
      Caused: java.io.IOException: Remote call on FRAS40011A failed
      	at hudson.remoting.Channel.call(Channel.java:1007)
      	at hudson.FilePath.act(FilePath.java:1158)
      	at hudson.FilePath.act(FilePath.java:1147)
      	at org.jenkinsci.plugins.gitclient.Git.getClient(Git.java:121)
      	at hudson.plugins.git.GitSCM.createClient(GitSCM.java:906)
      	at hudson.plugins.git.GitSCM.createClient(GitSCM.java:837)
      	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1290)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:125)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)
      	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	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)
      Finished: FAILURE

            Unassigned Unassigned
            harshad_ghorpade Harshad
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: