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

java.io.IOException: Remote call on JNLP4-connect connection failed

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • git-client-plugin
    • None
    • Jenkins version 2.73.2
      swarm client version 3.6
      Using Java 8
      OS: mixed Ubuntu 12.04 and CentOS7
      Jenkins client are physical machines

      We are using Jenkins version 2.73.2 and connected all the Jenkins slaves using Jenkins swarm client version 3.6. We are getting the below error while running a pipeline.

       

       

      java.lang.NoClassDefFoundError: Could not initialize class hudson.util.Secret
          at sun.misc.Unsafe.ensureClassInitialized(Native Method)
          at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
          at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:142)
          at java.lang.reflect.Field.acquireFieldAccessor(Field.java:1088)
          at java.lang.reflect.Field.getFieldAccessor(Field.java:1069)
          at java.lang.reflect.Field.getLong(Field.java:611)
          at java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1707)
          at java.io.ObjectStreamClass.access$700(ObjectStreamClass.java:72)
          at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:484)
          at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:472)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:472)
          at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:369)
          at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:598)
          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.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.readArray(ObjectInputStream.java:1714)
          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
          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:275)
          at hudson.remoting.UserRequest.perform(UserRequest.java:186)
          at hudson.remoting.UserRequest.perform(UserRequest.java:54)
          at hudson.remoting.Request$2.run(Request.java:360)
          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 hudson.remoting.Engine$1$1.run(Engine.java:98)
          at java.lang.Thread.run(Thread.java:745)
          at ......remote call to JNLP4-connect connection from slave1/192.168.1.25:44581(Native Method)
          at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1654)
          at hudson.remoting.UserResponse.retrieve(UserRequest.java:311)
          at hudson.remoting.Channel.call(Channel.java:905)
      Caused: java.io.IOException: Remote call on JNLP4-connect connection from slave1/192.168.1.25:44581 failed
          at hudson.remoting.Channel.call(Channel.java:913)
          at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:257)
      Caused: hudson.remoting.RemotingSystemException
          at hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:273)
          at com.sun.proxy.$Proxy115.addCredentials(Unknown Source)
          at org.jenkinsci.plugins.gitclient.RemoteGitImpl.addCredentials(RemoteGitImpl.java:200)
          at hudson.plugins.git.GitSCM.createClient(GitSCM.java:771)
          at hudson.plugins.git.GitSCM.createClient(GitSCM.java:747)
          at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1109)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:113)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:85)
          at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:75)
          at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
          at hudson.security.ACL.impersonate(ACL.java:260)
          at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:748)
      Finished: FAILURE

          [JENKINS-48200] java.io.IOException: Remote call on JNLP4-connect connection failed

          Rajasekar Ramasamy created issue -
          Oleg Nenashev made changes -
          Component/s Original: pipeline [ 21692 ]
          Oleg Nenashev made changes -
          Assignee Original: Kohsuke Kawaguchi [ kohsuke ] New: Oleg Nenashev [ oleg_nenashev ]

          Oleg Nenashev added a comment -

          FYI markewaite. I need some time to dig into, I am not 100% sure it's a Remoting issue so far. Not sure why we serialize Secrets over the channel in the Git Client lugin

          Oleg Nenashev added a comment - FYI markewaite . I need some time to dig into, I am not 100% sure it's a Remoting issue so far. Not sure why we serialize Secrets over the channel in the Git Client lugin
          Oleg Nenashev made changes -
          Component/s New: git-client-plugin [ 17423 ]

          Mark Waite added a comment -

          oleg_nenashev I don't know how the git client plugin can invoke command line git on the agent using secrets provided from the Jenkins master unless the secrets are serialized and sent to the agent for use. Is there another technique that I missed?

          Mark Waite added a comment - oleg_nenashev I don't know how the git client plugin can invoke command line git on the agent using secrets provided from the Jenkins master unless the secrets are serialized and sent to the agent for use. Is there another technique that I missed?

          Oleg Nenashev added a comment -

          markewaite See https://github.com/jenkinsci/git-client-plugin/blob/4dfc9368a7ce65bbb91294c22a0cd439fa7f77ea/src/main/java/org/jenkinsci/plugins/gitclient/RemoteGitImpl.java#L200. This call explicitly calls addCredentials() on an exported object of GitClient. Git Client uses a custom CommandInvocationHandler implementation for it, but it still causes an RPC call and makes the entire Credentials object to be serialized over the channel if I understand the code.

          Oleg Nenashev added a comment - markewaite See https://github.com/jenkinsci/git-client-plugin/blob/4dfc9368a7ce65bbb91294c22a0cd439fa7f77ea/src/main/java/org/jenkinsci/plugins/gitclient/RemoteGitImpl.java#L200 . This call explicitly calls addCredentials() on an exported object of GitClient. Git Client uses a custom CommandInvocationHandler implementation for it, but it still causes an RPC call and makes the entire Credentials object to be serialized over the channel if I understand the code.
          Oleg Nenashev made changes -
          Component/s Original: remoting [ 15489 ]
          Component/s Original: swarm-plugin [ 15741 ]
          Oleg Nenashev made changes -
          Assignee Original: Oleg Nenashev [ oleg_nenashev ] New: Mark Waite [ markewaite ]

          Oleg Nenashev added a comment -

          From what I see Remoting and Swarm client are fine. From what I see Git Plugin just should not send Credentials types with Secrets over Remoting.

          Oleg Nenashev added a comment - From what I see Remoting and Swarm client are fine. From what I see Git Plugin just should not send Credentials types with Secrets over Remoting.

            Unassigned Unassigned
            rengan Rajasekar Ramasamy
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: