简体   繁体   中英

Jenkins launch slave via execution of command on the master + The system cannot find the file specified

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?

"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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM