Tuesday, November 13, 2018

Jenkins Install or start issue on Ubuntu

If you get below issue during install/start of jenkins, then the java installation is one of the reason.

Install Jenkins in Ubuntu 18.04 LTS failed (Failed to start LSB: Start Jenkins at boot time.)


If Java is already installed, then the Java is not detected as the jenkins service is not reading the environment variable as it is limited to sudoers.

Or, the java version may be a reason as it currently supports only 8, not 9.

If it is version 8, then you can check from the log that java is not detected or not found.

So, install the java from apt-get instead of tar extraction, as we don't need to bother about environment variables.They are set automatically, even to sudoers.

Install Java 8 before install Jenkins
sudo add-apt-repository ppa:webupd8team/java
sudo apt install oracle-java8-installer
wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
sudo apt-add-repository "deb https://pkg.jenkins.io/debian-stable binary/"
sudo apt install jenkins

Reference

No comments:

Post a Comment