Job for jenkins.service failed because the control process exited with error code. See "systemctl st


轉載自:https://blog.csdn.net/weixin_40816738/article/details/91391925

 

 

Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.

 

systemctl status jenkins.service

● jenkins.service - LSB: Jenkins Automation Server
Loaded: loaded (/etc/rc.d/init.d/jenkins; bad; vendor preset: disabled)
Active: failed (Result: exit-code) since 一 2019-06-10 18:22:24 CST; 5s ago
Docs: man:systemd-sysv-generator(8)
Process: 24344 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=1/FAILURE)

6月 10 18:22:24 pinyoyougou-docker systemd[1]: Starting LSB: Jenkins Automation Server...
6月 10 18:22:24 pinyoyougou-docker runuser[24345]: pam_unix(runuser:session): session opened for us...=0)
6月 10 18:22:24 pinyoyougou-docker jenkins[24344]: Starting Jenkins bash: /usr/bin/java: 沒有那個文…目錄
6月 10 18:22:24 pinyoyougou-docker systemd[1]: jenkins.service: control process exited, code=exited...s=1
6月 10 18:22:24 pinyoyougou-docker jenkins[24344]: [失敗]
6月 10 18:22:24 pinyoyougou-docker systemd[1]: Failed to start LSB: Jenkins Automation Server.
6月 10 18:22:24 pinyoyougou-docker systemd[1]: Unit jenkins.service entered failed state.
6月 10 18:22:24 pinyoyougou-docker systemd[1]: jenkins.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

  

 

 

 

看到原因是因為:

 

 

 

解決方案:
決方法:
1> 查看當前Java的環境變量 echo $JAVA_HOME
2> 復制Java的環境變量地址, 編輯/etc/init.d/jenkins文件, 指定位置添加該地址, 后綴附上/bin/java vim /etc/init.d/jenkins
修改后重啟jenkins服務, 問題解決 systemctl start jenkins

 

 

結果,又有一個警告

 

 

解決方案:

systemctl daemon-reload

  

然后重啟jenkis

systemctl restart jenkins重啟

  

 


免責聲明!

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



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