• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • envinject-plugin
    • None
    • AIX slave
      Jenkins: 2.61
      envinject: 2.1

      None of my builds running on AIX will start, they error out with

       

      org.jenkinsci.lib.envinject.EnvInjectException: java.io.InvalidClassException: org.jenkinsci.plugins.envinject.service.EnvironmentVariablesNodeLoader$1; local class incompatible: stream classdesc serialVersionUID = -2630906866550529145, local class serialVersionUID = -2721064306957331564
      	at org.jenkinsci.plugins.envinject.service.EnvironmentVariablesNodeLoader.gatherEnvVarsForNode(EnvironmentVariablesNodeLoader.java:95)
      	at org.jenkinsci.plugins.envinject.EnvInjectListener.loadEnvironmentVariablesNode(EnvInjectListener.java:80)
      	at org.jenkinsci.plugins.envinject.EnvInjectListener.setUpEnvironment(EnvInjectListener.java:43)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:528)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:448)
      	at hudson.model.Run.execute(Run.java:1735)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:405)
      Caused by: java.io.InvalidClassException: org.jenkinsci.plugins.envinject.service.EnvironmentVariablesNodeLoader$1; local class incompatible: stream classdesc serialVersionUID = -2630906866550529145, local class serialVersionUID = -2721064306957331564
      	at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:702)
      	at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1705)
      	at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1600)
      	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1875)
      	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1432)
      	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:428)
      	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:336)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:277)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.lang.Thread.run(Thread.java:785)
      	at ......remote call to AIXslave(Native Method)
      	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
      	at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
      	at hudson.remoting.Channel.call(Channel.java:830)
      	at hudson.FilePath.act(FilePath.java:1081)
      	at org.jenkinsci.plugins.envinject.service.EnvironmentVariablesNodeLoader.gatherEnvVarsForNode(EnvironmentVariablesNodeLoader.java:64)
      

          [JENKINS-44395] Exception thrown on AIX agent

          aflat created issue -
          aflat made changes -
          Summary Original: Exception thrown on AIX host New: Exception thrown on AIX slave
          Oleg Nenashev made changes -
          Summary Original: Exception thrown on AIX slave New: Exception thrown on AIX agent

          Oleg Nenashev added a comment -

          It happens due to this class: https://github.com/jenkinsci/envinject-plugin/blob/master/src/main/java/org/jenkinsci/plugins/envinject/service/EnvironmentVariablesNodeLoader.java#L65-L68 , likely it happens due to this commit: https://github.com/jenkinsci/envinject-plugin/commit/21877ef1b473abb90c62034cd4cc941623692838 . And this commit is perfectly valid.

          1) Check Remoting version on your AIX hosts. It should be 3.7

          2) If the version is up to date, try removing the JAR cache in "~/.jenkins" and reconnecting the agent

          Oleg Nenashev added a comment - It happens due to this class: https://github.com/jenkinsci/envinject-plugin/blob/master/src/main/java/org/jenkinsci/plugins/envinject/service/EnvironmentVariablesNodeLoader.java#L65-L68 , likely it happens due to this commit: https://github.com/jenkinsci/envinject-plugin/commit/21877ef1b473abb90c62034cd4cc941623692838 . And this commit is perfectly valid. 1) Check Remoting version on your AIX hosts. It should be 3.7 2) If the version is up to date, try removing the JAR cache in "~/.jenkins" and reconnecting the agent

          Oleg Nenashev added a comment -

          If the issue happens, likely you have a machine being shared between two Jenkins masters of different versions. In such case use the -jarCache parameter to specify different cache locations

          Oleg Nenashev added a comment - If the issue happens, likely you have a machine being shared between two Jenkins masters of different versions. In such case use the -jarCache parameter to specify different cache locations

          aflat added a comment -
          1. It is 3.7.
          2. I tried that as well, still the same error

          I only have 1 master. A quick note that I do have a   "Prefix Start Slave Command"  which has

          export LIBPATH=$LIBPATH:/opt/freeware/lib;
          

          Only because AIX is a pain, and I can't run curl/git without it, even though the same line is in my .profile.

           

           

          aflat added a comment - It is 3.7. I tried that as well, still the same error I only have 1 master. A quick note that I do have a   "Prefix Start Slave Command"  which has export LIBPATH=$LIBPATH:/opt/freeware/lib; Only because AIX is a pain, and I can't run curl/git without it, even though the same line is in my .profile.    

          Tammy Parker added a comment -

          The same error is occuring for me on zOS.  I only have one Jenkins master.  Jenkins: 2.46.2, Env Injector Plugin: 2.1
          Agent version is 3.7.  With the ~/jenkins/cache/jars directory cleaned up, I get errors like those included below when the agent is restarted and then the same error occurs as above when the job is initiated.  I also tried removing the jars directory and then the agent complains with "Root directory not writable: /u/dlbuild/.jenkins/cache/jars",

          May 24, 2017 6:36:57 PM hudson.remoting.JarCacheSupport$1 run WARNING: Failed to resolve a jar 2ebd67217364ba864c9c382142164236 java.io.IOException: Failed to write to /u/dlbuild/.jenkins/cache/jars/2E/BD67217364BA864C9C382142164236.jar at hudson.remoting.FileSystemJarCache.retrieve(FileSystemJarCache.java:133) at hudson.remoting.JarCacheSupport$1.run(JarCacheSupport.java:64) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:482) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:345) at java.util.concurrent.FutureTask.run(FutureTask.java:177) at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110) at java.lang.Thread.run(Thread.java:769) Caused by: java.io.IOException: Root directory does not exist at java.nio.file.Files.createDirectories(Files.java:716) at hudson.remoting.Util.mkdirs(Util.java:230) at hudson.remoting.FileSystemJarCache.createTempJar(FileSystemJarCache.java:158) at hudson.remoting.FileSystemJarCache.retrieve(FileSystemJarCache.java:93)

          Tammy Parker added a comment - The same error is occuring for me on zOS.  I only have one Jenkins master.  Jenkins: 2.46.2, Env Injector Plugin: 2.1 Agent version is 3.7.  With the ~/jenkins/cache/jars directory cleaned up, I get errors like those included below when the agent is restarted and then the same error occurs as above when the job is initiated.  I also tried removing the jars directory and then the agent complains with "Root directory not writable: /u/dlbuild/.jenkins/cache/jars", May 24, 2017 6:36:57 PM hudson.remoting.JarCacheSupport$1 run WARNING: Failed to resolve a jar 2ebd67217364ba864c9c382142164236 java.io.IOException: Failed to write to /u/dlbuild/.jenkins/cache/jars/2E/BD67217364BA864C9C382142164236.jar at hudson.remoting.FileSystemJarCache.retrieve(FileSystemJarCache.java:133) at hudson.remoting.JarCacheSupport$1.run(JarCacheSupport.java:64) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:482) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:345) at java.util.concurrent.FutureTask.run(FutureTask.java:177) at hudson.remoting.AtmostOneThreadExecutor$Worker.run(AtmostOneThreadExecutor.java:110) at java.lang.Thread.run(Thread.java:769) Caused by: java.io.IOException: Root directory does not exist at java.nio.file.Files.createDirectories(Files.java:716) at hudson.remoting.Util.mkdirs(Util.java:230) at hudson.remoting.FileSystemJarCache.createTempJar(FileSystemJarCache.java:158) at hudson.remoting.FileSystemJarCache.retrieve(FileSystemJarCache.java:93)

          Oleg Nenashev added a comment -

          tparker1 How do you restart the the agent? With entire JVM? If yes, would be great to have a full stacktrace

          Oleg Nenashev added a comment - tparker1 How do you restart the the agent? With entire JVM? If yes, would be great to have a full stacktrace

          Oleg Nenashev added a comment -

          Sorry for many low-level questions just in case. As you may guess I have neither AIX nor IBM mainframe machine right now, so I cannot reproduce the issue on my own. Have not seen such issues on the platforms I have now though maybe it happens there as well

          Oleg Nenashev added a comment - Sorry for many low-level questions just in case. As you may guess I have neither AIX nor IBM mainframe machine right now, so I cannot reproduce the issue on my own. Have not seen such issues on the platforms I have now though maybe it happens there as well

          aflat added a comment -

          I have aix,solaris sparc/x86, hpux, centos 6/7, sles10, and windows. Sadly aix was the only one to fail for me. I rolled back for now.

          aflat added a comment - I have aix,solaris sparc/x86, hpux, centos 6/7, sles10, and windows. Sadly aix was the only one to fail for me. I rolled back for now.

            Unassigned Unassigned
            aflat aflat
            Votes:
            5 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated: