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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Incomplete
    • 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_

    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

          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

          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
          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?

          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?
          slide_o_mix Alex Earl added a comment -

          Need more information from submitter

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

          For your information, all publish-over-cifs component type JENKINS issues related to the Publish Over CIFS plugin have been transferred to Github: https://github.com/jenkinsci/publish-over-cifs-plugin/issues

          Here is the direct link to this issue in Github: https://github.com/jenkinsci/publish-over-cifs-plugin/issues/49
          And here is the link to a search for related issues: https://github.com/jenkinsci/publish-over-cifs-plugin/issues?q=%22JENKINS-19512%22

          (Note: this is an automated bulk comment)

          gmcdonald Gavin McDonald added a comment - For your information, all publish-over-cifs component type JENKINS issues related to the Publish Over CIFS plugin have been transferred to Github: https://github.com/jenkinsci/publish-over-cifs-plugin/issues Here is the direct link to this issue in Github: https://github.com/jenkinsci/publish-over-cifs-plugin/issues/49 And here is the link to a search for related issues: https://github.com/jenkinsci/publish-over-cifs-plugin/issues?q=%22JENKINS-19512%22 (Note: this is an automated bulk comment)

          People

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

            Dates

              Created:
              Updated:
              Resolved: