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

Environment variables get corrupted when using Node parameter

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      When I use a Node parameter at my jobs, it is not possible for jenkins anymore to start a windows batch script on a windows slave, because cmd.exe can not be found.
      If I use the Label parameter with that nodes name, everything works as expected.
      I do not kno if it is relevant but I also use the Environment Injector Plugin.

      Running Jenkins: 1.554.3, Node and Label parameter plugin: 1.5.1, Environment Injector Plugin 1.89

      Started by user Andreas Kleber
      [EnvInject] - Loading node environment variables.
      Building remotely on basstu01 (puppet vdp vdk windows) in workspace c:\j\workspace\test-env
      [test-env] $ cmd /c call C:\Users\XXX\AppData\Local\Temp\hudson4333783914616487877.bat
      The parameter is incorrect
      FATAL: command execution failed
      java.io.IOException: Cannot run program "cmd" (in directory "c:\j\workspace\test-env"): CreateProcess error=87, The parameter is incorrect
      	at java.lang.ProcessBuilder.start(Unknown Source)
      	at hudson.Proc$LocalProc.<init>(Proc.java:244)
      	at hudson.Proc$LocalProc.<init>(Proc.java:216)
      	at hudson.Launcher$LocalLauncher.launch(Launcher.java:773)
      	at hudson.Launcher$ProcStarter.start(Launcher.java:353)
      	at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:1023)
      	at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:990)
      	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(Unknown Source)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at hudson.remoting.Engine$1$1.run(Engine.java:63)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: java.io.IOException: CreateProcess error=87, The parameter is incorrect
      	at java.lang.ProcessImpl.create(Native Method)
      	at java.lang.ProcessImpl.<init>(Unknown Source)
      	at java.lang.ProcessImpl.start(Unknown Source)
      	... 17 more
      Build step 'Execute Windows batch command' marked build as failure
      Finished: FAILURE
      

        Attachments

          Issue Links

            Activity

            Hide
            dexter31 Naraen Sridharan added a comment -

            I just reopened this [bug https://issues.jenkins-ci.org/browse/JENKINS-15339]. Just set a node name and see if it solves your issue.

            Show
            dexter31 Naraen Sridharan added a comment - I just reopened this [bug https://issues.jenkins-ci.org/browse/JENKINS-15339] . Just set a node name and see if it solves your issue.
            Hide
            dexter31 Naraen Sridharan added a comment - - edited

            Tested with 1.580.3. Issue still persists related to Node name being empty.

            Show
            dexter31 Naraen Sridharan added a comment - - edited Tested with 1.580.3. Issue still persists related to Node name being empty.
            Hide
            jhack Giacomo Boccardo added a comment -

            I confirm this bug using:

            • Jenkins 1.609.2
            • Environment Injector Plugin 1.91.4
            • Node and Label parameter plugin 1.5.1
            Show
            jhack Giacomo Boccardo added a comment - I confirm this bug using: Jenkins 1.609.2 Environment Injector Plugin 1.91.4 Node and Label parameter plugin 1.5.1
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: imod
            Path:
            src/main/java/org/jvnet/jenkins/plugins/nodelabelparameter/LabelParameterValue.java
            http://jenkins-ci.org/commit/nodelabelparameter-plugin/81e2d255c9dab615eb21e9ec5ea969cf3243137b
            Log:
            JENKINS-15339 / JENKINS-24280 make sure node name is not empty

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: imod Path: src/main/java/org/jvnet/jenkins/plugins/nodelabelparameter/LabelParameterValue.java http://jenkins-ci.org/commit/nodelabelparameter-plugin/81e2d255c9dab615eb21e9ec5ea969cf3243137b Log: JENKINS-15339 / JENKINS-24280 make sure node name is not empty
            Hide
            gilstrac Chris G added a comment -

            I can confirm this bug too.  I am looking forward to the update.

            Show
            gilstrac Chris G added a comment - I can confirm this bug too.  I am looking forward to the update.

              People

              Assignee:
              domi Dominik Bartholdi
              Reporter:
              andreas_kleber Andreas Kleber
              Votes:
              9 Vote for this issue
              Watchers:
              16 Start watching this issue

                Dates

                Created:
                Updated: