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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM