I have a Jenkins instance with version 2.426.3 with Java 11, and I need to move it to Java 17.
After moving it, I got this error:
[0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:/apps/run/jenkins_gc.log instead.
Unrecognized VM option 'MaxPermSize=1024M'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
So, I changed the ‘MaxPermSize=1024M’ to MaxMetaspaceSize=1024M. The Jenkins instance started, but the System Manager, such as System. Tools, etc disappeared.
## A problem occurred while processing the request.
Logging ID=a3983980-7288-40a6-878d-16d91abc7470
This are the logs
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
[0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:/apps/run/jenkins_gc.log instead.
[0.001s][warning][gc] -XX:+PrintGCDetails is deprecated. Will use -Xlog:gc* instead.
01-Aug-2024 23:08:00.786 SEVERE [main] org.apache.catalina.users.MemoryUserDatabase.open The specified user database [conf/tomcat-users.xml] could not be found
Aug 01, 2024 11:08:00 PM org.apache.catalina.users.MemoryUserDatabase open
I checked, and this and this is not the problem “The specified user database [conf/tomcat-users.xml] could not be found”
hard to tell without more logs.
As it looks you are using Apache Tomcat. Does this version support Java 17?
Why not simply using the embedding Jetty?
As simple as java -jar jenkins.war
Thanks for responding, the tomcat version is apache-tomcat-9.0.14
These are the logs after changing MaxMetaspaceSize with Java 17
This “xxxx/xxxx-mod-template.git” is not an issue; this is purposely removed.
NOTE: Picked up JDK_JAVA_OPTIONS: --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
[0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:/apps/run/jenkins_gc.log instead.
[0.001s][warning][gc] -XX:+PrintGCDetails is deprecated. Will use -Xlog:gc* instead.
01-Aug-2024 23:08:00.786 SEVERE [main] org.apache.catalina.users.MemoryUserDatabase.open The specified user database [conf/tomcat-users.xml] could not be found
Aug 01, 2024 11:08:00 PM org.apache.catalina.users.MemoryUserDatabase open
SEVERE: The specified user database [conf/tomcat-users.xml] could not be found
01-Aug-2024 23:08:16.179 SEVERE [pool-12-thread-3] org.jenkinsci.plugins.ghprb.GhprbRepository.initGhRepository Could not retrieve GitHub repository namedxxxx/xxxx-mod-template.git (Do you have properly set 'GitHub project' field in job configuration?)
org.kohsuke.github.GHFileNotFoundException: https://git.corp.adobe.com/api/v3/repos/hyperion/hyperion-mod-template.git {"message":"Not Found","documentation_url":"https://docs.github.com/enterprise-server@3.12/rest/repos/repos#get-a-repository"}
at org.kohsuke.github.GitHubClient.interpretApiError(GitHubClient.java:661)
at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:480)
at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:427)
at org.kohsuke.github.Requester.fetch(Requester.java:85)
at org.kohsuke.github.GHRepository.read(GHRepository.java:147)
at org.kohsuke.github.GitHub.getRepository(GitHub.java:687)
at org.jenkinsci.plugins.ghprb.GhprbRepository.initGhRepository(GhprbRepository.java:118)
at org.jenkinsci.plugins.ghprb.GhprbRepository.getGitHubRepo(GhprbRepository.java:413)
at org.jenkinsci.plugins.ghprb.GhprbRepository.hookExist(GhprbRepository.java:278)
at org.jenkinsci.plugins.ghprb.GhprbRepository.createHook(GhprbRepository.java:301)
at org.jenkinsci.plugins.ghprb.GhprbTrigger$StartHookRunnable.run(GhprbTrigger.java:1312)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.io.FileNotFoundException: https://git.corp.adobe.com/api/v3/repos/hyperion/hyperion-mod-template.git
at org.kohsuke.github.GitHubConnectorResponseErrorHandler$1.onError(GitHubConnectorResponseErrorHandler.java:60)
at org.kohsuke.github.GitHubClient.detectKnownErrors(GitHubClient.java:504)
at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:464)
... 14 more
Aug 01, 2024 11:08:16 PM org.jenkinsci.plugins.ghprb.GhprbRepository initGhRepository
SEVERE: Could not retrieve GitHub repository named hyperion/hyperion-mod-template.git (Do you have properly set 'GitHub project' field in job configuration?)
org.kohsuke.github.GHFileNotFoundException: https://git.corp.adobe.com/api/v3/repos/hyperion/hyperion-mod-template.git {"message":"Not Found","documentation_url":"https://docs.github.com/enterprise-server@3.12/rest/repos/repos#get-a-repository"}
at org.kohsuke.github.GitHubClient.interpretApiError(GitHubClient.java:661)
at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:480)
at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:427)
at org.kohsuke.github.Requester.fetch(Requester.java:85)
at org.kohsuke.github.GHRepository.read(GHRepository.java:147)
at org.kohsuke.github.GitHub.getRepository(GitHub.java:687)
at org.jenkinsci.plugins.ghprb.GhprbRepository.initGhRepository(GhprbRepository.java:118)
at org.jenkinsci.plugins.ghprb.GhprbRepository.getGitHubRepo(GhprbRepository.java:413)
at org.jenkinsci.plugins.ghprb.GhprbRepository.hookExist(GhprbRepository.java:278)
at org.jenkinsci.plugins.ghprb.GhprbRepository.createHook(GhprbRepository.java:301)
at org.jenkinsci.plugins.ghprb.GhprbTrigger$StartHookRunnable.run(GhprbTrigger.java:1312)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.io.FileNotFoundException: https://git.corp.adobe.com/api/v3/repos/hyperion/hyperion-mod-template.git
at org.kohsuke.github.GitHubConnectorResponseErrorHandler$1.onError(GitHubConnectorResponseErrorHandler.java:60)
at org.kohsuke.github.GitHubClient.detectKnownErrors(GitHubClient.java:504)
at org.kohsuke.github.GitHubClient.sendRequest(GitHubClient.java:464)
... 14 more