Controller installed in Windows fails to restart

Article ID:360050055511
1 minute readKnowledge base

Issue

Your controller installed in a Windows OS fails to restart with a stack trace compatible with the one shown below:

XXXX-XX-XX XXXX [id=XX] INFO jenkins.model.Jenkins#cleanUp: Jenkins stopped
XXXX-XX-XX XXXX [id=XX] WARNING h.s.HttpSessionContextIntegrationFilter2#hasInvalidSessionSeed: Encountered IllegalStateException trying to get a user. System init may not have completed yet. Invalidating user session.
XXXX-XX-XX XXXX [id=XX] WARNING o.e.jetty.server.HttpChannel#handleException: /tcpSlaveAgentListener/java.lang.IllegalStateException: Jenkins.instance is missing.

Resolution

This error has been reported in some versions of Jenkins, and has been discussed and solved in JENKINS-59992. The fix was included in Jenkins LTS 2.223.

So the proper fix for the issue is to upgrade to a version of the product which is higher than 2.223.

Workaround

The workaround is to manually restart the Windows service in order to get the instance successfully restarted.

Tested product/plugin versions