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

Environment variables get corrupted when using Node parameter

XMLWordPrintable

    • 1.7.3 in 2016

      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
      

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

              Created:
              Updated:
              Resolved: