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

ERROR: Checkout failed - NoClassDefFoundError: org/eclipse/jgit/internal/JGitText

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • git-plugin
    • None

      Jenkins agent not able to clone git repo, seems there is and issue with JNLP4-Connect:

      Cloning the remote Git repository
      ERROR: Checkout failed
      Also: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from 172.xx.3.xx/172.xx.3.xxx:38596
      at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1784)
      at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)
      at hudson.remoting.Channel.call(Channel.java:1000)
      at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:153)

      From the agent logs, the slave agent are able to connect with the master, but it's suddenly terminated:

      Jun 18, 2024 10:24:54 AM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Connected
      Jun 18, 2024 10:24:59 AM org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave$SlaveDisconnector call
      INFO: Disabled agent engine reconnects.
      Jun 18, 2024 10:24:59 AM hudson.remoting.jnlp.Main$CuiListener status
      INFO: Terminated
      Jun 18, 2024 10:24:59 AM hudson.remoting.Request$2 run
      INFO: Failed to send back a reply to the request UserRequest:hudson.Launcher$RemoteLauncher$KillTask@1915f08c: hudson.remoting.ChannelClosedException: Channel "hudson.remoting.Channel@345786ef:JNLP4-connect connection to jenkins-iac-agent.jenkins-iac.svc.cluster.local/10.xx.71.xxx:50000": channel is already closed
      Exception in thread "Thread-24" java.lang.NoClassDefFoundError: org/eclipse/jgit/internal/JGitText
      at org.eclipse.jgit.internal.util.ShutdownHook.cleanup(ShutdownHook.java:85)
      at java.base/java.lang.Thread.run(Unknown Source)

          [JENKINS-73324] ERROR: Checkout failed - NoClassDefFoundError: org/eclipse/jgit/internal/JGitText

          Mark Waite added a comment - - edited

          JENKINS-40050 reported a similar failure though it has been years since anyone has reported a case of that issue.

          The comment in JENKINS-40050 indicates that the issue seemed to be specific to a particular machine.

          If the "jarCache" directory on the agent is removed and the agent restarted, does the problem persist?

          If the agent is destroyed and recreated, does the problem persist?

          Is the agent running a recent version of Jenkins remoting? The version node monitors plugin will show the remoting version in a table on the list of agents.

          I'm not able to duplicate the issue in my environment. We aren't able to duplicate the issue on any of the Jenkins controllers that are run by the Jenkins project.

          You've not provided enough information for others to try to duplicate the issue. Please provide the information listed in "How to report an issue" so that others will be more likely to attempt to duplicate the issue.

          Mark Waite added a comment - - edited JENKINS-40050 reported a similar failure though it has been years since anyone has reported a case of that issue. The comment in JENKINS-40050 indicates that the issue seemed to be specific to a particular machine. If the "jarCache" directory on the agent is removed and the agent restarted, does the problem persist? If the agent is destroyed and recreated, does the problem persist? Is the agent running a recent version of Jenkins remoting? The version node monitors plugin will show the remoting version in a table on the list of agents. I'm not able to duplicate the issue in my environment. We aren't able to duplicate the issue on any of the Jenkins controllers that are run by the Jenkins project. You've not provided enough information for others to try to duplicate the issue. Please provide the information listed in "How to report an issue" so that others will be more likely to attempt to duplicate the issue.

          Dio added a comment - - edited

          markewaite thanks for your reply. I'll try to answer your question:

          If the "jarCache" directory on the agent is removed and the agent restarted, does the problem persist?

          The setup for this Jenkins for both Master and agent running in kubernetes, and the agent will only created on demand when there is a job running. And since the agent suddenly terminated, the pods suddenly change it's state from running to be succeeded. In this case I'm not sure how to removed "jarCache" as I'm not able to access the pod.

          Is the agent running a recent version of Jenkins remoting?

          Yes there is information about the agent version, here is the full logs, the agent is using Remoting version: 3107.v665000b_51092

          Jun 18, 2024 2:24:44 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
          INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
          Jun 18, 2024 2:24:44 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
          INFO: Remoting TCP connection tunneling is enabled. Skipping the TCP Agent Listener Port availability check
          Jun 18, 2024 2:24:44 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Agent discovery successful
          Agent address: jenkins-iac-agent.jenkins-iac.svc.cluster.local
          Agent port: 50000
          Identity: f5:a1:99:d7:bd:a3:78:61:29:10:30:17:be:7a:53:b7
          Jun 18, 2024 2:24:44 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Handshaking
          Jun 18, 2024 2:24:44 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Connecting to jenkins-iac-agent.jenkins-iac.svc.cluster.local:50000
          Jun 18, 2024 2:24:44 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Trying protocol: JNLP4-connect
          Jun 18, 2024 2:24:44 PM org.jenkinsci.remoting.protocol.impl.BIONetworkLayer$Reader run
          INFO: Waiting for ProtocolStack to start.
          Jun 18, 2024 2:24:44 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Remote identity confirmed: f5:a1:99:d7:bd:a3:78:61:29:10:30:17:be:7a:53:b7
          Jun 18, 2024 2:24:44 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Connected
          Jun 18, 2024 2:24:50 PM org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave$SlaveDisconnector call
          INFO: Disabled agent engine reconnects.
          Jun 18, 2024 2:24:50 PM hudson.remoting.jnlp.Main$CuiListener status
          INFO: Terminated
          Jun 18, 2024 2:24:50 PM hudson.remoting.Request$2 run
          INFO: Failed to send back a reply to the request UserRequest:hudson.Launcher$RemoteLauncher$KillTask@1a39a65d: hudson.remoting.ChannelClosedException: Channel "hudson.remoting.Channel@186a7a0b:JNLP4-connect connection to jenkins-iac-agent.jenkins-iac.svc.cluster.local/10.xx.71.2xx:50000": channel is already closed
          Exception in thread "Thread-22" java.lang.NoClassDefFoundError: org/eclipse/jgit/internal/JGitText
          at org.eclipse.jgit.internal.util.ShutdownHook.cleanup(ShutdownHook.java:85)at java.base/java.lang.Thread.run(Unknown Source)

          Additional Information:
          Currently we are using Jenkins 2.401.3 and have 2 different agents in our docker image:

          • jenkins-slave-java-app 3107.v665000b_51092
          • jenkins-inbound-agent 4.13.3-1-jdk11
            Both of the agents having similar issue when running the job

          Kindly let me know if you need some other information, Thank You!
           

          Dio added a comment - - edited markewaite thanks for your reply. I'll try to answer your question: If the "jarCache" directory on the agent is removed and the agent restarted, does the problem persist? The setup for this Jenkins for both Master and agent running in kubernetes, and the agent will only created on demand when there is a job running. And since the agent suddenly terminated, the pods suddenly change it's state from running to be succeeded. In this case I'm not sure how to removed "jarCache" as I'm not able to access the pod. Is the agent running a recent version of Jenkins remoting? Yes there is information about the agent version, here is the full logs, the agent is using Remoting version: 3107.v665000b_51092 Jun 18, 2024 2:24:44 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping] Jun 18, 2024 2:24:44 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve INFO: Remoting TCP connection tunneling is enabled. Skipping the TCP Agent Listener Port availability check Jun 18, 2024 2:24:44 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Agent discovery successful Agent address: jenkins-iac-agent.jenkins-iac.svc.cluster.local Agent port: 50000 Identity: f5:a1:99:d7:bd:a3:78:61:29:10:30:17:be:7a:53:b7 Jun 18, 2024 2:24:44 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Handshaking Jun 18, 2024 2:24:44 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Connecting to jenkins-iac-agent.jenkins-iac.svc.cluster.local:50000 Jun 18, 2024 2:24:44 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Trying protocol: JNLP4-connect Jun 18, 2024 2:24:44 PM org.jenkinsci.remoting.protocol.impl.BIONetworkLayer$Reader run INFO: Waiting for ProtocolStack to start. Jun 18, 2024 2:24:44 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Remote identity confirmed: f5:a1:99:d7:bd:a3:78:61:29:10:30:17:be:7a:53:b7 Jun 18, 2024 2:24:44 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Connected Jun 18, 2024 2:24:50 PM org.csanchez.jenkins.plugins.kubernetes.KubernetesSlave$SlaveDisconnector call INFO: Disabled agent engine reconnects. Jun 18, 2024 2:24:50 PM hudson.remoting.jnlp.Main$CuiListener status INFO: Terminated Jun 18, 2024 2:24:50 PM hudson.remoting.Request$2 run INFO: Failed to send back a reply to the request UserRequest:hudson.Launcher$RemoteLauncher$KillTask@1a39a65d: hudson.remoting.ChannelClosedException: Channel "hudson.remoting.Channel@186a7a0b:JNLP4-connect connection to jenkins-iac-agent.jenkins-iac.svc.cluster.local/10.xx.71.2xx:50000": channel is already closed Exception in thread "Thread-22" java.lang.NoClassDefFoundError: org/eclipse/jgit/internal/JGitText at org.eclipse.jgit.internal.util.ShutdownHook.cleanup(ShutdownHook.java:85)at java.base/java.lang.Thread.run(Unknown Source) Additional Information: Currently we are using Jenkins 2.401.3 and have 2 different agents in our docker image: jenkins-slave-java-app 3107.v665000b_51092 jenkins-inbound-agent 4.13.3-1-jdk11 Both of the agents having similar issue when running the job Kindly let me know if you need some other information, Thank You!  

          Mark Waite added a comment -

          Unknown program, outdated remoting

          You said:

          jenkins-slave-java-app 3107.v665000b_51092

          I don't recognize "jenkins-slave-java-app" though the version number 3107.v665000b_51092 is an older version of Jenkins remoting from 15 months ago. If the program jenkins-slave-java-app is using Jenkins remoting, then you could try upgrading to a newer version of Jenkins remoting to see if that resolves the issue.

          Outdated inbound agent

          The version of inbound agent that you are running is out of date.

          You said:

          jenkins-inbound-agent 4.13.3-1-jdk11

          The most recent version of Jenkins inbound agent is 3248.v65ecb_254c298-6-jdk11 . I recommend you try with a newer version of the inbound agent in case that resolves the issue

          Outdated Jenkins controller with critical security vulnerabilities

          The version of Jenkins controller that you are running is out of date and has critical and medium security vulnerabilities.

          You said:

          Jenkins 2.401.3

          Jenkins versions prior to 2.426.3 have critical security vulnerabilities. There are medium vulnerabilities in Jenkins versions prior to 2.440.3. Upgrading your controller version may also resolve the issue you are seeing.

          Incomplete information

          I previously said:

          Please provide the information listed in "How to report an issue" so that others will be more likely to attempt to duplicate the issue.

          You said:

          Kindly let me know if you some other information

          Please provide the information that is listed in "How to report an issue"

          Mark Waite added a comment - Unknown program, outdated remoting You said: jenkins-slave-java-app 3107.v665000b_51092 I don't recognize "jenkins-slave-java-app" though the version number 3107.v665000b_51092 is an older version of Jenkins remoting from 15 months ago. If the program jenkins-slave-java-app is using Jenkins remoting, then you could try upgrading to a newer version of Jenkins remoting to see if that resolves the issue. Outdated inbound agent The version of inbound agent that you are running is out of date. You said: jenkins-inbound-agent 4.13.3-1-jdk11 The most recent version of Jenkins inbound agent is 3248.v65ecb_254c298-6-jdk11 . I recommend you try with a newer version of the inbound agent in case that resolves the issue Outdated Jenkins controller with critical security vulnerabilities The version of Jenkins controller that you are running is out of date and has critical and medium security vulnerabilities. You said: Jenkins 2.401.3 Jenkins versions prior to 2.426.3 have critical security vulnerabilities. There are medium vulnerabilities in Jenkins versions prior to 2.440.3. Upgrading your controller version may also resolve the issue you are seeing. Incomplete information I previously said: Please provide the information listed in "How to report an issue" so that others will be more likely to attempt to duplicate the issue. You said: Kindly let me know if you some other information Please provide the information that is listed in "How to report an issue"

          Dio added a comment -

          markewaite thanks for your suggestion, I will try to upgrade it first. Sorry if this ticket not follow the proper guidance as this is my first time. Will do better issue reporting next time.

          Dio added a comment - markewaite thanks for your suggestion, I will try to upgrade it first. Sorry if this ticket not follow the proper guidance as this is my first time. Will do better issue reporting next time.

          Dio added a comment - - edited

          Hi markewaite this ticket can be close, the issue can be resolve by update all the kubernetes plugins. Thanks for your support.

          Dio added a comment - - edited Hi markewaite this ticket can be close, the issue can be resolve by update all the kubernetes plugins. Thanks for your support.

          Mark Waite added a comment -

          That's super. Thanks ideadio

          Mark Waite added a comment - That's super. Thanks ideadio

            Unassigned Unassigned
            ideadio Dio
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: