Sonarqube service keeps restarting (8.2) (Ubuntu18)

Sonarqube version: 8.2 ( Developer Edition) installed on Ubuntu 18.4 LTS
it was working fine for few days suddenly it stopped working.
Below is the logs. the sonarqube service keeps restarting continuously

sudo systemctl status sonar
sonar.service - SonarQube service
Loaded: loaded (/etc/systemd/system/sonar.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2020-10-30 08:31:05 UTC; 502ms ago
Process: 6742 ExecStop=/opt/sonarqube/bin/linux-x86-64/sonar.sh stop (code=exited, status=0/SUCCESS)
Process: 28199 ExecStart=/opt/sonarqube/bin/linux-x86-64/sonar.sh start (code=exited, status=0/SUCCESS)
Main PID: 28261 (wrapper)
Tasks: 25 (limit: 9479)
CGroup: /system.slice/sonar.service
├─28261 /opt/sonarqube/bin/linux-x86-64/./wrapper /opt/sonarqube/bin/linux-x86-64/…/…/conf/wrapper.conf wrapper.syslog.ide
└─28267 java -Dsonar.wrapped=true -Djava.awt.headless=true -Xms8m -Xmx32m -Djava.library.path=./lib -classpath …/…/lib/jsw
Oct 30 08:31:04 sonarqube systemd[1]: Starting SonarQube service…
Oct 30 08:31:05 sonarqube sonar.sh[28199]: Starting SonarQube…
Oct 30 08:31:05 sonarqube sonar.sh[28199]: Started SonarQube.
Oct 30 08:31:05 sonarqube systemd[1]: Started SonarQube service.
Logs from /opt/sonar/logs/sonar.log
Launching a JVM…
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.

2020.10.30 07:41:41 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2020.10.30 07:41:41 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2020.10.30 07:41:41 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘es’, ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch

WrapperSimpleApp: Encountered an error running main: java.lang.NoClassDefFoundError: PanwHooks
java.lang.NoClassDefFoundError: PanwHooks
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java)
at org.sonar.application.ProcessLauncherImpl$JavaLangProcessBuilder.start(ProcessLauncherImpl.java:318)
at org.sonar.application.ProcessLauncherImpl.launchExternal(ProcessLauncherImpl.java:119)
at org.sonar.application.ProcessLauncherImpl.launch(ProcessLauncherImpl.java:89)
at org.sonar.application.SchedulerImpl.lambda$tryToStartProcess$2(SchedulerImpl.java:196)
at org.sonar.application.process.ManagedProcessHandler.start(ManagedProcessHandler.java:73)
at org.sonar.application.SchedulerImpl.tryToStartProcess(SchedulerImpl.java:194)
at org.sonar.application.SchedulerImpl.tryToStartEs(SchedulerImpl.java:146)
at org.sonar.application.SchedulerImpl.tryToStartAll(SchedulerImpl.java:138)
at org.sonar.application.SchedulerImpl.schedule(SchedulerImpl.java:112)
at org.sonar.application.App.start(App.java:69)
at org.sonar.application.App.main(App.java:98)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
at java.base/java.lang.Thread.run(Thread.java:834)

Can any one help me on this
Please let me know if any additional details required.

Hi @Sharathshashi and welcome to the community :wave:

did you have a look at our guide on how to operate sq using systemd?
From the snippet i can see in your post it seems like you are using the wrapper which is not needed for this.

apart from this, the logs would be useful in order to understand the underlying problem as well as the java version

Hi Thanks for replay,
We are using Java 11 & yes i have followed the guid to setup sq server in default config.
Can you please help me on how to remove wrapper configuring

When you take a look at the guide that i was refering to, you will see that there is no wrapper in the systemd service template

[Unit]
Description=SonarQube service
After=syslog.target network.target

[Service]
Type=simple
User=<SONARQUBE_USER>
Group=<SONARQUBE_GROUP>
PermissionsStartOnly=true
ExecStart=/bin/nohup /opt/java/bin/java -Xms32m -Xmx32m -Djava.net.preferIPv4Stack=true -jar <SONARQUBE_HOME>/lib/sonar-application-<VERSION>.jar
StandardOutput=syslog
LimitNOFILE=65536
LimitNPROC=8192
TimeoutStartSec=5
Restart=always
SuccessExitStatus=143

[Install]
WantedBy=multi-user.target

Got it thanks

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.