• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • remoting
    • None
    • Platform: All, OS: Windows XP

      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

          [JENKINS-452] Windows slave won't execute dos commands

          Can you post the job configuration XML?

          Kohsuke Kawaguchi added a comment - Can you post the job configuration XML?

          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>

          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>

          I now have a hypothesis.

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

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

          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.

          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.

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

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

          Fixed in 1.104.

          Kohsuke Kawaguchi added a comment - Fixed in 1.104.

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

              Created:
              Updated:
              Resolved: