sudo systemctl restart jenkins.service systemctl status jenkins.service journalctl -xe
报错:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details. invoke-rc.d: initscript jenkins, action "start" failed. ● jenkins.service - LSB: Start Jenkins at boot time Loaded: loaded (/etc/init.d/jenkins; generated) Active: failed (Result: exit-code) since Fri 2020-10-16 08:13:34 UTC; 70ms ago Docs: man:systemd-sysv-generator(8) Process: 18357 ExecStart=/etc/init.d/jenkins start (code=exited, status=1/FAILURE)
Oct 16 08:13:32 ubuntu systemd[1]: Starting LSB: Start Jenkins at boot time... Oct 16 08:13:34 ubuntu jenkins[18357]: Found an incorrect Java version Oct 16 08:13:34 ubuntu jenkins[18357]: Java version found: Oct 16 08:13:34 ubuntu jenkins[18372]: openjdk version "14.0.1" 2020-04-14 Oct 16 08:13:34 ubuntu jenkins[18372]: OpenJDK Runtime Environment (build 14.0.1+7-Ubuntu-1ubuntu1) Oct 16 08:13:34 ubuntu jenkins[18372]: OpenJDK Server VM (build 14.0.1+7-Ubuntu-1ubuntu1, mixed mode, sharing) Oct 16 08:13:34 ubuntu jenkins[18357]: Aborting Oct 16 08:13:34 ubuntu systemd[1]: jenkins.service: Control process exited, code=exited, status=1/FAILURE Oct 16 08:13:34 ubuntu systemd[1]: jenkins.service: Failed with result 'exit-code'. Oct 16 08:13:34 ubuntu systemd[1]: Failed to start LSB: Start Jenkins at boot time.
Oct 16 09:02:57 ubuntu jenkins[15764]: Found an incorrect Java version Oct 16 09:02:57 ubuntu jenkins[15764]: Java version found: Oct 16 09:02:57 ubuntu jenkins[15779]: openjdk version "14.0.1" 2020-04-14 Oct 16 09:02:57 ubuntu jenkins[15779]: OpenJDK Runtime Environment (build 14.0.1+7-Ubuntu-1ubuntu1) Oct 16 09:02:57 ubuntu jenkins[15779]: OpenJDK Server VM (build 14.0.1+7-Ubuntu-1ubuntu1, mixed mode, sharing) Oct 16 09:02:57 ubuntu jenkins[15764]: Aborting Oct 16 09:02:57 ubuntu systemd[1]: jenkins.service: Control process exited, code=exited, status=1/FAILURE Oct 16 09:02:57 ubuntu systemd[1]: jenkins.service: Failed with result 'exit-code'. Oct 16 09:02:57 ubuntu systemd[1]: Failed to start LSB: Start Jenkins at boot time.
1 2 3 4 5 6 7 8 9 10 11 12 13
sudo vi /etc/default/jenkins # 将JENKINS_ARGS="--webroot=/var/cache/$NAME/war --httpPort=$HTTP_PORT" 改为 #JENKINS_ARGS="--enable-future-java --webroot=/var/cache/$NAME/war --httpPort=$HTTP_PORT"