简体   繁体   English

Jenkins通过在master上执行命令启动slave +系统找不到指定的文件

[英]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)尝试使用JenkinsMaster (本地机器)在远程机器上启动从机(通过 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: slave.jar 存在于上述路径中,失败并出现以下错误:

[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 [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系统找不到指定的文件 java.io.IOException:无法运行程序“ssh”:CreateProcess 错误=2,系统找不到在 hudson.slaves.CommandLauncher 的 java.lang.ProcessBuilder.start(未知来源)指定的文件。在 java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run 在 hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:230) 启动(CommandLauncher.java:115) (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) : java.io.IOException: CreateProcess error=2, 系统找不到在 java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source)来源)在 java.lang.ProcessImpl.start(未知来源)

Can someone help on this?有人可以帮忙吗?

"The system cannot find the file specified" refers to ssh, not slave.jar. “系统找不到指定的文件”是指ssh,而不是slave.jar。 Ensure you have a Windows ssh implementation installed and that the folder it resides in is present in your PATH environment variable.确保您已安装 Windows ssh 实现,并且它所在的文件夹存在于您的 PATH 环境变量中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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