Facing the issue with loading the Jenkins UI post migrating to Jenkins 2.458

During Jenkins startup, i am getting below error message “WARNING o.j.p.s.scripts.ScriptApproval#load: There are 526 deprecated approved script hashes and 0 deprecated approved classpath hashes. They will be rehashed upon next use and that may cause performance issues until all of them are converted or removed.”

Below is the startup script:

#!/bin/sh
nohup /apps/jenkins/2.458_test/jdk-17.0.10/bin/java -XX:MaxMetaspaceSize=1024m -Djava.awt.headless=true -Dhudson.diyChunking=false -Dorg.eclipse.jetty.server.Request.maxFormContentSize=500000 -Dpermissive-script-security.enabled=true -Dorg.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval.ALLOW_ADMIN_APPROVAL_ENABLED=true -Dorg.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval.ADMIN_AUTO_APPROVAL_ENABLED=true -DJENKINS_HOME=/apps/jenkins/2.458_test/home -jar /apps/jenkins/2.458_test/jenkins.war --logfile=/apps/jenkins/2.458_test/logs/jenkins.log --httpPort=9090 --debug=5 --prefix=/jenkins_2_458 &

Somehow I was not able to attach the files. So, I have pasted the content from scriptApprove.xml file and log file in the reply section.

This is the scriptApproval.xml


<?xml version='1.1' encoding='UTF-8'?>
<scriptApproval plugin="script-security@1326.vdb_c154de8669">
  <approvedScriptHashes>
    <string>004451a3709f1a1bf7dd8bfa66f6d3222e78f0f5</string>
    <string>00b08f9b8b2a59b522e18e3df9a2ad0a833e7026</string>
    <string>9fb4a7b68b0b1cfc9638973baa6b9f709568b868</string>
    <string>SHA512:0108194717092eef6c2bc77350a261e1cc626e7a2346ad0209beacf6efbf7107e5930989d97e5d1cf73a17d8130380f78865ce9c12afd9c940ba11a7529183fe</string>
    <string>SHA512:04326735e9b8349b1812fc97c8aba3f1530da572183c6322bfd8d2b519c472568828be7e633b6d596d7a641701d0600a50aa3ebcd78c00999099e24a0deba0f9</string>
    <string>SHA512:ef13778c574ff3382e2237846d92e16d11881ccccef1a2543e40263097d5a18408252e321094f59688f81cfcb80c8121f2c4ee82e2e76019730455eb3dad83ef</string>
  </approvedScriptHashes>
  <approvedSignatures/>
  <aclApprovedSignatures/>
  <approvedClasspathEntries/>
  <pendingScripts>
    <pendingScript>
      <context/>
      <script>return[
&apos;DEV&apos;,
&apos;SYST&apos;,
&apos;TEST&apos;,
&apos;REF&apos;,
&apos;ACPT&apos;,
&apos;PERF&apos;,
&apos;LIVE&apos;
]</script>
      <language>groovy</language>
    </pendingScript>
    <pendingScript>
      <context/>
      <script></script>
      <language>groovy</language>
    </pendingScript>
    <pendingScript>
      <context/>
      <script>return [&apos;script Error&apos;]</script>
      <language>groovy</language>
    </pendingScript>
    <pendingScript>
      <context/>
      <script>if (ENV.equals(&quot;DEV&quot;)) {
return [&quot;d1&quot;,&quot;d2&quot;,&quot;d3&quot;,&quot;d4&quot;]
} else if (ENV.equals(&quot;SYST&quot;)) {
return [&quot;s1&quot;,&quot;s2&quot;,&quot;s3&quot;]
} else if (ENV.equals(&quot;REF&quot;)) {
return [&quot;r1&quot;,&quot;r2&quot;,&quot;r3&quot;]
} else if (ENV.equals(&quot;TEST&quot;)) {
return [&quot;t1&quot;,&quot;t2&quot;,&quot;t3&quot;]
}
else {
return [&quot;unknown TARGET&quot;]
}</script>
      <language>groovy</language>
    </pendingScript>
    <pendingScript>
      <context/>
      <script>return[
&apos;ACPT&apos;,
&apos;PERF&apos;,
&apos;LIVE&apos;
]</script>
      <language>groovy</language>
    </pendingScript>
    <pendingScript>
      <context/>
      <script>if (ENV.equals(&quot;DEV&quot;)) {
return [&quot;d1&quot;,&quot;d2&quot;,&quot;d3&quot;,&quot;d4&quot;]
} else if (ENV.equals(&quot;SYST&quot;)) {
return [&quot;s1&quot;,&quot;s2&quot;,&quot;s3&quot;]
} else if (ENV.equals(&quot;REF&quot;)) {
return [&quot;r1&quot;,&quot;r2&quot;,&quot;r3&quot;]
} else if (ENV.equals(&quot;TEST&quot;)) {
return [&quot;t1&quot;,&quot;t2&quot;,&quot;t3&quot;]
} else if (ENV.equals(&quot;ACPT&quot;)) {
return [&quot;a1&quot;]
} else if (ENV.equals(&quot;PERF&quot;)) {
return [&quot;p1&quot;]
} else if (ENV.equals(&quot;LIVE&quot;)) {
return [&quot;l1&quot;]
}
else {
return [&quot;unknown TARGET&quot;]
}</script>
      <language>groovy</language>
    </pendingScript>
    <pendingScript>
      <context/>
      <script>if (ENV.equals(&quot;ACPT&quot;)) {
return [&quot;a1&quot;]
} else if (ENV.equals(&quot;PERF&quot;)) {
return [&quot;p1&quot;]
} else if (ENV.equals(&quot;LIVE&quot;)) {
return [&quot;l1&quot;]
}
else {
return [&quot;unknown TARGET&quot;]
}</script>
      <language>groovy</language>
    </pendingScript>
    <pendingScript>
      <context/>
      <script>if (TARGET.equals(&quot;d1&quot;)) {
return [&quot;http://dewasb01:9519/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;d2&quot;)) {
return [&quot;http://dewasb01:9520/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;d3&quot;)) {
return [&quot;http://dewasb01:9521/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;d4&quot;)) {
return [&quot;http://dewasb01:9522/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;d4&quot;)) {
return [&quot;http://dewasb01:9522/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;t1&quot;)) {
return [&quot;http://tewasa01:9319/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;t2&quot;)) {
return [&quot;http://tewasa01:9320/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;t3&quot;)) {
return [&quot;http://tewasa01:9321/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;s1&quot;)) {
return [&quot;http://sewasa01:9319/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;s2&quot;)) {
return [&quot;http://sewasa01:9320/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;s3&quot;)) {
return [&quot;http://sewasa01:9321/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;r1&quot;)) {
return [&quot;http://rewasa01:9319/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;r2&quot;)) {
return [&quot;http://rewasa01:9320/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;r3&quot;)) {
return [&quot;http://rewasa01:9321/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;a1&quot;)) {
return [&quot;http://aewasa01:9319/SIXBeanXapiJaxWS/StrategicReservationService http://aewasa02:9319/SIXBeanXapiJaxWS/StrategicReservationService http://aewasb01:9319/SIXBeanXapiJaxWS/StrategicReservationService http://aewasb02:9319/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;p1&quot;)) {
return [&quot;http://pewasa01:9319/SIXBeanXapiJaxWS/StrategicReservationService http://pewasa02:9319/SIXBeanXapiJaxWS/StrategicReservationService http://pewasb10:9319/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;l1&quot;)) {
return [&quot;http://lewasa01:9319/SIXBeanXapiJaxWS/StrategicReservationService http://lewasb10:9319/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
}
else {
return [&quot;unknown TARGET&quot;]
}</script>
      <language>groovy</language>
    </pendingScript>
    <pendingScript>
      <context/>
      <script>if (TARGET.equals(&quot;d1&quot;)) {
return [&quot;http://dewasb01:9519/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;d2&quot;)) {
return [&quot;http://dewasb01:9520/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;d3&quot;)) {
return [&quot;http://dewasb01:9521/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;d4&quot;)) {
return [&quot;http://dewasb01:9522/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;t1&quot;)) {
return [&quot;http://tewasa01:9319/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;t2&quot;)) {
return [&quot;http://tewasa01:9320/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;t3&quot;)) {
return [&quot;http://tewasa01:9321/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;s1&quot;)) {
return [&quot;http://sewasa01:9319/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;s2&quot;)) {
return [&quot;http://sewasa01:9320/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;s3&quot;)) {
return [&quot;https://sewasa01:9421/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;r1&quot;)) {
return [&quot;http://rewasa01:9319/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;r2&quot;)) {
return [&quot;http://rewasa01:9320/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;r3&quot;)) {
return [&quot;http://rewasa01:9321/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;a1&quot;)) {
return [&quot;http://aewasa01:9319/SIXBeanXapiJaxWS/StrategicReservationService http://aewasa02:9319/SIXBeanXapiJaxWS/StrategicReservationService http://aewasb01:9319/SIXBeanXapiJaxWS/StrategicReservationService http://aewasb02:9319/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;p1&quot;)) {
return [&quot;http://pewasa01:9319/SIXBeanXapiJaxWS/StrategicReservationService http://pewasa02:9319/SIXBeanXapiJaxWS/StrategicReservationService http://pewasa03:9319/SIXBeanXapiJaxWS/StrategicReservationService http://pewasa04:9319/SIXBeanXapiJaxWS/StrategicReservationService http://pewasa05:9319/SIXBeanXapiJaxWS/StrategicReservationService http://pewasb10:9319/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
} else if (TARGET.equals(&quot;l1&quot;)) {
return [&quot;http://lewasa01:9319/SIXBeanXapiJaxWS/StrategicReservationService http://lewasa02:9319/SIXBeanXapiJaxWS/StrategicReservationService http://lewasa03:9319/SIXBeanXapiJaxWS/StrategicReservationService http://lewasa04:9319/SIXBeanXapiJaxWS/StrategicReservationService http://lewasa05:9319/SIXBeanXapiJaxWS/StrategicReservationService http://lewasb10:9319/SIXBeanXapiJaxWS/StrategicReservationService&quot;]
}
else {
return [&quot;unknown TARGET&quot;]
}</script>
      <language>groovy</language>
    </pendingScript>
  </pendingScripts>
  <pendingSignatures/>
  <pendingClasspathEntries/>
</scriptApproval>

Below are logs:

2024-06-21 07:51:03.692+0000 [id=1]	INFO	winstone.Logger#logInternal: Beginning extraction from war file
2024-06-21 07:51:03.804+0000 [id=1]	INFO	org.eclipse.jetty.server.Server#doStart: jetty-10.0.20; built: 2024-01-29T20:46:45.278Z; git: 3a745c71c23682146f262b99f4ddc4c1bc41630c; jvm 17.0.10+11-LTS-240
2024-06-21 07:51:04.019+0000 [id=1]	INFO	o.e.j.w.StandardDescriptorProcessor#visitServlet: NO JSP Support for /jenkins_2_460, did not find org.eclipse.jetty.jsp.JettyJspServlet
2024-06-21 07:51:04.066+0000 [id=1]	INFO	o.e.j.s.s.DefaultSessionIdManager#doStart: Session workerName=node0
2024-06-21 07:51:04.450+0000 [id=1]	INFO	hudson.WebAppMain#contextInitialized: Jenkins home directory: /apps/jenkins/2.460_test/home found at: SystemProperties.getProperty("JENKINS_HOME")
2024-06-21 07:51:04.532+0000 [id=1]	INFO	o.e.j.s.handler.ContextHandler#doStart: Started w.@3deb2326{Jenkins v2.458,/jenkins_2_460,file:///apps/jenkins/2.460_test/home/war/,AVAILABLE}{/apps/jenkins/2.460_test/home/war}
2024-06-21 07:51:04.541+0000 [id=1]	INFO	o.e.j.server.AbstractConnector#doStart: Started ServerConnector@1dd02175{HTTP/1.1, (http/1.1)}{0.0.0.0:9090}
2024-06-21 07:51:04.548+0000 [id=1]	INFO	org.eclipse.jetty.server.Server#doStart: Started Server@51931956{STARTING}[10.0.20,sto=0] @1234ms
2024-06-21 07:51:04.549+0000 [id=27]	INFO	winstone.Logger#logInternal: Winstone Servlet Engine running: controlPort=disabled
2024-06-21 07:51:04.782+0000 [id=33]	INFO	jenkins.InitReactorRunner$1#onAttained: Started initialization
2024-06-21 07:51:04.913+0000 [id=35]	INFO	jenkins.InitReactorRunner$1#onAttained: Listed all plugins
2024-06-21 07:51:05.140+0000 [id=46]	INFO	h.plugins.ansicolor.PluginImpl#start: AnsiColor: eliminating boring output (https://github.com/dblock/jenkins-ansicolor-plugin)
2024-06-21 07:51:08.895+0000 [id=45]	INFO	jenkins.InitReactorRunner$1#onAttained: Prepared all plugins
2024-06-21 07:51:09.039+0000 [id=37]	WARNING	o.j.p.s.scripts.ScriptApproval#load: There are 526 deprecated approved script hashes and 0 deprecated approved classpath hashes. They will be rehashed upon next use and that may cause performance issues until all of them are converted or removed.
2024-06-21 07:51:09.638+0000 [id=36]	INFO	o.j.p.s.ScriptlerLoadingTasks#synchronizeConfig: initialize Scriptler
2024-06-21 07:51:09.654+0000 [id=32]	INFO	jenkins.InitReactorRunner$1#onAttained: Started all plugins
2024-06-21 07:51:09.660+0000 [id=44]	INFO	jenkins.InitReactorRunner$1#onAttained: Augmented all extensions
2024-06-21 07:51:09.794+0000 [id=46]	INFO	jenkins.model.Jenkins#setBuildsAndWorkspacesDir: Using non default workspaces directories: ${JENKINS_HOME}/workspace/${ITEM_FULLNAME}.
2024-06-21 07:51:09.858+0000 [id=46]	INFO	jenkins.InitReactorRunner$1#onAttained: System config loaded
2024-06-21 07:51:09.927+0000 [id=40]	INFO	jenkins.InitReactorRunner$1#onAttained: System config adapted
2024-06-21 07:51:09.970+0000 [id=44]	INFO	jenkins.InitReactorRunner$1#onAttained: Loaded all jobs
2024-06-21 07:51:09.994+0000 [id=37]	INFO	c.c.j.p.s.i.BasicSSHUserPrivateKey$UsersPrivateKeySource#readResolve: SECURITY-440: Migrating UsersPrivateKeySource to DirectEntryPrivateKeySource
2024-06-21 07:51:10.002+0000 [id=33]	INFO	jenkins.InitReactorRunner$1#onAttained: Configuration for all jobs updated
2024-06-21 07:51:10.027+0000 [id=84]	INFO	hudson.util.Retrier#start: Attempt #1 to do the action check updates server
2024-06-21 07:51:10.075+0000 [id=38]	INFO	jenkins.InitReactorRunner$1#onAttained: Completed initialization
2024-06-21 07:51:10.287+0000 [id=84]	INFO	hudson.util.Retrier#start: The attempt #1 to do the action check updates server failed with an allowed exception:
java.net.ProtocolException: Server redirected too many  times (20)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:2005)
	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589)
	at hudson.model.DownloadService.loadJSON(DownloadService.java:122)
	at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:217)
	at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:212)
	at hudson.PluginManager.checkUpdatesServer(PluginManager.java:2103)
	at hudson.util.Retrier.start(Retrier.java:62)
	at hudson.PluginManager.doCheckUpdatesServer(PluginManager.java:2074)
	at jenkins.DailyCheck.execute(DailyCheck.java:93)
	at hudson.model.AsyncPeriodicWork.lambda$doRun$0(AsyncPeriodicWork.java:102)
	at java.base/java.lang.Thread.run(Thread.java:842)
2024-06-21 07:51:10.287+0000 [id=84]	INFO	hudson.util.Retrier#start: Calling the listener of the allowed exception 'Server redirected too many  times (20)' at the attempt #1 to do the action check updates server
2024-06-21 07:51:10.289+0000 [id=84]	INFO	hudson.util.Retrier#start: Attempted the action check updates server for 1 time(s) with no success
2024-06-21 07:51:10.289+0000 [id=84]	SEVERE	hudson.PluginManager#doCheckUpdatesServer: Error checking update sites for 1 attempt(s). Last exception was: ProtocolException: Server redirected too many  times (20)
2024-06-21 07:51:10.722+0000 [id=26]	INFO	hudson.lifecycle.Lifecycle#onReady: Jenkins is fully up and running

This is nothing to worry about. As the message says you have some scripts that were approved with an old algorithm. The next time the script is used Jenkins will recognize that it was approved with the old hash and automatically save the approvle for the new hash. That why you see in the scriptApproval.xml entries that start with SHA512:, those are the new approvals and the ones without this prefix are the old ones.

1 Like

Hello @mawinter69,

Thank you so much for your response.

To give you some context, we were using 7 years old Jenkins version and want to upgrade it to latest one. But, we were unsure about the results. So we created a alternate port and copied the existing Jenkins environment their and upgraded to the Jenkins 2.458

But now we are getting another error HTTP ERROR 404 Not Found
Can this be due to network settings on the new port or their could be other reason?

image (43)

try without the /jenkins, just http://<hostname>:9090

tried this as well but didn’t work