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)
- Gitlab Error: - March 8, 2023
- Kubernestes EKS Error: Readiness probe failed /app/grpc-health-probe -addr=:50051 - February 28, 2023
- SSL Error: no alternative certificate subject name matches target - February 24, 2023