Unable to execute command or shell on remote system: Failed to Execute process

  • 1.问题描述

先说下我的项目环境:jenkins部署在windows下面,项目部署也是在windows下面,ssh服务器是FreeSSHd,原来是打算用Send files or execute commands over SSH》》Exec command停掉已经部署的java服务,

dos命令:start taskkill /f /im javaw.exe,结果不行,试了下 ping localhost,是可以的,懵逼~~

channel stopped
SSH: EXEC: STDOUT/STDERR from command [start taskkill /f /im javaw.exe] ...
Unable to execute command or shell on remote system: Failed to Execute process.
SSH: EXEC: completed after 401 ms
SSH: Disconnecting configuration [192.168.1.8] ...
ERROR: Exception when publishing, exception message [Exec exit status not zero. Status [-1]]
Build step 'Send files or execute commands over SSH' changed build result to UNSTABLE
Finished: UNSTABLE
  • 2.解决办法

在命令行前添加 cmd /c  意有个空格,不然还是报原来的错

 

 参考地址

 

 地址:https://issues.jenkins-ci.org/browse/JENKINS-17809

 

posted @ 2020-02-27 17:11  AnxSky  阅读(2994)  评论(0编辑  收藏  举报