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

Agent crashes with java.lang.ClassNotFoundException: jenkins.util.java.ClassNotFoundNoStackTraceException

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: core
    • Labels:
    • Environment:
      Jenkins 2.261
      Embedded Remoting versions
      JNLP-4 and Websocket agents
      Java 11
    • Similar Issues:
    • Released As:
      Jenkins 2.262

      Description

      Unable to provision new agents in version 2.261.  Rolling back to 2.260 corrects the problem.

      Perhaps related to JENKINS-63828?

       
       + su - jenkins -c 'java -jar slave.jar -noReconnect -jnlpUrl [https://#####.com/####/computer/corp-jenkins-yad-409b9df7f31d//slave-agent.jnlp|#####.com/####/computer/corp-jenkins-yad-409b9df7f31d//slave-agent.jnlp] -secret ####'
       Oct 14, 2020 12:48:45 PM hudson.remoting.jnlp.Main createEngine
       INFO: Setting up agent: corp-jenkins-yad-409b9df7f31d
       Oct 14, 2020 12:48:45 PM hudson.remoting.jnlp.Main$CuiListener <init>
       INFO: Jenkins agent is running in headless mode.
       Oct 14, 2020 12:48:45 PM hudson.remoting.Engine startEngine
       INFO: Using Remoting version: 4.5
       Oct 14, 2020 12:48:45 PM hudson.remoting.Engine startEngine
       WARNING: No Working Directory. Using the legacy JAR Cache location: /home/jenkins/.jenkins/cache/jars
       Oct 14, 2020 12:48:45 PM hudson.remoting.jnlp.Main$CuiListener status
       INFO: Locating server among [https://####.com/####/|####.com/itbsa/]
       Oct 14, 2020 12:48:45 PM org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver resolve
       INFO: Remoting server accepts the following protocols: [JNLP4-connect, Ping]
       Oct 14, 2020 12:48:45 PM hudson.remoting.jnlp.Main$CuiListener status
       INFO: Agent discovery successful
       Agent address: ####.com
       Agent port: 50002
       Identity: 99:12:d8:fd:fd:ba:1f:38:a9:dc:a9:ac:87:91:96:fe
       Oct 14, 2020 12:48:45 PM hudson.remoting.jnlp.Main$CuiListener status
       INFO: Handshaking
       Oct 14, 2020 12:48:45 PM hudson.remoting.jnlp.Main$CuiListener status
       INFO: Connecting to ####.com:50002
       Oct 14, 2020 12:48:45 PM hudson.remoting.jnlp.Main$CuiListener status
       INFO: Trying protocol: JNLP4-connect
       Oct 14, 2020 12:48:45 PM hudson.remoting.jnlp.Main$CuiListener status
       INFO: Remote identity confirmed: 99:12:d8:fd:fd:ba:1f:38:a9:dc:a9:ac:87:91:96:fe
       Oct 14, 2020 12:48:46 PM hudson.remoting.jnlp.Main$CuiListener status
       INFO: Connected
       Oct 14, 2020 12:48:49 PM hudson.remoting.AbstractByteBufferCommandTransport processCommand
       WARNING: Failed to construct Command in channel JNLP4-connect connection to ####.com/#.#.#.#:50002
       java.lang.ClassNotFoundException: jenkins.util.java.ClassNotFoundNoStackTraceException
       at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
       at java.lang.Class.forName0(Native Method)
       at java.lang.Class.forName(Class.java:348)
       at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:720)
       at hudson.remoting.ObjectInputStreamEx.resolveClass(ObjectInputStreamEx.java:63)
       at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1925)
       at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1808)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2099)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1625)
       at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2344)
       at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2268)
       at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2126)
       at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1625)
       at java.io.ObjectInputStream.readObject(ObjectInputStream.java:465)
       at java.io.ObjectInputStream.readObject(ObjectInputStream.java:423)
       at hudson.remoting.Command.readFromObjectStream(Command.java:155)
       at hudson.remoting.Command.readFrom(Command.java:142)
       at hudson.remoting.AbstractByteBufferCommandTransport.processCommand(AbstractByteBufferCommandTransport.java:202)
       at hudson.remoting.AbstractByteBufferCommandTransport.receive(AbstractByteBufferCommandTransport.java:189)
       at org.jenkinsci.remoting.protocol.impl.ChannelApplicationLayer.onRead(ChannelApplicationLayer.java:187)
       at org.jenkinsci.remoting.protocol.ApplicationLayer.onRecv(ApplicationLayer.java:206)
       at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecv(ProtocolStack.java:668)
       at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.processRead(SSLEngineFilterLayer.java:369)
       at org.jenkinsci.remoting.protocol.impl.SSLEngineFilterLayer.onRecv(SSLEngineFilterLayer.java:117)
       at org.jenkinsci.remoting.protocol.ProtocolStack$Ptr.onRecv(ProtocolStack.java:668)
       at org.jenkinsci.remoting.protocol.NetworkLayer.onRead(NetworkLayer.java:136)
       at org.jenkinsci.remoting.protocol.impl.BIONetworkLayer.access$2200(BIONetworkLayer.java:48)
       at org.jenkinsci.remoting.protocol.impl.BIONetworkLayer$Reader.run(BIONetworkLayer.java:283)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
       at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:118)
       at java.lang.Thread.run(Thread.java:748)
       

        Attachments

          Issue Links

            Activity

            Hide
            jglick Jesse Glick added a comment -

            Possible this is somehow related to the well-known (to Jenkins core devs!) Servlet API class loading troubles, which I seem to recall being triggered for reasons unknown by Dockerized agents. Are you running Jenkins using the built-in executable (java -jar) or some other web app container?

            Show
            jglick Jesse Glick added a comment - Possible this is somehow related to the well-known (to Jenkins core devs!) Servlet API class loading troubles, which I seem to recall being triggered for reasons unknown by Dockerized agents. Are you running Jenkins using the built-in executable ( java -jar ) or some other web app container?
            Hide
            wgillaspy William Gillaspy added a comment -

            Not 100% sure what your asking.  The main jenkins instance where the system logs were from?  That is running the image jenkins/jenkins:latest.

            Yet another docker is running the agents with it's built in commands that it sticks in the init.sh.  It wgets the slave.jar from running  jenkins/jenkins:latest container.  I cat out the init.sh YAD uses in the comment above.

            I'm not manually starting any agents with java -jar slave.jar.  Definitely not using java -jar to start jenkins.  Just using jenkins/jenkins:latest and what ever built in magic it uses to start the application in jetty.

            Show
            wgillaspy William Gillaspy added a comment - Not 100% sure what your asking.  The main jenkins instance where the system logs were from?  That is running the image jenkins/jenkins:latest. Yet another docker is running the agents with it's built in commands that it sticks in the init.sh.  It wgets the slave.jar from running  jenkins/jenkins:latest container.  I cat out the init.sh YAD uses in the comment above. I'm not manually starting any agents with java -jar slave.jar.  Definitely not using java -jar to start jenkins.  Just using jenkins/jenkins:latest and what ever built in magic it uses to start the application in jetty.
            Hide
            jglick Jesse Glick added a comment -

            The Jenkins server image would be using java -jar. Thanks.

            Show
            jglick Jesse Glick added a comment - The Jenkins server image would be using java -jar . Thanks.
            Hide
            jjvdgeer Jan-Jaap van der Geer added a comment -

            I see the same exception in the agent's log but we're not using YAD (and our agents are VMs, not containers)

            Show
            jjvdgeer Jan-Jaap van der Geer added a comment - I see the same exception in the agent's log but we're not using YAD (and our agents are VMs, not containers)
            Hide
            wgillaspy William Gillaspy added a comment -

            2.262 looks good and resolves my issues.  Thanks for the quick turn around!

            Show
            wgillaspy William Gillaspy added a comment - 2.262 looks good and resolves my issues.  Thanks for the quick turn around!

              People

              Assignee:
              oleg_nenashev Oleg Nenashev
              Reporter:
              wgillaspy William Gillaspy
              Votes:
              2 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: