Jenkins dead but pid file exists

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

Change JENKINS_AJP_PORT="8009" (OR whatever value) to JENKINS_AJP_PORT="-1"

It will work for sure.

Tags:

Linux

Jenkins