Jenkins has stopped working after upgrade to 2.54

jenkins doesn't workJenkins upgrade is very easy – you just need to use the package manager and run one command. After the update, Jenkins processes are restarted and the system is ready to use. Since version 2.54 you may face some problems with the update. Jenkins can be resistant to restart and returns the 503 error when you try to access web UI. It is caused by the Java (yes, I know, “it’s always Java!”). Jenkins has been using Java 8 since the 2.54 version, hence you may have problems if you still use Java 7. And it’s more than likely that you use the “old” version”, so your Jenkins doesn’t work properly. 🙂

My Jenkins doesn’t work – what should I do?

When some applications have stopped working, the first thing to do is check logs. Jenkins logs are stored by default in the /var/log/jenkins directory. You can issue the following command:

and on the another shell try to restart Jenkins.

Now if you have something like that:

it is the signal, that you have too old Java version. The most important log excerpt is:

According to Java class file codes, 52.0 version refers to the Java 8.

  • Java 1.2 uses major version 46
  • Java 1.3 uses major version 47
  • Java 1.4 uses major version 48
  • Java 5 uses major version 49
  • Java 6 uses major version 50
  • Java 7 uses major version 51
  • Java 8 uses major version 52
  • Java 9 uses major version 53

So as you can see it’s not the surprise that Jenkins doesn’t work if there is an unsupported Java version on your system. You can also take a look at these issues if you want confirmation:

So what is the resolution of my problem?

You just need to upgrade your Java. At first, check which version you have. On RHEL/CentOS you can just run the following command:

and look for the installed Java version. If you have version 7, you need to upgrade it. For instruction how to do it, I refer you to the complex how-tos like this one (for RHEL/CentOS) or this one (for Debian/Ubuntu).

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.