Jenkis 常见问题
问题一
问题详情:
[root@top jenkins]# systemctl start jenkins Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.
解决方案:
查看启动报文
[root@top jenkins]# 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 Sat 2019-04-20 21:06:23 EDT; 2min 47s ago Docs: man:systemd-sysv-generator(8) Process: 48780 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=1/FAILURE) Apr 20 21:06:23 top systemd[1]: Starting LSB: Jenkins Automation Server... Apr 20 21:06:23 top runuser[48785]: pam_unix(runuser:session): session opened for user jenkins by (uid=0) Apr 20 21:06:23 top jenkins[48780]: Starting Jenkins bash: /usr/bin/java: No such file or directory Apr 20 21:06:23 top runuser[48785]: pam_unix(runuser:session): session closed for user jenkins Apr 20 21:06:23 top jenkins[48780]: [FAILED] Apr 20 21:06:23 top systemd[1]: jenkins.service: control process exited, code=exited status=1 Apr 20 21:06:23 top systemd[1]: Failed to start LSB: Jenkins Automation Server. Apr 20 21:06:23 top systemd[1]: Unit jenkins.service entered failed state. Apr 20 21:06:23 top systemd[1]: jenkins.service failed.
编辑并配置jdk
# 查看jdk地址 echo $JAVA_HOME # 在jenkins中配置jdk地址,并添加 /bin/java vim /etc/init.d/jenkins