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

Old agent.jar causes JNLP agent to fail checkout with java.lang.IllegalAccessError

    Details

    • Similar Issues:

      Description

      I upgraded a few workflow plugins that were recently released, switching from the beta version of those plugins to the released versions of the plugins. After doing that, my Pipeline jobs that were performing checkout on JNLP based Windows machines failed.

      The checkouts failed on 4 different Windows 10 machines with the same stack trace:

      14:09:24 Cloning the remote Git repository
      14:09:24 Cloning the remote Git repository
      14:09:24 ERROR: Error cloning remote repo 'origin'
      14:09:24 hudson.plugins.git.GitException: java.io.IOException: Remote call on JNLP4-connect connection from 172.16.16.196/172.16.16.196:54100 failed
      14:09:24 	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:148)
      14:09:24 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      14:09:24 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      14:09:24 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      14:09:24 	at java.lang.reflect.Method.invoke(Method.java:498)
      14:09:24 	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
      14:09:24 	at com.sun.proxy.$Proxy97.execute(Unknown Source)
      14:09:24 	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1144)
      14:09:24 	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1184)
      14:09:24 	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:120)
      14:09:24 	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:90)
      14:09:24 	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:77)
      14:09:24 	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)
      14:09:24 	at hudson.security.ACL.impersonate(ACL.java:290)
      14:09:24 	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)
      14:09:24 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      14:09:24 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      14:09:24 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      14:09:24 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      14:09:24 	at java.lang.Thread.run(Thread.java:748)
      14:09:24 Caused by: java.io.IOException: Remote call on JNLP4-connect connection from 172.16.16.196/172.16.16.196:54100 failed
      14:09:24 	at hudson.remoting.Channel.call(Channel.java:961)
      14:09:24 	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
      14:09:24 	... 19 more
      14:09:24 Caused by: java.lang.IllegalAccessError: tried to access field hudson.remoting.Channel.executor from class org.jenkinsci.remoting.util.AnonymousClassWarnings
      14:09:24 	at org.jenkinsci.remoting.util.AnonymousClassWarnings.check(AnonymousClassWarnings.java:65)
      14:09:24 	at org.jenkinsci.remoting.util.AnonymousClassWarnings$1.annotateClass(AnonymousClassWarnings.java:119)
      14:09:24 	at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1290)
      14:09:24 	at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1231)
      14:09:24 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1427)
      14:09:24 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
      14:09:24 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
      14:09:24 	at hudson.console.ConsoleNote.encodeToBytes(ConsoleNote.java:185)
      14:09:24 	at hudson.console.ConsoleNote.encode(ConsoleNote.java:211)
      14:09:24 	at hudson.plugins.timestamper.TimestampNotesOutputStream.eol(TimestampNotesOutputStream.java:70)
      14:09:24 	at hudson.console.LineTransformationOutputStream.eol(LineTransformationOutputStream.java:60)
      14:09:24 	at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:56)
      14:09:24 	at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:74)
      14:09:24 	at java.io.PrintStream.write(PrintStream.java:480)
      14:09:24 	at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
      14:09:24 	at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
      14:09:24 	at sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:104)
      14:09:24 	at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:185)
      14:09:24 	at java.io.PrintStream.newLine(PrintStream.java:546)
      14:09:24 	at java.io.PrintStream.println(PrintStream.java:807)
      14:09:24 	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:595)
      14:09:24 	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:161)
      14:09:24 	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:154)
      14:09:24 	at hudson.remoting.UserRequest.perform(UserRequest.java:208)
      14:09:24 	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      14:09:24 	at hudson.remoting.Request$2.run(Request.java:360)
      14:09:24 	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      14:09:24 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      14:09:24 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      14:09:24 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      14:09:24 	at hudson.remoting.Engine$1$1.run(Engine.java:98)
      14:09:24 	... 1 more
      14:09:24 	Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from 172.16.16.196/172.16.16.196:54100
      14:09:24 		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741)
      14:09:24 		at hudson.remoting.UserResponse.retrieve(UserRequest.java:389)
      14:09:24 		at hudson.remoting.Channel.call(Channel.java:955)
      14:09:24 		at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
      14:09:24 		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      14:09:24 		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      14:09:24 		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      14:09:24 		at java.lang.reflect.Method.invoke(Method.java:498)
      14:09:24 		at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
      14:09:24 		at com.sun.proxy.$Proxy97.execute(Unknown Source)
      14:09:24 		at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1144)
      14:09:24 		at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1184)
      14:09:24 		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:120)
      14:09:24 		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:90)
      14:09:24 		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:77)
      14:09:24 		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)
      14:09:24 		at hudson.security.ACL.impersonate(ACL.java:290)
      14:09:24 		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)
      14:09:24 		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      14:09:24 		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      14:09:24 		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      14:09:24 		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      14:09:24 		... 1 more
      14:09:24 ERROR: Error cloning remote repo 'origin'
      14:09:24 hudson.plugins.git.GitException: java.io.IOException: Remote call on JNLP4-connect connection from 172.16.16.196/172.16.16.196:54100 failed
      14:09:24 	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:148)
      14:09:24 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      14:09:24 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      14:09:24 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      14:09:24 	at java.lang.reflect.Method.invoke(Method.java:498)
      14:09:24 	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
      14:09:24 	at com.sun.proxy.$Proxy97.execute(Unknown Source)
      14:09:24 	at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1144)
      14:09:24 	at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1184)
      14:09:24 	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:120)
      14:09:24 	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:90)
      14:09:24 	at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:77)
      14:09:24 	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)
      14:09:24 	at hudson.security.ACL.impersonate(ACL.java:290)
      14:09:24 	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)
      14:09:24 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      14:09:24 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      14:09:24 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      14:09:24 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      14:09:24 	at java.lang.Thread.run(Thread.java:748)
      14:09:24 Caused by: java.io.IOException: Remote call on JNLP4-connect connection from 172.16.16.196/172.16.16.196:54100 failed
      14:09:24 	at hudson.remoting.Channel.call(Channel.java:961)
      14:09:24 	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
      14:09:24 	... 19 more
      14:09:24 Caused by: java.lang.IllegalAccessError: tried to access field hudson.remoting.Channel.executor from class org.jenkinsci.remoting.util.AnonymousClassWarnings
      14:09:24 	at org.jenkinsci.remoting.util.AnonymousClassWarnings.check(AnonymousClassWarnings.java:65)
      14:09:24 	at org.jenkinsci.remoting.util.AnonymousClassWarnings$1.annotateClass(AnonymousClassWarnings.java:119)
      14:09:24 	at java.io.ObjectOutputStream.writeNonProxyDesc(ObjectOutputStream.java:1290)
      14:09:24 	at java.io.ObjectOutputStream.writeClassDesc(ObjectOutputStream.java:1231)
      14:09:24 	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1427)
      14:09:24 	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178)
      14:09:24 	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)
      14:09:24 	at hudson.console.ConsoleNote.encodeToBytes(ConsoleNote.java:185)
      14:09:24 	at hudson.console.ConsoleNote.encode(ConsoleNote.java:211)
      14:09:24 	at hudson.plugins.timestamper.TimestampNotesOutputStream.eol(TimestampNotesOutputStream.java:70)
      14:09:24 	at hudson.console.LineTransformationOutputStream.eol(LineTransformationOutputStream.java:60)
      14:09:24 	at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:56)
      14:09:24 	at hudson.console.LineTransformationOutputStream.write(LineTransformationOutputStream.java:74)
      14:09:24 	at java.io.PrintStream.write(PrintStream.java:480)
      14:09:24 	at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
      14:09:24 	at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
      14:09:24 	at sun.nio.cs.StreamEncoder.flushBuffer(StreamEncoder.java:104)
      14:09:24 	at java.io.OutputStreamWriter.flushBuffer(OutputStreamWriter.java:185)
      14:09:24 	at java.io.PrintStream.newLine(PrintStream.java:546)
      14:09:24 	at java.io.PrintStream.println(PrintStream.java:807)
      14:09:24 	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:595)
      14:09:24 	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:161)
      14:09:24 	at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:154)
      14:09:24 	at hudson.remoting.UserRequest.perform(UserRequest.java:208)
      14:09:24 	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      14:09:24 	at hudson.remoting.Request$2.run(Request.java:360)
      14:09:24 	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      14:09:24 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      14:09:24 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      14:09:24 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      14:09:24 	at hudson.remoting.Engine$1$1.run(Engine.java:98)
      14:09:24 	... 1 more
      14:09:24 	Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from 172.16.16.196/172.16.16.196:54100
      14:09:24 		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741)
      14:09:24 		at hudson.remoting.UserResponse.retrieve(UserRequest.java:389)
      14:09:24 		at hudson.remoting.Channel.call(Channel.java:955)
      14:09:24 		at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
      14:09:24 		at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      14:09:24 		at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      14:09:24 		at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      14:09:24 		at java.lang.reflect.Method.invoke(Method.java:498)
      14:09:24 		at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:132)
      14:09:24 		at com.sun.proxy.$Proxy97.execute(Unknown Source)
      14:09:24 		at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1144)
      14:09:24 		at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1184)
      14:09:24 		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:120)
      14:09:24 		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:90)
      14:09:24 		at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:77)
      14:09:24 		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:50)
      14:09:24 		at hudson.security.ACL.impersonate(ACL.java:290)
      14:09:24 		at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:47)
      14:09:24 		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      14:09:24 		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      14:09:24 		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      14:09:24 		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      14:09:24 		... 1 more
      

      The problem on all 4 machines was an outdated agent.jar file. When I use the agent.jar file that is included with Jenkins 2.138.2, it works correctly.

        Attachments

          Issue Links

            Activity

            Hide
            markewaite Mark Waite added a comment -

            Older agent.jar and slave.jar files running on the agent machine were the root cause of this problem. Once I updated the agent.jar to the version included with Jenkins 2.138.2, the jobs completed successfully.

            Show
            markewaite Mark Waite added a comment - Older agent.jar and slave.jar files running on the agent machine were the root cause of this problem. Once I updated the agent.jar to the version included with Jenkins 2.138.2, the jobs completed successfully.
            Hide
            jglick Jesse Glick added a comment -

            JENKINS-55257 has more discussion (though this Summary is perhaps more helpful).

            Show
            jglick Jesse Glick added a comment - JENKINS-55257 has more discussion (though this Summary is perhaps more helpful).

              People

              • Assignee:
                Unassigned
                Reporter:
                markewaite Mark Waite
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: