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

InvalidClassException for SSHAuthenticator$1 when doing a git clone on an AIX slave

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • ssh-credentials-plugin
    • None

    Description

      Attempting to clone a git repo at the start of a build on an AIX slave.
      This exception was triggered:

      FATAL: Failed to fetch from ssh://<gitid>@<githost>/<gitrepo>.git
      hudson.plugins.git.GitException: Failed to fetch from ssh://<gitid>@<githost>/<gitrepo>.git
         at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:623)
         at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:855)
         at hudson.plugins.git.GitSCM.checkout(GitSCM.java:880)
         at hudson.model.AbstractProject.checkout(AbstractProject.java:1411)
         at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652)
         at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
         at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:561)
         at hudson.model.Run.execute(Run.java:1665)
         at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
         at hudson.model.ResourceController.execute(ResourceController.java:88)
         at hudson.model.Executor.run(Executor.java:246)
      Caused by: hudson.plugins.git.GitException: org.eclipse.jgit.api.errors.TransportException: ssh://<gitid>@<githost>/<gitrepo>.git: Failed to connect
         at org.jenkinsci.plugins.gitclient.JGitAPIImpl$2.execute(JGitAPIImpl.java:460)
         at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
         at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
         at hudson.remoting.UserRequest.perform(UserRequest.java:118)
         at hudson.remoting.UserRequest.perform(UserRequest.java:48)
         at hudson.remoting.Request$2.run(Request.java:328)
         at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:345)
         at java.util.concurrent.FutureTask.run(FutureTask.java:177)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1121)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
         at java.lang.Thread.run(Thread.java:769)
      Caused by: org.eclipse.jgit.api.errors.TransportException: ssh://<gitid>@<githost>/<gitrepo>.git: Failed to connect
         at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:139)
         at org.jenkinsci.plugins.gitclient.JGitAPIImpl$2.execute(JGitAPIImpl.java:458)
         ... 11 more
      Caused by: org.eclipse.jgit.errors.TransportException: ssh://<gitid>@<githost>/<gitrepo>.git: Failed to connect
         at org.jenkinsci.plugins.gitclient.trilead.TrileadSessionFactory.getSession(TrileadSessionFactory.java:53)
         at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121)
         at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:248)
         at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:147)
         at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:136)
         at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:122)
         at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1111)
         at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:130)
         ... 12 more
      Caused by: java.io.InvalidClassException: com.cloudbees.jenkins.plugins.sshcredentials.SSHAuthenticator$1; local class incompatible: stream classdesc serialVersionUID = 4226456448964168241, local class serialVersionUID = 8217644684038495097
          at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:604)
          at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1620)
          at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
          at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
          at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
          at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
          at hudson.remoting.UserRequest.deserialize(UserRequest.java:182)
          at hudson.remoting.UserRequest.perform(UserRequest.java:98)
          at hudson.remoting.UserRequest.perform(UserRequest.java:48)
          at hudson.remoting.Request$2.run(Request.java:328)
          at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
          at java.util.concurrent.FutureTask.run(FutureTask.java:166)
          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:722)
      

      Attachments

        Issue Links

          Activity

            markewaite Mark Waite added a comment -

            Can you provide more details on the AIX environment where you're seeing the problem?

            I doubt that any of the maintainers have access to an AIX machine, so we'll probably need to know details like which JDK is used on the AIX machine, and its version, and if there is some way to see the same results on a platform that is accessible to the plugin maintainers.

            markewaite Mark Waite added a comment - Can you provide more details on the AIX environment where you're seeing the problem? I doubt that any of the maintainers have access to an AIX machine, so we'll probably need to know details like which JDK is used on the AIX machine, and its version, and if there is some way to see the same results on a platform that is accessible to the plugin maintainers.
            rclark Robert Clark added a comment - - edited

            The Java version, and AIX version with patch level is in the "Environment" section. I've not yet seen this on any other platform (including HP-UX, which is another non-Oracle JVM) so I'm not yet sure how to reproduce this somewhere sane.

            I'm still working on this and I'll update the issue if I discover anything new.

            I was poking around in the source code and, as a wild-ass guess, I think putting an serialVersionUID = 1 in the anonymous inner class in SSHAuthenticator.newInstance() might be the correct solution. I know we've had trouble in the past with different default serialVersionUIDs from different VMs when doing any kind of RMI.

            Edit: I've not tried it yet, but I think an IBM VM (http://www.ibm.com/developerworks/java/jdk/) running on Linux might show the same behaviour. That would at least take AIX out of the mix. I'll see if I can break loose some time to experiment with that.

            rclark Robert Clark added a comment - - edited The Java version, and AIX version with patch level is in the "Environment" section. I've not yet seen this on any other platform (including HP-UX, which is another non-Oracle JVM) so I'm not yet sure how to reproduce this somewhere sane. I'm still working on this and I'll update the issue if I discover anything new. I was poking around in the source code and, as a wild-ass guess, I think putting an serialVersionUID = 1 in the anonymous inner class in SSHAuthenticator.newInstance() might be the correct solution. I know we've had trouble in the past with different default serialVersionUIDs from different VMs when doing any kind of RMI. Edit: I've not tried it yet, but I think an IBM VM ( http://www.ibm.com/developerworks/java/jdk/ ) running on Linux might show the same behaviour. That would at least take AIX out of the mix. I'll see if I can break loose some time to experiment with that.
            rclark Robert Clark added a comment -

            I've been able to correct this with a local build of the SSH credentials plugin, so I've removed the "git" component.

            A pull request with the fix is available from https://github.com/jenkinsci/ssh-credentials-plugin/pull/6

            rclark Robert Clark added a comment - I've been able to correct this with a local build of the SSH credentials plugin, so I've removed the "git" component. A pull request with the fix is available from https://github.com/jenkinsci/ssh-credentials-plugin/pull/6

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            src/main/java/com/cloudbees/jenkins/plugins/sshcredentials/SSHAuthenticator.java
            http://jenkins-ci.org/commit/ssh-credentials-plugin/c50807ef8b4b3abdc41eaef861e28dc26f3843c2
            Log:
            [FIXED JENKINS-23511] Need to have a serialVersionUid on the class sent over remoting

            • Also fixes the use of the wrong Callable in JENKINS-34336 (#18)
            • Also fixes the whole pulling in of a Jenkins class when invoked from a slave
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/com/cloudbees/jenkins/plugins/sshcredentials/SSHAuthenticator.java http://jenkins-ci.org/commit/ssh-credentials-plugin/c50807ef8b4b3abdc41eaef861e28dc26f3843c2 Log: [FIXED JENKINS-23511] Need to have a serialVersionUid on the class sent over remoting Also fixes the use of the wrong Callable in JENKINS-34336 (#18) Also fixes the whole pulling in of a Jenkins class when invoked from a slave

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            src/main/java/com/cloudbees/jenkins/plugins/sshcredentials/SSHAuthenticator.java
            http://jenkins-ci.org/commit/ssh-credentials-plugin/681d566d23c1839ea4a437572b01470d8f93b2eb
            Log:
            Merge pull request #20 from jenkinsci/jenkins-23511

            [FIXED JENKINS-23511] Need to have a serialVersionUid on the class sent over remoting

            Compare: https://github.com/jenkinsci/ssh-credentials-plugin/compare/9724039dfcb5...681d566d23c1

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/com/cloudbees/jenkins/plugins/sshcredentials/SSHAuthenticator.java http://jenkins-ci.org/commit/ssh-credentials-plugin/681d566d23c1839ea4a437572b01470d8f93b2eb Log: Merge pull request #20 from jenkinsci/jenkins-23511 [FIXED JENKINS-23511] Need to have a serialVersionUid on the class sent over remoting Compare: https://github.com/jenkinsci/ssh-credentials-plugin/compare/9724039dfcb5...681d566d23c1

            People

              ndeloof Nicolas De Loof
              rclark Robert Clark
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: