2
votes

Trying to start a slave on a remote machine from Master (local machine) using the Jenkins (launch slave via command line on Master)

ssh 10.1.18.135 java -jar D:/Jenkins/slave.jar

The slave.jar is present in the above path, It fails with this error:

[07/01/13 14:16:11] Launching slave agent $ ssh 10.1.18.135 java -jar D:/Jenkins/slave.jar The system cannot find the file specified ERROR: Unable to launch the slave agent for test123 : The system cannot find the file specified java.io.IOException: Cannot run program "ssh": CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(Unknown Source) at hudson.slaves.CommandLauncher.launch(CommandLauncher.java:115) at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:230) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source)

Can someone help on this?

1

1 Answers

0
votes

"The system cannot find the file specified" refers to ssh, not slave.jar. Ensure you have a Windows ssh implementation installed and that the folder it resides in is present in your PATH environment variable.