Error
-- Unit jenkins.service has begun starting up.
Aug 04 20:02:19 ip-10-157-160-63.ec2.internal runuser[14657]: pam_unix(runuser:session): session opened for user jenkins by (uid=0)
Aug 04 20:02:22 ip-10-157-160-63.ec2.internal runuser[14657]: pam_unix(runuser:session): session closed for user jenkins
Aug 04 20:02:22 ip-10-157-160-63.ec2.internal jenkins[14652]: Starting Jenkins [FAILED]
Aug 04 20:02:22 ip-10-157-160-63.ec2.internal systemd[1]: jenkins.service: control process exited, code=exited status=1
Aug 04 20:02:22 ip-10-157-160-63.ec2.internal systemd[1]: Failed to start LSB: Jenkins Automation Server.
-- Subject: Unit jenkins.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit jenkins.service has failed.
--
-- The result is failed.
Solution
To fix the issue manually install Java Runtime Environment:
JDK version 9:
sudo apt install openjdk-9-jre
JDK version 8:
sudo apt install openjdk-8-jre
Open Jenkins configuration file:
sudo vi /etc/init.d/jenkins
Finally, append path to the new java executable (line 16):
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/lib/jvm/java-8-openjdk-amd64/bin/
Latest posts by rajeshkumar (see all)
- How to get Blackduck Trial version? - December 3, 2023
- PHP ionCube Error: cannot be decoded by this version of the ionCube Loader - December 2, 2023
- Cloudbees CD/RO Error: ectool - November 24, 2023