SonarQube startup java.lang.NoClassDefFoundError: PanwHooks
SonarQube startup java.lang.NoClassDefFoundError: PanwHooks
当我在 CentOS 8 服务器上启动 sonarqube 8.9 时。启动失败并显示 java.lang.NoClassDefFoundError: PanwHooks
异常消息。
尝试了不同的启动方法得到相同的异常。有解决此问题的提示吗?
jvm 1 | WrapperListener.start runner thread started.
jvm 1 | WrapperSimpleApp: start(args) Will wait up to 2 seconds for the main method to complete.
jvm 1 | WrapperSimpleApp: invoking main method
jvm 1 | 2021.07.16 21:45:47 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/sonarqube-8.9.0.43852/temp
jvm 1 | 2021.07.16 21:45:47 DEBUG app[][o.s.a.NodeLifecycle] WrapperSimpleAppMain tryToMoveTo from INIT to STARTING => true
jvm 1 | 2021.07.16 21:45:47 DEBUG app[][o.s.a.p.ManagedProcessLifecycle] WrapperSimpleAppMain tryToMoveTo es from INIT to STARTING => true
jvm 1 | 2021.07.16 21:45:47 INFO app[][o.s.a.es.EsSettings] Elasticsearch cluster enabled. Connect to hosts [192.168.81.88,192.168.81.107,192.168.81.108]
jvm 1 | 2021.07.16 21:45:47 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 192.168.81.108:9001, TCP: 192.168.81.108:9002]
jvm 1 | 2021.07.16 21:45:47 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/sonarqube-8.9.0.43852/elasticsearch]:
/opt/sonarqube/sonarqube-8.9.0.43852/elasticsearch/bin/elasticsearch
jvm 1 |
jvm 1 | WrapperSimpleApp: Encountered an error running main: java.lang.NoClassDefFoundError: PanwHooks
jvm 1 | java.lang.NoClassDefFoundError: PanwHooks
jvm 1 | at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java)
jvm 1 | at org.sonar.application.ProcessLauncherImpl$JavaLangProcessBuilder.start(ProcessLauncherImpl.java:379)
jvm 1 | at org.sonar.application.ProcessLauncherImpl.launchExternal(ProcessLauncherImpl.java:128)
jvm 1 | at org.sonar.application.ProcessLauncherImpl.launch(ProcessLauncherImpl.java:97)
jvm 1 | at org.sonar.application.SchedulerImpl.lambda$tryToStartProcess(SchedulerImpl.java:196)
jvm 1 | at org.sonar.application.process.ManagedProcessHandler.start(ManagedProcessHandler.java:73)
jvm 1 | at org.sonar.application.SchedulerImpl.tryToStartProcess(SchedulerImpl.java:194)
jvm 1 | at org.sonar.application.SchedulerImpl.tryToStartEs(SchedulerImpl.java:146)
jvm 1 | at org.sonar.application.SchedulerImpl.tryToStartAll(SchedulerImpl.java:138)
jvm 1 | at org.sonar.application.SchedulerImpl.schedule(SchedulerImpl.java:112)
jvm 1 | at org.sonar.application.App.start(App.java:68)
jvm 1 | at org.sonar.application.App.main(App.java:97)
jvm 1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
jvm 1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
jvm 1 | at java.base/java.lang.reflect.Method.invoke(Method.java:566)
jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
jvm 1 | at java.base/java.lang.Thread.run(Thread.java:829)
jvm 1 | WrapperSimpleApp: start(args) end. Main Completed=true, exitCode=1
jvm 1 | WrapperListener.start runner thread stopped.
jvm 1 | returned from WrapperListener.start()
jvm 1 | WrapperListener.start() returned an exit code of 1.
谢谢
对 SonarQube 社区的搜索显示 this post. They seemed to indicate if you are running systemd, you do not need the wrapper and pointed people to the guide located here。他们发布了他们解决的 systemd 配置文件,你没有,所以它可能不是同一个问题,但你失败了同样的 'java.lang.NoClassDefFoundError: PanwHooks` 问题,你们都在使用 systemd 的平台上,他们的解决方案涉及修改 systemd 配置以删除监听器。
将 openjdk 升级到 11.0.12
后,SonarQube 正在启动。
# java -version
openjdk version "11.0.12" 2021-07-20 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.12+7-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.12+7-LTS, mixed mode, sharing)
当我在 CentOS 8 服务器上启动 sonarqube 8.9 时。启动失败并显示 java.lang.NoClassDefFoundError: PanwHooks
异常消息。
尝试了不同的启动方法得到相同的异常。有解决此问题的提示吗?
jvm 1 | WrapperListener.start runner thread started.
jvm 1 | WrapperSimpleApp: start(args) Will wait up to 2 seconds for the main method to complete.
jvm 1 | WrapperSimpleApp: invoking main method
jvm 1 | 2021.07.16 21:45:47 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/sonarqube-8.9.0.43852/temp
jvm 1 | 2021.07.16 21:45:47 DEBUG app[][o.s.a.NodeLifecycle] WrapperSimpleAppMain tryToMoveTo from INIT to STARTING => true
jvm 1 | 2021.07.16 21:45:47 DEBUG app[][o.s.a.p.ManagedProcessLifecycle] WrapperSimpleAppMain tryToMoveTo es from INIT to STARTING => true
jvm 1 | 2021.07.16 21:45:47 INFO app[][o.s.a.es.EsSettings] Elasticsearch cluster enabled. Connect to hosts [192.168.81.88,192.168.81.107,192.168.81.108]
jvm 1 | 2021.07.16 21:45:47 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 192.168.81.108:9001, TCP: 192.168.81.108:9002]
jvm 1 | 2021.07.16 21:45:47 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/sonarqube-8.9.0.43852/elasticsearch]:
/opt/sonarqube/sonarqube-8.9.0.43852/elasticsearch/bin/elasticsearch
jvm 1 |
jvm 1 | WrapperSimpleApp: Encountered an error running main: java.lang.NoClassDefFoundError: PanwHooks
jvm 1 | java.lang.NoClassDefFoundError: PanwHooks
jvm 1 | at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java)
jvm 1 | at org.sonar.application.ProcessLauncherImpl$JavaLangProcessBuilder.start(ProcessLauncherImpl.java:379)
jvm 1 | at org.sonar.application.ProcessLauncherImpl.launchExternal(ProcessLauncherImpl.java:128)
jvm 1 | at org.sonar.application.ProcessLauncherImpl.launch(ProcessLauncherImpl.java:97)
jvm 1 | at org.sonar.application.SchedulerImpl.lambda$tryToStartProcess(SchedulerImpl.java:196)
jvm 1 | at org.sonar.application.process.ManagedProcessHandler.start(ManagedProcessHandler.java:73)
jvm 1 | at org.sonar.application.SchedulerImpl.tryToStartProcess(SchedulerImpl.java:194)
jvm 1 | at org.sonar.application.SchedulerImpl.tryToStartEs(SchedulerImpl.java:146)
jvm 1 | at org.sonar.application.SchedulerImpl.tryToStartAll(SchedulerImpl.java:138)
jvm 1 | at org.sonar.application.SchedulerImpl.schedule(SchedulerImpl.java:112)
jvm 1 | at org.sonar.application.App.start(App.java:68)
jvm 1 | at org.sonar.application.App.main(App.java:97)
jvm 1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1 | at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
jvm 1 | at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
jvm 1 | at java.base/java.lang.reflect.Method.invoke(Method.java:566)
jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
jvm 1 | at java.base/java.lang.Thread.run(Thread.java:829)
jvm 1 | WrapperSimpleApp: start(args) end. Main Completed=true, exitCode=1
jvm 1 | WrapperListener.start runner thread stopped.
jvm 1 | returned from WrapperListener.start()
jvm 1 | WrapperListener.start() returned an exit code of 1.
谢谢
对 SonarQube 社区的搜索显示 this post. They seemed to indicate if you are running systemd, you do not need the wrapper and pointed people to the guide located here。他们发布了他们解决的 systemd 配置文件,你没有,所以它可能不是同一个问题,但你失败了同样的 'java.lang.NoClassDefFoundError: PanwHooks` 问题,你们都在使用 systemd 的平台上,他们的解决方案涉及修改 systemd 配置以删除监听器。
将 openjdk 升级到 11.0.12
后,SonarQube 正在启动。
# java -version
openjdk version "11.0.12" 2021-07-20 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.12+7-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.12+7-LTS, mixed mode, sharing)