詹金斯开始给出错误

时间:2017-06-15 16:11:05

标签: jenkins

当我试图通过

启动我新安装的jenkins时
sudo systemctl start jenkins.service

它给了我这个错误:

[root@no52 ~]# sudo service jenkins start
Starting 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.
                                                           [FAILED]
[root@no52 ~]# 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 Thu 2017-06-15 16:05:14 UTC; 25s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 8226 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=1/FAILURE)

Jun 15 16:05:14 no1010042210152.corp.adobe.com jenkins[8226]: at com.sun.akuma.JavaVMArguments.current(JavaVMArguments.java:92)
Jun 15 16:05:14 no1010042210152.corp.adobe.com jenkins[8226]: at com.sun.akuma.Daemon.daemonize(Daemon.java:106)
Jun 15 16:05:14 no1010042210152.corp.adobe.com jenkins[8226]: at com.sun.akuma.Daemon.all(Daemon.java:88)
Jun 15 16:05:14 no1010042210152.corp.adobe.com jenkins[8226]: ... 6 more
Jun 15 16:05:14 no1010042210152.corp.adobe.com runuser[8227]: pam_unix(runuser:session): session closed for user jenkins
Jun 15 16:05:14 no1010042210152.corp.adobe.com jenkins[8226]: [FAILED]
Jun 15 16:05:14 no1010042210152.corp.adobe.com systemd[1]: jenkins.service: control process exited, code=exited status=1
Jun 15 16:05:14 no1010042210152.corp.adobe.com systemd[1]: Failed to start LSB: Jenkins Automation Server.
Jun 15 16:05:14 no1010042210152.corp.adobe.com systemd[1]: Unit jenkins.service entered failed state.
Jun 15 16:05:14 no1010042210152.corp.adobe.com systemd[1]: jenkins.service failed

有人可以帮我吗?

PS:我确实安装了Java

java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-b12)
OpenJDK 64-Bit Server VM (build 25.131-b12, mixed mode)

1 个答案:

答案 0 :(得分:0)

当您的计算机上没有Java时,通常会显示此错误。 Jenkins接力于Java。

请按照以下步骤解决问题:

sudo yum install java-1.8.0-openjdk
systemctl enable jenkins
systemctl start jenkins
systemctl status jenkins

希望它会有所帮助。