{"record":{"id":"a26425c6ac86fa92","repo":"jenkinsci/jenkins","slug":"restart-is-not-supported-please-manually-restart","errorCode":null,"errorMessage":"Restart is not supported, please manually restart this instance","messagePattern":"Restart is not supported, please manually restart this instance","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"src/main/js/pluginSetupWizardGui.js","lineNumber":1204,"sourceCode":"    installPlugins(selectedPluginNames);\n  };\n\n  // restart jenkins\n  var restartJenkins = function () {\n    pluginManager.restartJenkins(function () {\n      setPanel(loadingPanel);\n\n      console.log(\"-------------------\");\n      console.log(\"Waiting for Jenkins to come back online...\");\n      console.log(\"-------------------\");\n      var pingUntilRestarted = function () {\n        pluginManager.getRestartStatus(function (restartStatus) {\n          if (this.isError || restartStatus.restartRequired) {\n            if (this.isError || restartStatus.restartSupported) {\n              console.log(\"Waiting...\");\n              setTimeout(pingUntilRestarted, 1000);\n            } else if (!restartStatus.restartSupported) {\n              throw new Error(\n                translations.installWizard_error_restartNotSupported,\n              );\n            }\n          } else {\n            jenkins.goTo(\"/\");\n          }\n        });\n      };\n\n      pingUntilRestarted();\n    });\n  };\n\n  // close the installer, mark not to show again\n  var closeInstaller = function () {\n    pluginManager.completeInstall(\n      handleGenericError(function () {\n        jenkins.goTo(\"/\");","sourceCodeStart":1186,"sourceCodeEnd":1222,"githubUrl":"https://github.com/jenkinsci/jenkins/blob/2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc/src/main/js/pluginSetupWizardGui.js#L1186-L1222","documentation":"Thrown by the Jenkins plugin install wizard after a plugin install that requested a restart. The wizard polls pluginManager.getRestartStatus(); when the controller reports restartRequired=true but restartSupported=false, it cannot trigger an automatic restart and aborts the wait loop. The message is the localized key installWizard_error_restartNotSupported.","triggerScenarios":"Plugin installation completes with a pending restart on a Jenkins controller launched in a way that does not advertise restart support (e.g. started via 'java -jar jenkins.war' inside a container without the /restart endpoint enabled, or managed by an external process/supervisor). The wizard's pingUntilRestarted loop reads restartStatus.restartSupported === false while restartStatus.restartRequired === true.","commonSituations":"Jenkins running inside Docker/Kubernetes without restart capability; Jenkins launched as a Windows service or systemd unit where the safe-restart endpoint is disabled; managed Jenkins (CloudBees CI, OpenShift) that deliberately hides restart support from the UI.","solutions":["Restart the Jenkins process manually through your deployment mechanism (docker restart, systemctl restart jenkins, pod rollout, etc.) and reload the page.","If you control the controller, start it so restart is supported (run 'java -jar jenkins.war' directly, not embedded in another app) and ensure no startup flag or proxy strips the restart capability.","Avoid relying on the wizard's restart step in containerized setups; install plugins via init.groovy / CasC (configuration-as-code) and restart the container as part of the image build instead."],"exampleFix":"// before: wizard auto-restart path cannot work in a container\njenkins.restart();\n// after: surface a manual-restart instruction to the operator\nalert(translations.installWizard_error_restartNotSupported);\njenkins.goTo(\"/safeRestart\");","handlingStrategy":"validation","validationCode":"// Before relying on restart, query support once and branch\npluginManager.getRestartStatus(function (restartStatus) {\n  if (!restartStatus.restartSupported) {\n    // show manual-restart UI instead of entering the throwing wait loop\n    showManualRestartNotice();\n    return;\n  }\n  // safe to poll for auto-restart\n  pingUntilRestarted();\n});","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not call the auto-restart wait loop in containerized Jenkins where restart support is typically false.","Prefer installing plugins at image-build time via CasC so no runtime restart is needed.","Check restartStatus.restartSupported before entering pingUntilRestarted."],"tags":["jenkins","restart","plugin-wizard","ui"],"backgroundTag":null,"analyzedSha":"2e228ff40b14dbc8b14ffbc6edf0e4383cf744fc","analyzedAt":"2026-08-14T07:07:15.274Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}