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

Failed to load jenkins.util.SystemProperties on slaves due to ServletContext

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: core
    • Labels:
    • Environment:
      jenkins-2.6+
    • Similar Issues:

      Description

      Credits to Vladimir Konnov for discovering it. Impact is unclear.

      RingBufferLogHandler is beig used on the slaves side (LOG_HOLDER). SlaveInitializer writes to logs and invokes logic leading to SystemProperties usage. ServletContext class cannot be serialized at that point.

      Cause:

      private static final int DEFAULT_RING_BUFFER_SIZE = SystemProperties.getInteger(RingBufferLogHandler.class.getName() + ".defaultSize", Integer.valueOf(256)).intValue();
      

      Log:

      <===[JENKINS REMOTING CAPACITY]===>channel started
      
      Slave.jar version: 2.59
      
      This is a Unix agent
      
      ERROR: Unable to launch the agent for jenkins-pipline-13
      java.io.IOException: Remote call on jenkins-pipline-13 failed
      	at hudson.remoting.Channel.call(Channel.java:789)
      	at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:536)
      	at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:381)
      	at hudson.slaves.CommandLauncher.launch(CommandLauncher.java:131)
      	at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:253)
      	at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
      	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)
      Caused by: java.lang.LinkageError: Failed to load jenkins.util.SystemProperties
      	at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:342)
      	at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:251)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      	at hudson.util.RingBufferLogHandler.<clinit>(RingBufferLogHandler.java:39)
      	at hudson.slaves.SlaveComputer$LogHolder.<clinit>(SlaveComputer.java:799)
      	at hudson.slaves.SlaveComputer$SlaveInitializer.call(SlaveComputer.java:808)
      	at hudson.slaves.SlaveComputer$SlaveInitializer.call(SlaveComputer.java:802)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:152)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
      	at hudson.remoting.Request$2.run(Request.java:332)
      	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 jenkins-pipline-13(Native Method)
      	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
      	at hudson.remoting.UserResponse.retrieve(UserRequest.java:252)
      	at hudson.remoting.Channel.call(Channel.java:781)
      	... 9 more
      Caused by: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
      	at java.lang.ClassLoader.defineClass1(Native Method)
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:642)
      	at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:338)
      	at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:251)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      	at hudson.util.RingBufferLogHandler.<clinit>(RingBufferLogHandler.java:39)
      	at hudson.slaves.SlaveComputer$LogHolder.<clinit>(SlaveComputer.java:799)
      	at hudson.slaves.SlaveComputer$SlaveInitializer.call(SlaveComputer.java:808)
      	at hudson.slaves.SlaveComputer$SlaveInitializer.call(SlaveComputer.java:802)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:152)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
      	at hudson.remoting.Request$2.run(Request.java:332)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	... 4 more
      Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContextListener
      	at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch(RemoteClassLoader.java:724)
      	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:498)
      	at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:884)
      	at hudson.remoting.Request$2.run(Request.java:332)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at org.jenkinsci.remoting.CallableDecorator.call(CallableDecorator.java:18)
      	at hudson.remoting.CallableDecoratorList$1.call(CallableDecoratorList.java:21)
      	at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
      	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 channel(Native Method)
      	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
      	at hudson.remoting.Request.call(Request.java:172)
      	at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:252)
      	at com.sun.proxy.$Proxy5.fetch(Unknown Source)
      	at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:259)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      	... 19 more
      
      ERROR: Connection terminated
      java.io.IOException: Unexpected termination of the channel
      	at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:50)
      Caused by: java.io.EOFException
      	at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2353)
      	at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2822)
      	at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804)
      	at java.io.ObjectInputStream.<init>(ObjectInputStream.java:301)
      	at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48)
      	at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
      	at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)
      ERROR: Process terminated with exit code 143
      

        Attachments

          Issue Links

            Activity

            oleg_nenashev Oleg Nenashev created issue -
            oleg_nenashev Oleg Nenashev made changes -
            Field Original Value New Value
            Status Open [ 1 ] In Progress [ 3 ]
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            I was able to reproduce it only by manually blacklisting the javax.servlet.ServletContextListener class in remoting.
            Otherwise the gets successfully serialized to slaves in my case

            Show
            oleg_nenashev Oleg Nenashev added a comment - I was able to reproduce it only by manually blacklisting the javax.servlet.ServletContextListener class in remoting. Otherwise the gets successfully serialized to slaves in my case
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            ServletContextListener is available starting from javax.servlet-api-2.3 only. My guess would be that there is a conflicting library on slave, which has another version of the lib

            Show
            oleg_nenashev Oleg Nenashev added a comment - ServletContextListener is available starting from javax.servlet-api-2.3 only. My guess would be that there is a conflicting library on slave, which has another version of the lib
            danielbeck Daniel Beck made changes -
            Comment [ Servlet classes are not available on slaves. ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 171407 ] JNJira + In-Review [ 185752 ]
            Hide
            david_resnick David Resnick added a comment -

            The impact of this bug is that Jenkins 2.x doesn't work with the JClouds plugin, which provisions slaves on CloudStack.
            This is blocking our upgrade to Jenkins 2.x.

            Show
            david_resnick David Resnick added a comment - The impact of this bug is that Jenkins 2.x doesn't work with the JClouds plugin, which provisions slaves on CloudStack. This is blocking our upgrade to Jenkins 2.x.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            CC Andrew Bayer. Likely the plugin does not shade this API... Or not.
            Maybe we need a fix in the core in order to make the implementation more robust

            Show
            oleg_nenashev Oleg Nenashev added a comment - CC Andrew Bayer . Likely the plugin does not shade this API... Or not. Maybe we need a fix in the core in order to make the implementation more robust
            Hide
            ndeloof Nicolas De Loof added a comment - - edited

            I get this exact same error with https://github.com/ndeloof/hyper-slaves-plugin/tree/JENKINS-35184. I don't get this error running on 1.625

            Show
            ndeloof Nicolas De Loof added a comment - - edited I get this exact same error with https://github.com/ndeloof/hyper-slaves-plugin/tree/JENKINS-35184 . I don't get this error running on 1.625
            Hide
            magnayn magnayn added a comment -

            I have this error too (Jenkins 2.7)
            Slave is evargas/jenkins-slave docker image (1.7.0_101), master is 1.8.

            [09/10/16 16:52:18] [SSH] Starting slave process: cd "/home/jenkins" && java -jar slave.jar
            <===[JENKINS REMOTING CAPACITY]===>channel started
            Slave.jar version: 2.59
            This is a Unix agent
            java.io.IOException: Remote call on docker-cb0efbf57eef failed
            at hudson.remoting.Channel.call(Channel.java:789)
            at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:536)
            at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:381)
            at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:901)
            at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:126)
            at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:658)
            at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:642)
            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)
            Caused by: java.lang.LinkageError: Failed to load jenkins.util.SystemProperties
            at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:342)
            at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:251)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
            at hudson.util.RingBufferLogHandler.<clinit>(RingBufferLogHandler.java:39)
            at hudson.slaves.SlaveComputer$LogHolder.<clinit>(SlaveComputer.java:799)
            at hudson.slaves.SlaveComputer$SlaveInitializer.call(SlaveComputer.java:808)
            at hudson.slaves.SlaveComputer$SlaveInitializer.call(SlaveComputer.java:802)
            at hudson.remoting.UserRequest.perform(UserRequest.java:152)
            at hudson.remoting.UserRequest.perform(UserRequest.java:50)
            at hudson.remoting.Request$2.run(Request.java:332)
            at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
            at java.util.concurrent.FutureTask.run(FutureTask.java:262)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
            at java.lang.Thread.run(Thread.java:745)
            at ......remote call to docker-cb0efbf57eef(Native Method)
            at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
            at hudson.remoting.UserResponse.retrieve(UserRequest.java:252)
            at hudson.remoting.Channel.call(Channel.java:781)
            ... 10 more
            Caused by: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
            at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:338)
            at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:251)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
            at hudson.util.RingBufferLogHandler.<clinit>(RingBufferLogHandler.java:39)
            at hudson.slaves.SlaveComputer$LogHolder.<clinit>(SlaveComputer.java:799)
            at hudson.slaves.SlaveComputer$SlaveInitializer.call(SlaveComputer.java:808)
            at hudson.slaves.SlaveComputer$SlaveInitializer.call(SlaveComputer.java:802)
            at hudson.remoting.UserRequest.perform(UserRequest.java:152)
            at hudson.remoting.UserRequest.perform(UserRequest.java:50)
            at hudson.remoting.Request$2.run(Request.java:332)
            at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
            at java.util.concurrent.FutureTask.run(FutureTask.java:262)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
            ... 1 more
            Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContextListener
            at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch(RemoteClassLoader.java:724)
            at sun.reflect.GeneratedMethodAccessor315.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:884)
            at hudson.remoting.Request$2.run(Request.java:332)
            at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
            at org.jenkinsci.remoting.CallableDecorator.call(CallableDecorator.java:18)
            at hudson.remoting.CallableDecoratorList$1.call(CallableDecoratorList.java:21)
            at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
            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 channel(Native Method)
            at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
            at hudson.remoting.Request.call(Request.java:172)
            at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:252)
            at com.sun.proxy.$Proxy5.fetch(Unknown Source)
            at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:259)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
            ... 19 more
            [09/10/16 16:53:49] [SSH] Connection closed.
            [09/10/16 16:53:49] Launch failed - cleaning up connection
            ERROR: Connection terminated
            java.io.IOException: Unexpected termination of the channel
            at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:50)
            Caused by: java.io.EOFException
            at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2353)
            at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2822)
            at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804)
            at java.io.ObjectInputStream.<init>(ObjectInputStream.java:301)
            at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48)
            at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
            at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)
            ERROR: [09/10/16 16:53:49] agent was terminated
            java.io.IOException: Unexpected termination of the channel
            at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:50)
            Caused by: java.io.EOFException
            at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2353)
            at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2822)
            at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804)
            at java.io.ObjectInputStream.<init>(ObjectInputStream.java:301)
            at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48)
            at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34)
            at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)

            Show
            magnayn magnayn added a comment - I have this error too (Jenkins 2.7) Slave is evargas/jenkins-slave docker image (1.7.0_101), master is 1.8. [09/10/16 16:52:18] [SSH] Starting slave process: cd "/home/jenkins" && java -jar slave.jar <=== [JENKINS REMOTING CAPACITY] ===>channel started Slave.jar version: 2.59 This is a Unix agent java.io.IOException: Remote call on docker-cb0efbf57eef failed at hudson.remoting.Channel.call(Channel.java:789) at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:536) at hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:381) at hudson.plugins.sshslaves.SSHLauncher.startSlave(SSHLauncher.java:901) at hudson.plugins.sshslaves.SSHLauncher.access$400(SSHLauncher.java:126) at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:658) at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:642) 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) Caused by: java.lang.LinkageError: Failed to load jenkins.util.SystemProperties at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:342) at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:251) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at hudson.util.RingBufferLogHandler.<clinit>(RingBufferLogHandler.java:39) at hudson.slaves.SlaveComputer$LogHolder.<clinit>(SlaveComputer.java:799) at hudson.slaves.SlaveComputer$SlaveInitializer.call(SlaveComputer.java:808) at hudson.slaves.SlaveComputer$SlaveInitializer.call(SlaveComputer.java:802) at hudson.remoting.UserRequest.perform(UserRequest.java:152) at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:332) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) at ......remote call to docker-cb0efbf57eef(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416) at hudson.remoting.UserResponse.retrieve(UserRequest.java:252) at hudson.remoting.Channel.call(Channel.java:781) ... 10 more Caused by: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:803) at java.lang.ClassLoader.defineClass(ClassLoader.java:643) at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:338) at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:251) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at hudson.util.RingBufferLogHandler.<clinit>(RingBufferLogHandler.java:39) at hudson.slaves.SlaveComputer$LogHolder.<clinit>(SlaveComputer.java:799) at hudson.slaves.SlaveComputer$SlaveInitializer.call(SlaveComputer.java:808) at hudson.slaves.SlaveComputer$SlaveInitializer.call(SlaveComputer.java:802) at hudson.remoting.UserRequest.perform(UserRequest.java:152) at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:332) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ... 1 more Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContextListener at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch(RemoteClassLoader.java:724) at sun.reflect.GeneratedMethodAccessor315.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:884) at hudson.remoting.Request$2.run(Request.java:332) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at org.jenkinsci.remoting.CallableDecorator.call(CallableDecorator.java:18) at hudson.remoting.CallableDecoratorList$1.call(CallableDecoratorList.java:21) at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) 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 channel(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416) at hudson.remoting.Request.call(Request.java:172) at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:252) at com.sun.proxy.$Proxy5.fetch(Unknown Source) at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:259) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 19 more [09/10/16 16:53:49] [SSH] Connection closed. [09/10/16 16:53:49] Launch failed - cleaning up connection ERROR: Connection terminated java.io.IOException: Unexpected termination of the channel at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:50) Caused by: java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2353) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2822) at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804) at java.io.ObjectInputStream.<init>(ObjectInputStream.java:301) at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48) at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48) ERROR: [09/10/16 16:53:49] agent was terminated java.io.IOException: Unexpected termination of the channel at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:50) Caused by: java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2353) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2822) at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:804) at java.io.ObjectInputStream.<init>(ObjectInputStream.java:301) at hudson.remoting.ObjectInputStreamEx.<init>(ObjectInputStreamEx.java:48) at hudson.remoting.AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:34) at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)
            magnayn magnayn made changes -
            Priority Critical [ 2 ] Blocker [ 1 ]
            Hide
            magnayn magnayn added a comment -

            So I'm seeing this in mvn hpi:run but not in running the jenkins war.

            doing dependency:tree on the plugin shows this:

            [INFO] +- javax.servlet:javax.servlet-api:jar:3.1.0:test
            [INFO] +- javax.servlet:servlet-api:jar:2.4:provided

            So it looks like both are being included

            Show
            magnayn magnayn added a comment - So I'm seeing this in mvn hpi:run but not in running the jenkins war. doing dependency:tree on the plugin shows this: [INFO] +- javax.servlet:javax.servlet-api:jar:3.1.0:test [INFO] +- javax.servlet:servlet-api:jar:2.4:provided So it looks like both are being included
            Hide
            ydubreuil Yoann Dubreuil added a comment -

            I'm hitting this issue too while developing on docker-slaves plugin (only with mvn hpi:run). magnayn I also have both dependencies but javax.servlet:servlet-api:jar:2.4 is provided so it's not used in the running process. I checked the open files descriptor and it's not open.

            Show
            ydubreuil Yoann Dubreuil added a comment - I'm hitting this issue too while developing on docker-slaves plugin (only with mvn hpi:run). magnayn I also have both dependencies but javax.servlet:servlet-api:jar:2.4 is provided so it's not used in the running process. I checked the open files descriptor and it's not open.
            Hide
            ydubreuil Yoann Dubreuil added a comment -

            I've made a fix proposal here https://github.com/jenkinsci/jenkins/pull/2551

            Show
            ydubreuil Yoann Dubreuil added a comment - I've made a fix proposal here https://github.com/jenkinsci/jenkins/pull/2551
            Hide
            jglick Jesse Glick added a comment -

            Implementing JENKINS-26677 would probably have made this bug immediately apparent, perhaps in core functional tests.

            Show
            jglick Jesse Glick added a comment - Implementing JENKINS-26677 would probably have made this bug immediately apparent, perhaps in core functional tests.
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-26677 [ JENKINS-26677 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Yoann Dubreuil
            Path:
            core/src/main/java/hudson/WebAppMain.java
            core/src/main/java/hudson/slaves/SlaveComputer.java
            core/src/main/java/hudson/util/RingBufferLogHandler.java
            core/src/main/java/jenkins/util/SystemProperties.java
            http://jenkins-ci.org/commit/jenkins/27d9b73ef4434de0000007c35352dfe48a08c751
            Log:
            JENKINS-35184 Servlet API dependent bits in a inner-class (#2551)

            This is in order to avoid loading ServletContextListener class
            from slaves classloader.

            • JENKINS-35184 Don't use SystemProperties while initializing remote agents

            This rolls back the previous commit and introduces a new way to construct
            RingBufferLogHandler which avoids relying on SystemProperties to get the
            default size.

            Adding `OnMaster` annotation does not prevent the class from being
            loaded on remote agent but it gives a hint that this class should not
            be used on a remote agent.

            In the previous code cleaning existing log handlers, SLAVE_LOG_HANDLER
            is always null, as static fields are scoped by classloader.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Yoann Dubreuil Path: core/src/main/java/hudson/WebAppMain.java core/src/main/java/hudson/slaves/SlaveComputer.java core/src/main/java/hudson/util/RingBufferLogHandler.java core/src/main/java/jenkins/util/SystemProperties.java http://jenkins-ci.org/commit/jenkins/27d9b73ef4434de0000007c35352dfe48a08c751 Log: JENKINS-35184 Servlet API dependent bits in a inner-class (#2551) JENKINS-35184 Servlet API dependent bits in a inner-class This is in order to avoid loading ServletContextListener class from slaves classloader. JENKINS-35184 Don't use SystemProperties while initializing remote agents This rolls back the previous commit and introduces a new way to construct RingBufferLogHandler which avoids relying on SystemProperties to get the default size. JENKINS-35184 Mark SystemProperties as OnMaster only class Adding `OnMaster` annotation does not prevent the class from being loaded on remote agent but it gives a hint that this class should not be used on a remote agent. JENKINS-35184 Set SLAVE_LOG_HANDLER at the very beginning In the previous code cleaning existing log handlers, SLAVE_LOG_HANDLER is always null, as static fields are scoped by classloader.
            Show
            danielbeck Daniel Beck added a comment - Fixed by https://github.com/jenkinsci/jenkins/pull/2551 Yoann Dubreuil FYI https://wiki.jenkins-ci.org/display/JENKINS/Beginners+Guide+to+Contributing#BeginnersGuidetoContributing-CommitMessages
            danielbeck Daniel Beck made changes -
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Resolved [ 5 ]
            david_resnick David Resnick made changes -
            Labels lts-candidate
            olivergondza Oliver Gond┼ża made changes -
            Labels lts-candidate 2.19.2-fixed
            Hide
            robert Robert Klaus added a comment -

            We have the same failure but on our master (so not on a slave). We did an update to 2.19.2 but that didn't help. The problem hits us daily on different buildjobs without a clear pattern. A Jenkins restart helps.

            I'm not sure if this actually is an issue on its own, but given we have nearly the same stacktrace I guess it is related to this.

            java.io.IOException: Remote call on Channel to Maven [/opt/jdk1.8.0_112/bin/java, -cp, /opt/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven33-agent-1.8.1.jar:/opt/apache-maven-3.3.9/boot/plexus-classworlds-2.5.2.jar:/opt/apache-maven-3.3.9/conf/logging, jenkins.maven3.agent.Maven33Main, /opt/apache-maven-3.3.9, /var/cache/jenkins/war/WEB-INF/lib/remoting-2.62.jar, /opt/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven33-interceptor-1.8.1.jar, /opt/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.8.1.jar, 36506] failed
            	at hudson.remoting.Channel.call(Channel.java:805)
            	at hudson.maven.ProcessCache$MavenProcess.call(ProcessCache.java:161)
            	at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:873)
            	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
            	at hudson.model.Run.execute(Run.java:1720)
            	at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544)
            	at hudson.model.ResourceController.execute(ResourceController.java:98)
            	at hudson.model.Executor.run(Executor.java:404)
            Caused by: java.lang.LinkageError: Failed to load jenkins.util.SystemProperties
            	at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:377)
            	at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:285)
            	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
            	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
            	at hudson.Main.<clinit>(Main.java:222)
            	at hudson.EnvVars.initMaster(EnvVars.java:432)
            	at hudson.EnvVars.<clinit>(EnvVars.java:427)
            	at java.io.ObjectStreamClass.hasStaticInitializer(Native Method)
            	at java.io.ObjectStreamClass.computeDefaultSUID(ObjectStreamClass.java:1787)
            	at java.io.ObjectStreamClass.access$100(ObjectStreamClass.java:72)
            	at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:253)
            	at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:251)
            	at java.security.AccessController.doPrivileged(Native Method)
            	at java.io.ObjectStreamClass.getSerialVersionUID(ObjectStreamClass.java:250)
            	at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:611)
            	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1630)
            	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1521)
            	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1781)
            	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
            	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018)
            	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942)
            	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
            	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
            	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373)
            	at hudson.remoting.UserRequest.deserialize(UserRequest.java:217)
            	at hudson.remoting.UserRequest.perform(UserRequest.java:131)
            	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
            	at hudson.remoting.Request$2.run(Request.java:332)
            	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 Channel to Maven [/opt/jdk1.8.0_112/bin/java, -cp, /opt/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven33-agent-1.8.1.jar:/opt/apache-maven-3.3.9/boot/plexus-classworlds-2.5.2.jar:/opt/apache-maven-3.3.9/conf/logging, jenkins.maven3.agent.Maven33Main, /opt/apache-maven-3.3.9, /var/cache/jenkins/war/WEB-INF/lib/remoting-2.62.jar, /opt/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven33-interceptor-1.8.1.jar, /opt/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.8.1.jar, 36506](Native Method)
            	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1433)
            	at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
            	at hudson.remoting.Channel.call(Channel.java:797)
            	... 7 more
            Caused by: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
            	at java.lang.ClassLoader.defineClass1(Native Method)
            	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
            	at java.lang.ClassLoader.defineClass(ClassLoader.java:642)
            	at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:373)
            	at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:285)
            	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
            	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
            	at hudson.Main.<clinit>(Main.java:222)
            	at hudson.EnvVars.initMaster(EnvVars.java:432)
            	at hudson.EnvVars.<clinit>(EnvVars.java:427)
            	at java.io.ObjectStreamClass.hasStaticInitializer(Native Method)
            	at java.io.ObjectStreamClass.computeDefaultSUID(ObjectStreamClass.java:1787)
            	at java.io.ObjectStreamClass.access$100(ObjectStreamClass.java:72)
            	at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:253)
            	at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:251)
            	at java.security.AccessController.doPrivileged(Native Method)
            	at java.io.ObjectStreamClass.getSerialVersionUID(ObjectStreamClass.java:250)
            	at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:611)
            	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1630)
            	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1521)
            	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1781)
            	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
            	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018)
            	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942)
            	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808)
            	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353)
            	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373)
            	at hudson.remoting.UserRequest.deserialize(UserRequest.java:217)
            	at hudson.remoting.UserRequest.perform(UserRequest.java:131)
            	at hudson.remoting.UserRequest.perform(UserRequest.java:50)
            	at hudson.remoting.Request$2.run(Request.java:332)
            	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)
            Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContextListener (java.net.URLClassLoader@3f99bd52 did not find class file)
            	at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch2(RemoteClassLoader.java:792)
            	at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch4(RemoteClassLoader.java:842)
            	at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch3(RemoteClassLoader.java:849)
            	at sun.reflect.GeneratedMethodAccessor208.invoke(Unknown Source)
            	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            	at java.lang.reflect.Method.invoke(Method.java:498)
            	at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:887)
            	at hudson.remoting.Request$2.run(Request.java:332)
            	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
            	at org.jenkinsci.remoting.CallableDecorator.call(CallableDecorator.java:18)
            	at hudson.remoting.CallableDecoratorList$1.call(CallableDecoratorList.java:21)
            	at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
            	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 channel(Native Method)
            	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1433)
            	at hudson.remoting.Request.call(Request.java:172)
            	at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:255)
            	at com.sun.proxy.$Proxy2.fetch3(Unknown Source)
            	at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:187)
            	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
            	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
            	... 36 more
            
            Show
            robert Robert Klaus added a comment - We have the same failure but on our master (so not on a slave). We did an update to 2.19.2 but that didn't help. The problem hits us daily on different buildjobs without a clear pattern. A Jenkins restart helps. I'm not sure if this actually is an issue on its own, but given we have nearly the same stacktrace I guess it is related to this. java.io.IOException: Remote call on Channel to Maven [/opt/jdk1.8.0_112/bin/java, -cp, /opt/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven33-agent-1.8.1.jar:/opt/apache-maven-3.3.9/boot/plexus-classworlds-2.5.2.jar:/opt/apache-maven-3.3.9/conf/logging, jenkins.maven3.agent.Maven33Main, /opt/apache-maven-3.3.9, /var/cache/jenkins/war/WEB-INF/lib/remoting-2.62.jar, /opt/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven33-interceptor-1.8.1.jar, /opt/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.8.1.jar, 36506] failed at hudson.remoting.Channel.call(Channel.java:805) at hudson.maven.ProcessCache$MavenProcess.call(ProcessCache.java:161) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:873) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534) at hudson.model.Run.execute(Run.java:1720) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:544) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:404) Caused by: java.lang.LinkageError: Failed to load jenkins.util.SystemProperties at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:377) at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:285) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at hudson.Main.<clinit>(Main.java:222) at hudson.EnvVars.initMaster(EnvVars.java:432) at hudson.EnvVars.<clinit>(EnvVars.java:427) at java.io.ObjectStreamClass.hasStaticInitializer(Native Method) at java.io.ObjectStreamClass.computeDefaultSUID(ObjectStreamClass.java:1787) at java.io.ObjectStreamClass.access$100(ObjectStreamClass.java:72) at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:253) at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:251) at java.security.AccessController.doPrivileged(Native Method) at java.io.ObjectStreamClass.getSerialVersionUID(ObjectStreamClass.java:250) at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:611) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1630) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1521) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1781) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373) at hudson.remoting.UserRequest.deserialize(UserRequest.java:217) at hudson.remoting.UserRequest.perform(UserRequest.java:131) at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:332) 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 Channel to Maven [/opt/jdk1.8.0_112/bin/java, -cp, /opt/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven33-agent-1.8.1.jar:/opt/apache-maven-3.3.9/boot/plexus-classworlds-2.5.2.jar:/opt/apache-maven-3.3.9/conf/logging, jenkins.maven3.agent.Maven33Main, /opt/apache-maven-3.3.9, /var/cache/jenkins/war/WEB-INF/lib/remoting-2.62.jar, /opt/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven33-interceptor-1.8.1.jar, /opt/jenkins/home/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.8.1.jar, 36506](Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1433) at hudson.remoting.UserResponse.retrieve(UserRequest.java:253) at hudson.remoting.Channel.call(Channel.java:797) ... 7 more Caused by: java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:763) at java.lang.ClassLoader.defineClass(ClassLoader.java:642) at hudson.remoting.RemoteClassLoader.loadClassFile(RemoteClassLoader.java:373) at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:285) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) at hudson.Main.<clinit>(Main.java:222) at hudson.EnvVars.initMaster(EnvVars.java:432) at hudson.EnvVars.<clinit>(EnvVars.java:427) at java.io.ObjectStreamClass.hasStaticInitializer(Native Method) at java.io.ObjectStreamClass.computeDefaultSUID(ObjectStreamClass.java:1787) at java.io.ObjectStreamClass.access$100(ObjectStreamClass.java:72) at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:253) at java.io.ObjectStreamClass$1.run(ObjectStreamClass.java:251) at java.security.AccessController.doPrivileged(Native Method) at java.io.ObjectStreamClass.getSerialVersionUID(ObjectStreamClass.java:250) at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:611) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1630) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1521) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1781) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2018) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1942) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1808) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1353) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:373) at hudson.remoting.UserRequest.deserialize(UserRequest.java:217) at hudson.remoting.UserRequest.perform(UserRequest.java:131) at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:332) 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) Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContextListener (java.net.URLClassLoader@3f99bd52 did not find class file) at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch2(RemoteClassLoader.java:792) at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch4(RemoteClassLoader.java:842) at hudson.remoting.RemoteClassLoader$ClassLoaderProxy.fetch3(RemoteClassLoader.java:849) at sun.reflect.GeneratedMethodAccessor208.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:887) at hudson.remoting.Request$2.run(Request.java:332) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at org.jenkinsci.remoting.CallableDecorator.call(CallableDecorator.java:18) at hudson.remoting.CallableDecoratorList$1.call(CallableDecoratorList.java:21) at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46) 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 channel(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1433) at hudson.remoting.Request.call(Request.java:172) at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:255) at com.sun.proxy.$Proxy2.fetch3(Unknown Source) at hudson.remoting.RemoteClassLoader.findClass(RemoteClassLoader.java:187) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 36 more
            Hide
            ydubreuil Yoann Dubreuil added a comment -

            Yes, it is related. It seems that a plugin is trying to use SystemProperties from a slave. Unfortunately, the stacktrace doesn't contain enough information to pinpoint which plugin causes this.

            To get you some context, the fix which went to 2.19.2 changes the way the slave initializer get the ringBufferSize property in order to not use SystemProperties from a slave, because it's not legal (which is why the patched also added OnMaster marker to SystemProperties class)

            Show
            ydubreuil Yoann Dubreuil added a comment - Yes, it is related. It seems that a plugin is trying to use SystemProperties from a slave. Unfortunately, the stacktrace doesn't contain enough information to pinpoint which plugin causes this. To get you some context, the fix which went to 2.19.2 changes the way the slave initializer get the ringBufferSize property in order to not use SystemProperties from a slave, because it's not legal (which is why the patched also added OnMaster marker to SystemProperties class)
            Hide
            robert Robert Klaus added a comment -

            Thanks for the info. We also suspected a plugin but are a bit lost figuring out which one causes this. Is there a log where this might be found?

            Show
            robert Robert Klaus added a comment - Thanks for the info. We also suspected a plugin but are a bit lost figuring out which one causes this. Is there a log where this might be found?
            Hide
            ydubreuil Yoann Dubreuil added a comment -

            Not that I know of. To find which plugin it is, you will need to find the class which triggers the load on the slave. Turning classloading logs on a slave might help or remoting layer logs.

            Show
            ydubreuil Yoann Dubreuil added a comment - Not that I know of. To find which plugin it is, you will need to find the class which triggers the load on the slave. Turning classloading logs on a slave might help or remoting layer logs.
            Hide
            danielbeck Daniel Beck added a comment -

            This is the remoting channel Jenkins uses to attach to a Maven Project build.

            Don't use the Maven project type. It's evil.

            Show
            danielbeck Daniel Beck added a comment - This is the remoting channel Jenkins uses to attach to a Maven Project build. Don't use the Maven project type. It's evil.
            robert Robert Klaus made changes -
            Link This issue relates to JENKINS-39669 [ JENKINS-39669 ]

              People

              Assignee:
              oleg_nenashev Oleg Nenashev
              Reporter:
              oleg_nenashev Oleg Nenashev
              Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: