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

Windows slave won't execute dos commands

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Component/s: remoting
    • Labels:
      None
    • Environment:
      Platform: All, OS: Windows XP
    • Similar Issues:

      Description

      I'm unable to execute dos commands without specifying the full absolute paths on
      the slave machines. The reason is that the system PATH gets set to the PATH
      from the master. It sounds crazy but one other person on the mailing list
      confirmed seeing this as well.

      Here are the details:

      In the environment settings of the slave, it shows this:

      PATH=c:\Program Files\Java\jdk1.5.0_06\bin;…(stuff omitted)…
      C:\cygwin\home\Administrator\config\ant1.6\bin;C:\cygwin\bin

      This looks okay to me. So the slave process seems fine.

      But if I execute a windows batch command “set” it prints out all the variables.
      The PATH now has the actual path from the master unix server.

      PATH=/usr/java/jdk1.5.0_09/bin:/usr/kerberos/bin:...:/home/hudson/bin

        Attachments

          Activity

          bkayser bkayser created issue -
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          Can you post the job configuration XML?

          Show
          kohsuke Kohsuke Kawaguchi added a comment - Can you post the job configuration XML?
          kohsuke Kohsuke Kawaguchi made changes -
          Field Original Value New Value
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          bkayser bkayser added a comment -

          Here is the job configuation. Note that the "set" command prints out the sysenv
          and indicates that PATH is the unix path from the master, not the correct dos
          path of the slave.

          <?xml version='1.0' encoding='UTF-8'?>
          <project>
          <builders class="vector">
          <hudson.tasks.BatchFile>
          <command>set</command>
          </hudson.tasks.BatchFile>
          </builders>
          <publishers class="vector"/>
          <buildWrappers class="vector"/>
          <scm class="hudson.scm.NullSCM"/>
          <assignedNode>reebar</assignedNode>
          <canRoam>false</canRoam>
          <disabled>false</disabled>
          <jdk>JDK 1.5.0</jdk>
          <triggers class="vector"/>
          <logRotator>
          <daysToKeep>10</daysToKeep>
          <numToKeep>-1</numToKeep>
          </logRotator>
          <keepDependencies>false</keepDependencies>
          <properties/>
          <description>Build the agent and run unit tests on Windows every 3 hours on
          the half hour, if there were changes. </description>
          <actions class="vector"/>
          </project>

          Show
          bkayser bkayser added a comment - Here is the job configuation. Note that the "set" command prints out the sysenv and indicates that PATH is the unix path from the master, not the correct dos path of the slave. <?xml version='1.0' encoding='UTF-8'?> <project> <builders class="vector"> <hudson.tasks.BatchFile> <command>set</command> </hudson.tasks.BatchFile> </builders> <publishers class="vector"/> <buildWrappers class="vector"/> <scm class="hudson.scm.NullSCM"/> <assignedNode>reebar</assignedNode> <canRoam>false</canRoam> <disabled>false</disabled> <jdk>JDK 1.5.0</jdk> <triggers class="vector"/> <logRotator> <daysToKeep>10</daysToKeep> <numToKeep>-1</numToKeep> </logRotator> <keepDependencies>false</keepDependencies> <properties/> <description>Build the agent and run unit tests on Windows every 3 hours on the half hour, if there were changes. </description> <actions class="vector"/> </project>
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          I now have a hypothesis.

          Could you set the JDK to "default" and see what happens?

          Show
          kohsuke Kohsuke Kawaguchi added a comment - I now have a hypothesis. Could you set the JDK to "default" and see what happens?
          Hide
          bkayser bkayser added a comment -

          Yes, that fixes the problem. I would have set it at default to begin with but
          I copied the job from a local one. Well done.

          Show
          bkayser bkayser added a comment - Yes, that fixes the problem. I would have set it at default to begin with but I copied the job from a local one. Well done.
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          OK. Thanks. Now I know how to fix this.

          Show
          kohsuke Kohsuke Kawaguchi added a comment - OK. Thanks. Now I know how to fix this.
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          Fixed in 1.104.

          Show
          kohsuke Kohsuke Kawaguchi added a comment - Fixed in 1.104.
          kohsuke Kohsuke Kawaguchi made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]
          abayer Andrew Bayer made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 130525 ] JNJira + In-Review [ 199893 ]

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            bkayser bkayser
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: