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

"Failed to get Environment Vars from build" on z/Linux64 slave

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Incomplete
    • Labels:
    • Environment:
      Jenkins 1.524
      Jenkins slave on z/Linux (s390x) 64 bit
      Slave.jar version: 2.28
      JRE on slave: IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux s390x-64 jvmxz6460sr9-20110203_
    • Similar Issues:

      Description

      After compiling and zipping a JNI lib with GCC on a z/Linux64 slave it should be uploaded to a remote machine with the "Publish-over-CIFS" plug-in.
      While the build itself is successful, it fails during post-build with the following error:

      BUILD SUCCESSFUL
      Total time: 2 seconds
      Archiving artifacts
      ERROR: Publisher jenkins.plugins.publish_over_cifs.CifsPublisherPlugin aborted due to exception
      java.lang.RuntimeException: Failed to get Environment Vars from build
      	at jenkins.plugins.publish_over.BPPlugin.getEnvironmentVariables(BPPlugin.java:84)
      	at jenkins.plugins.publish_over.BPPlugin.perform(BPPlugin.java:93)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:804)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:776)
      	at hudson.model.Build$BuildExecution.post2(Build.java:183)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:726)
      	at hudson.model.Run.execute(Run.java:1618)
      	at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:247)
      Caused by: hudson.remoting.RequestAbortedException: hudson.remoting.RequestAbortedException: java.io.IOException: Unexpected termination of the channel
      	at hudson.remoting.RequestAbortedException.wrapForRethrow(RequestAbortedException.java:41)
      	at hudson.remoting.RequestAbortedException.wrapForRethrow(RequestAbortedException.java:34)
      	at hudson.remoting.Request.call(Request.java:174)
      	at hudson.remoting.Channel.call(Channel.java:713)
      	at hudson.EnvVars.getRemote(EnvVars.java:212)
      	at hudson.model.Computer.getEnvironment(Computer.java:907)
      	at jenkins.model.CoreEnvironmentContributor.buildEnvironmentFor(CoreEnvironmentContributor.java:28)
      	at hudson.model.Run.getEnvironment(Run.java:2063)
      	at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:933)
      	at jenkins.plugins.publish_over.BPPlugin.getEnvironmentVariables(BPPlugin.java:80)
      	... 10 more
      Caused by: hudson.remoting.RequestAbortedException: java.io.IOException: Unexpected termination of the channel
      	at hudson.remoting.Request.abort(Request.java:299)
      	at hudson.remoting.Channel.terminate(Channel.java:773)
      	at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:69)
      Caused by: 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$BlockDataInputStream.peekByte(Unknown Source)
      	at java.io.ObjectInputStream.readObject0(Unknown Source)
      	at java.io.ObjectInputStream.readObject(Unknown Source)
      	at hudson.remoting.Command.readFrom(Command.java:92)
      	at hudson.remoting.ClassicCommandTransport.read(ClassicCommandTransport.java:72)
      	at hudson.remoting.SynchronousCommandTransport$ReaderThread.run(SynchronousCommandTransport.java:48)
      Finished: FAILURE
      

      Since this is not the only problem I'm having with the z/Linux64 slave, I reckon it's rather a general problem, than a specific problem with the "publish-over-cifs" plug-in. I added the component just in case the maintainer has an idea how to fix this.

      P.S.: The failing job is part of a matrix project running on Windows, Linux and Solaris slaves without any problems.

        Attachments

          Activity

          Hide
          fredg Fred G added a comment -

          If I use a "publish-over-cifs" build step instead of a post-build action it actually works!

          Seems like it might be related to what Kohsuke said in another context:

          some of the environments are only available during the build, so we can't really return the correct values after the build.
          might be better to throw more meaningful error message, though.

          https://issues.jenkins-ci.org/browse/JENKINS-7939?focusedCommentId=143776&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-143776

          Show
          fredg Fred G added a comment - If I use a "publish-over-cifs" build step instead of a post-build action it actually works! Seems like it might be related to what Kohsuke said in another context: some of the environments are only available during the build, so we can't really return the correct values after the build. might be better to throw more meaningful error message, though. https://issues.jenkins-ci.org/browse/JENKINS-7939?focusedCommentId=143776&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-143776
          Hide
          danielbeck Daniel Beck added a comment -

          Fred G: Does your last comment mean this isn't a bug, but misconfiguration e.g. use of undefined variables?

          Show
          danielbeck Daniel Beck added a comment - Fred G: Does your last comment mean this isn't a bug, but misconfiguration e.g. use of undefined variables?
          Hide
          slide_o_mix Alex Earl added a comment -

          Need more information from submitter

          Show
          slide_o_mix Alex Earl added a comment - Need more information from submitter

            People

            Assignee:
            slide_o_mix Alex Earl
            Reporter:
            fredg Fred G
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: