Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-67510

Jenkins fails to restart after clicking checkbox in update center

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • core
    • None

      When I click the checkbox for "Restart Jenkins when installation is complete and no jobs are running" on the "Installing Plugins/Upgrades" page Jenkins is failing to restart correctly.

      2022-01-04 22:36:55.152+0000 [id=246]   INFO    jenkins.model.Jenkins#_cleanUpAwaitDisconnects: Waiting for node disconnection completion
      2022-01-04 22:36:55.438+0000 [id=246]   INFO    jenkins.model.Jenkins#cleanUp: Jenkins stopped
      2022-01-04 22:36:55.473+0000 [id=246]   WARNING jenkins.model.Jenkins$20#run: Failed to restart Jenkins
      java.io.IOException: Failed to exec 'jenkins: /usr/bin/java' No such file or directory
              at hudson.lifecycle.UnixLifecycle.restart(UnixLifecycle.java:86)
              at jenkins.model.Jenkins$20.run(Jenkins.java:4513)
      2022-01-04 22:36:56.405+0000 [id=51]    SEVERE  h.i.i.InstallUncaughtExceptionHandler$DefaultUncaughtExceptionHandler#uncaughtException: A thread (SyncQueueListener/51) died unexpectedly due to an uncaught exception, this may leave your Jenkins in a bad way and is usually indicative of a bug in the code.
      java.lang.IllegalStateException: Jenkins.instance is missing. Read the documentation of Jenkins.getInstanceOrNull to see what you are doing wrong.
              at jenkins.model.Jenkins.get(Jenkins.java:803)
              at hudson.model.Queue.getInstance(Queue.java:3098)
              at org.jenkinsci.plugins.pubsub.listeners.SyncQueueListener.lambda$static$0(SyncQueueListener.java:113)
              at java.base/java.lang.Thread.run(Thread.java:829)
      2022-01-04 22:36:57.767+0000 [id=13]    WARNING h.s.HttpSessionContextIntegrationFilter2#hasInvalidSessionSeed: Encountered IllegalStateException trying to get a user. System init may not have completed yet. Invalidating user session.
      2022-01-04 22:37:02.800+0000 [id=17]    WARNING h.s.HttpSessionContextIntegrationFilter2#hasInvalidSessionSeed: Encountered IllegalStateException trying to get a user. System init may not have completed yet. Invalidating user session.
      2022-01-04 22:37:07.838+0000 [id=218]   WARNING h.s.HttpSessionContextIntegrationFilter2#hasInvalidSessionSeed: Encountered IllegalStateException trying to get a user. System init may not have completed yet. Invalidating user session.
      2022-01-04 22:37:12.879+0000 [id=217]   WARNING h.s.HttpSessionContextIntegrationFilter2#hasInvalidSessionSeed: Encountered IllegalStateException trying to get a user. System init may not have completed yet. Invalidating user session.
      2022-01-04 22:37:17.909+0000 [id=213]   WARNING h.s.HttpSessionContextIntegrationFilter2#hasInvalidSessionSeed: Encountered IllegalStateException trying to get a user. System init may not have completed yet. Invalidating user session.
      2022-01-04 22:37:22.934+0000 [id=13]    WARNING h.s.HttpSessionContextIntegrationFilter2#hasInvalidSessionSeed: Encountered IllegalStateException trying to get a user. System init may not have completed yet. Invalidating user session.
      

      Every time this happens I need to restart Jenkins using "service restart jenkins" from the OS and then it starts correctly.

      I have tested with the openjdk-11-jre-headless package from Debian and also with the adoptopenjdk-11-hotspot-jre and temurin-11-jdk deb packages from AdoptOpenJDK and Adoptium, and they all have the same problem.

            Unassigned Unassigned
            wwuck Tom
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: