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

Batch command fails with an error of " " is not recognized as an internal or external command, operable program or batch file. while running on a Window salve machine.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Blocker Blocker
    • _unsorted
    • None
    • Jenkins ver. 2.97

      Hi,

      I have a setup a Jenkins server which is a Linux server and it has a slave machine which is a Window server. Now I have a job which is running on the slave machine. which is designed to execute some batch commands on the window machine. 

      This job was working from last one year and suddenly job started throwing an error of " " is not recognized as an internal or external command, operable program or batch file. when it execute any batch command. It's failing even executing a very simple command eg- pwd.

      Error
      'pwd' is not recognized as an internal or external command,
      operable program or batch file.
       Main confusion here is,

      1- If I execute the same command directly in the command prompt of the Window Machine then it works fine.

      2-If I execute the same command in the Script Console of the slave eg- :println "pwd".execute().text . This execution happens in the agent JVM.

      then also it works fine.

      The only problem is when it gets executed throw a Jenkins job then it throws an error.

      Note- It was working fine from last year and this problem started when I was testing one pipeline Job 

       

            oleg_nenashev Oleg Nenashev
            ppanda Pritish Panda
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: