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

Custom-tools plugin breaks environment for 'Execute Windows batch command'

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Behavior seems node specific, we have old node and same job runs fine on this node with and without Install Custom Tools enabled, but on new node seems if Install Custom Tools is enabled in the project, then 'Execute Windows batch command' build step fails:
      [CustomTools] - Handle: Starting installation
      [CustomTools] - Handle: Label specifics from 'windows' will be applied
      [CustomTools] - Handle: Tool is installed at C:\CI\Jenkins\tools\com.cloudbees.jenkins.plugins.customtools.CustomTool\Handle
      [CustomTools] - Handle: Setting Handle_HOME=C:\CI\Jenkins\tools\com.cloudbees.jenkins.plugins.customtools.CustomTool\Handle
      [EnvInject] - Loading node environment variables.
      Building remotely on gimci-vm8 in workspace C:\CI\Jenkins\workspace\test-py-install
      [test-py-install] $ cmd /c call C:\Windows\TEMP\hudson4013721381829777457.bat
      The parameter is incorrect
      FATAL: command execution failed
      java.io.IOException: Cannot run program "cmd" (in directory "C:\CI\Jenkins\workspace\test-py-install"): CreateProcess error=87, The parameter is incorrect
      at java.lang.ProcessBuilder.start(Unknown Source)
      ...
      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)
      ... 16 more
      Build step 'Execute Windows batch command' marked build as failure
      Finished: FAILURE

        Attachments

          Issue Links

            Activity

            alexeyt Alexey Trenikhin created issue -
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            The issue may be caused by the EnvInject plugin.
            JENKINS-15475 seems to be a very related bug.

            Could you run the job without EnvInject?
            If it does not help, please provide your versions of [Jenkins Core/slave.jar/Custom tools/EnvInject].

            Show
            oleg_nenashev Oleg Nenashev added a comment - The issue may be caused by the EnvInject plugin. JENKINS-15475 seems to be a very related bug. Could you run the job without EnvInject? If it does not help, please provide your versions of [Jenkins Core/slave.jar/Custom tools/EnvInject] .
            Hide
            alexeyt Alexey Trenikhin added a comment -

            I can’t run without EnvInject, seems I can’t disable it at job level, and can’t uninstall because it will effect other users.
            Envinject: 1.89
            custom-tools-plugin: 0.4.1
            Slave.jar version: 2.33
            Jenkins ver. 1.542

            Show
            alexeyt Alexey Trenikhin added a comment - I can’t run without EnvInject, seems I can’t disable it at job level, and can’t uninstall because it will effect other users. Envinject: 1.89 custom-tools-plugin: 0.4.1 Slave.jar version: 2.33 Jenkins ver. 1.542
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            You can just create a job's clone without script contents. They should not affect the issue. I suggest to start from a "Hello, world!" job with a Batch Command build step and the tool installation.

            If you provide the job's configuration, I'll try to provide more advices. Most probable, it won't be possible to reproduce the issue without your host, so I rely on your help during the testing

            BTW, the information about your target node could be useful as well.

            Show
            oleg_nenashev Oleg Nenashev added a comment - You can just create a job's clone without script contents. They should not affect the issue. I suggest to start from a "Hello, world!" job with a Batch Command build step and the tool installation. If you provide the job's configuration, I'll try to provide more advices. Most probable, it won't be possible to reproduce the issue without your host, so I rely on your help during the testing BTW, the information about your target node could be useful as well.
            Hide
            alexeyt Alexey Trenikhin added a comment -

            Job already "hello world" style, just instead of "Hello, world" it prints out environment
            I'm attaching config, injectedEnvVars and log files for run without custom-tools and with custom tools

            Show
            alexeyt Alexey Trenikhin added a comment - Job already "hello world" style, just instead of "Hello, world" it prints out environment I'm attaching config, injectedEnvVars and log files for run without custom-tools and with custom tools
            Hide
            alexeyt Alexey Trenikhin added a comment -

            config file with custom tools

            Show
            alexeyt Alexey Trenikhin added a comment - config file with custom tools
            alexeyt Alexey Trenikhin made changes -
            Field Original Value New Value
            Attachment config.xml [ 25555 ]
            Hide
            alexeyt Alexey Trenikhin added a comment -

            injectedEnvVars file for run with custom-tools

            Show
            alexeyt Alexey Trenikhin added a comment - injectedEnvVars file for run with custom-tools
            alexeyt Alexey Trenikhin made changes -
            Attachment failed-build-injectedEnvVars.txt [ 25556 ]
            Hide
            alexeyt Alexey Trenikhin added a comment -

            log for run with custom-tools

            Show
            alexeyt Alexey Trenikhin added a comment - log for run with custom-tools
            alexeyt Alexey Trenikhin made changes -
            Attachment failed-build-log [ 25557 ]
            Hide
            alexeyt Alexey Trenikhin added a comment -

            injectedEnvVars for run without custom-tools

            Show
            alexeyt Alexey Trenikhin added a comment - injectedEnvVars for run without custom-tools
            alexeyt Alexey Trenikhin made changes -
            Hide
            alexeyt Alexey Trenikhin added a comment -

            log for run without custom-tools (batch prints environment,maybe it will give idea what is wrong)

            Show
            alexeyt Alexey Trenikhin added a comment - log for run without custom-tools (batch prints environment,maybe it will give idea what is wrong)
            alexeyt Alexey Trenikhin made changes -
            Attachment no-custom-tools-log [ 25559 ]
            oleg_nenashev Oleg Nenashev made changes -
            Link This issue is related to JENKINS-15475 [ JENKINS-15475 ]
            ircbot Jenkins IRC Bot made changes -
            Component/s customtools-plugin [ 16520 ]
            Component/s custom-tools [ 17446 ]
            Hide
            cbiener Christian Biener added a comment -

            Had the same problem. Obviously PATH is too long. I think it's getting doubled by either Node Plugin, EnvInject plugin or the combination of both.

            Workaround for me is to insert a build step that injects PATH=.

            Show
            cbiener Christian Biener added a comment - Had the same problem. Obviously PATH is too long. I think it's getting doubled by either Node Plugin, EnvInject plugin or the combination of both. Workaround for me is to insert a build step that injects PATH=.
            Hide
            stoff81 Tom Stoffer added a comment -

            I am having this same issue without injectedEnvVars i upgraded the git plugin and now this happens every time!

            Show
            stoff81 Tom Stoffer added a comment - I am having this same issue without injectedEnvVars i upgraded the git plugin and now this happens every time!
            Hide
            jhack Giacomo Boccardo added a comment -

            IMHO, it's related to https://issues.jenkins-ci.org/browse/JENKINS-24280 .
            If I disable Node Plugin, it works.

            Show
            jhack Giacomo Boccardo added a comment - IMHO, it's related to https://issues.jenkins-ci.org/browse/JENKINS-24280 . If I disable Node Plugin, it works.
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 154262 ] JNJira + In-Review [ 178745 ]
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            I will have a really small bandwith in the community in the next months, see https://groups.google.com/d/msg/jenkinsci-dev/uc6NsMoCFQI/AIO4WG1UCwAJ for the context. I decided to mark this plugin for adoption and unassigned tickets so that anybody is welcome to take over the plugin and to become a maintainer. Some tickets already have pending pull requests which can be finalized.

            Show
            oleg_nenashev Oleg Nenashev added a comment - I will have a really small bandwith in the community in the next months, see https://groups.google.com/d/msg/jenkinsci-dev/uc6NsMoCFQI/AIO4WG1UCwAJ for the context. I decided to mark this plugin for adoption and unassigned tickets so that anybody is welcome to take over the plugin and to become a maintainer. Some tickets already have pending pull requests which can be finalized.
            oleg_nenashev Oleg Nenashev made changes -
            Assignee Oleg Nenashev [ oleg_nenashev ]

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              alexeyt Alexey Trenikhin
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated: