I am running into an issue where a fresh install of Jenkins is not accessible. This is the error and OS details: Upon starting jenkins results in "OK" status message however if I run status-all | grep jenkins it results in:
jenkins dead but pid file exists
Running on Red Hat Enterprise Linux Server release 6.2 (Santiago) with Yum as package manager.
rpm -qa | grep java
java-1.7.0-openjdk-1.7.0.19-2.3.9.1.el6_4.x86_64
java-1.6.0-openjdk-1.6.0.0-1.61.1.11.11.el6_4.x86_64
tzdata-java-2011l-4.el6.noarch
libvirt-java-0.4.7-1.el6.noarch
libvirt-java-devel-0.4.7-1.el6.noarch
java-1.6.0-openjdk-devel-1.6.0.0-1.61.1.11.11.el6_4.x86_64
Permissions are:
ls -la /var/lib/jenkins/
total 8
drwxr-xr-x 2 jenkins jenkins 4096 Aug 27 00:21 .
drwxr-xr-x. 29 root root 4096 Aug 27 14:47 ..
Has anyone resolved this before?
Change JENKINS_AJP_PORT="8009"
(OR whatever value) to JENKINS_AJP_PORT="-1"
It will work for sure.
While following AWS tutorial on Set up a build pipeline with Jenkins and Amazon ECS I encountered the exact same error.
Changing ports did not solve the problem.
I figured out that the error was coming from the version of Java installed along Jenkins.
Updated java-1.7.0-openjdk to java-1.8.0-openjdk did the trick
EDIT: From Anatoly comment, to update java:
sudo yum install java-1.8.0-openjdk
and then remove old version:
sudo yum remove java-1.7.0-openjdk.x86_64
Finally, restart jenkins service
sudo service jenkins restart
Usually the tomcat service is taking over the 8080 port. Try to stop the tomcat service and rerun the jenkins service.
service tomcat stop;
service jenkins start
Worked for me.
I was getting the same error, I could not restart the instance in any way.
I did a "yum update" in the server and that fixed the problem.
Just experienced this problem with RHEL install. The fix for me was to explicitly set the JENKINS_JAVA_CMD configuration parameter.
E.g.
sudo vim /etc/sysconfig/jenkins
update:
JENKINS_JAVA_CMD=""
to:
JENKINS_JAVA_CMD="/usr/java/default/bin/java"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With