Just installed to Ubuntu 20.04LTS and the service fails to start:
$ sudo systemctl start jenkins.service
Job for jenkins.service failed because the control process exited with error code.
See “systemctl status jenkins.service” and “journalctl -xe” for details.
I added an echo of the command line to the init.d script and get:
$ sudo systemctl status jenkins.service
● jenkins.service - LSB: Start Jenkins at boot time
Loaded: loaded (/etc/init.d/jenkins; generated)
Active: failed (Result: exit-code) since Thu 2022-02-03 11:43:18 EST; 1min 19s ago
Docs: man:systemd-sysv-generator(8)
Process: 9970 ExecStart=/etc/init.d/jenkins start (code=exited, status=7)
Feb 03 11:43:16 david-ThinkPad-W541 jenkins[9970]: Correct java version found
Feb 03 11:43:16 david-ThinkPad-W541 jenkins[9970]: * Starting Jenkins Automation Server jenkins
Feb 03 11:43:16 david-ThinkPad-W541 jenkins[9970]: /bin/su -l jenkins --shell=/bin/bash -c /usr/bin/daemon --name=jenkins --inherit --env=JENKINS_HOME=/var/lib/jenkins --output=/var/log/jenkins/jenkins.log --pidfile=/var/run/jenkins/jenkins.pid – /usr/bin/java -Djava.awt.headless=true -jar /usr/share/jenkins/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080
Feb 03 11:43:16 david-ThinkPad-W541 su[10024]: (to jenkins) root on none
Feb 03 11:43:16 david-ThinkPad-W541 su[10024]: pam_unix(su-l:session): session opened for user jenkins by (uid=0)
Feb 03 11:43:17 david-ThinkPad-W541 su[10024]: pam_unix(su-l:session): session closed for user jenkins
Feb 03 11:43:18 david-ThinkPad-W541 jenkins[9970]: …fail!
Feb 03 11:43:18 david-ThinkPad-W541 systemd[1]: jenkins.service: Control process exited, code=exited, status=7/NOTRUNNING
Feb 03 11:43:18 david-ThinkPad-W541 systemd[1]: jenkins.service: Failed with result ‘exit-code’.
Feb 03 11:43:18 david-ThinkPad-W541 systemd[1]: Failed to start LSB: Start Jenkins at boot time.
When I try the traced command from the command line I get:
/bin/su: unrecognized option ‘–name=jenkins’
Any thoughts are welcome