【日常記錄】Jenkins安裝時錯誤


安裝方法

1、下載war包安裝(推薦)
2、使用rmp安裝
安裝完后路徑:
/usr/lib/jenkins/jenkins.war    WAR包 
/etc/sysconfig/jenkins       配置文件,“端口”,“JENKINS_HOME”等都可以在這里配置。
/var/lib/jenkins/       默認的JENKINS_HOME目錄
/var/log/jenkins/jenkins.log    Jenkins日志文件

安裝完后啟動服務

service jenkins start|stop|restart

啟動時報錯
錯誤1:

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

解決辦法:vi /etc/sysconfig/jenkins 修改JENKINS_USER="jenkins" 修改為JENKINS_USER="root"
或者將jenkins加入到root權限

錯誤2:

Starting jenkins (via systemctl):  Warning: jenkins.service changed on disk. Run 'systemctl daemon-reload' to reload units.

Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.
解決辦法:vi /etc/rc.d/init.d/jenkins 增加java路徑(路徑查看:which java)
```shell
 sudo usermod -a -G root jenkins

錯誤3:自動安裝完成之后: 
通過瀏覽器打開Jenkins安裝插件時,報錯:無法連接到Jenkins服務器

Authentication required
<!--
You are authenticated as: anonymous
Groups that you are in:

Permission you need to have (but didn't): hudson.model.Hudson.Administer
-->

解決辦法:
將Jenkins用戶添加到根組: sudo usermod -a -G root jenkins
制作Jenkins通過編輯文件 / etc / sysconfig / jenkins 並更改 JENKINS_LISTEN_ADDRESS =0.0.0.0


免責聲明!

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



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