SonarQube 7.2 won't start with systemd on CentOS 7

General support questions
Post Reply
kalyanbl
Posts: 2
Joined: 2018/08/11 09:45:06
Location: India
Contact:

SonarQube 7.2 won't start with systemd on CentOS 7

Post by kalyanbl » 2018/08/11 09:56:14

Hi folks,

I got CentOS7 on a VM and I try to install properly SonarQube 7.2.1. So I follow this tutorial and install PostgreSQL instead of the MariaDB. I edit the sonar.properties as they say and I correctly install Java 8.

When I want to start with sudo systemctl start sonar I got an error so I do journalctl -xe and systemctl status sonar.service

The first return me

L'unité (unit) sonar.service a commencé à démarrer.
août 03 14:20:44 localhost.localdomain bash[19570]: /bin/bash: /home/enovia/sonarqube-7.2.1/bin/linux-x86-64/sonar.sh: Aucun fichier ou dossier de ce type
août 03 14:20:44 localhost.localdomain systemd[1]: sonar.service: control process exited, code=exited status=127
août 03 14:20:44 localhost.localdomain systemd[1]: Failed to start SonarQube Service.
-- Subject: L'unité (unit) sonar.service a échoué
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/li ... temd-devel
And the second

sonar.service - SonarQube Service
Loaded: loaded (/etc/systemd/system/sonar.service; enabled; vendor preset: disabled)

Active: activating (auto-restart) (Result: exit-code) since ven. 2018-08-03 14:41:14 CEST; 3s ago

Process: 21093 ExecStart=/bin/bash /home/enovia/sonarqube-7.2.1/bin/linux-x86-64/sonar.sh start (code=exited, status=127)


août 03 14:41:14 localhost.localdomain systemd[1]: sonar.service: control process exited, code=exited status=127

août 03 14:41:14 localhost.localdomain systemd[1]: Failed to start SonarQube Service.

août 03 14:41:14 localhost.localdomain systemd[1]: Unit sonar.service entered failed state.

août 03 14:41:14 localhost.localdomain systemd[1]: sonar.service failed.
Here's my sonar.properties :

sonar.jdbc.username=sonar

sonar.jdbc.password=DatabasePass

sonar.jdbc.url=jdbc:postgresql://localhost/sonar

sonar.web.port=10900
Sonar logs file :

`

--> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.

2018.07.30 15:50:44 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /home/enovia/Bureau/sonarqube-7.2.1/temp
2018.07.30 15:50:44 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2018.07.30 15:50:45 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/home/enovia/Bureau/sonarqube-7.2.1/elasticsearch]: /home/enovia/Bureau/sonarqube-7.2.1/elasticsearch/bin/elasticsearch -Epath.conf=/home/enovia/Bureau/sonarqube-7.2.1/temp/conf/es
2018.07.30 15:50:45 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
2018.07.30 15:50:58 INFO app[][o.e.p.PluginsService] no modules loaded
2018.07.30 15:50:58 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2018.07.30 15:52:30 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2018.07.30 15:52:32 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/home/enovia/Bureau/sonarqube-7.2.1]: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-3.b13.el7_5.x86_64/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/home/enovia/Bureau/sonarqube-7.2.1/temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*:/home/enovia/Bureau/sonarqube-7.2.1/lib/jdbc/mysql/mysql-connector-java-5.1.46.jar org.sonar.server.app.WebServer /home/enovia/Bureau/sonarqube-7.2.1/temp/sq-process8191574965959719695properties
2018.07.30 15:53:36 INFO app[][o.s.a.SchedulerImpl] Process [web] is stopped
2018.07.30 15:53:38 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
2018.07.30 15:53:38 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
2018.07.30 15:53:38 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 143
<-- Wrapper Stopped
--> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.

2018.07.31 12:05:33 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /home/enovia/Bureau/sonarqube-7.2.1/temp
2018.07.31 12:05:33 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2018.07.31 12:05:34 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/home/enovia/Bureau/sonarqube-7.2.1/elasticsearch]: /home/enovia/Bureau/sonarqube-7.2.1/elasticsearch/bin/elasticsearch -Epath.conf=/home/enovia/Bureau/sonarqube-7.2.1/temp/conf/es
2018.07.31 12:05:34 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
Startup failed: Timed out waiting for signal from JVM.
JVM did not exit on request, terminated
JVM exited on its own while waiting to kill the application.
JVM exited in response to signal SIGKILL (9).
JVM Restarts disabled. Shutting down.
<-- Wrapper Stopped
--> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.

2018.07.31 12:15:56 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /home/enovia/Bureau/sonarqube-7.2.1/temp
2018.07.31 12:15:56 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2018.07.31 12:15:57 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/home/enovia/Bureau/sonarqube-7.2.1/elasticsearch]: /home/enovia/Bureau/sonarqube-7.2.1/elasticsearch/bin/elasticsearch -Epath.conf=/home/enovia/Bureau/sonarqube-7.2.1/temp/conf/es
2018.07.31 12:15:57 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2018.07.31 12:15:58 INFO app[][o.e.p.PluginsService] no modules loaded
2018.07.31 12:15:58 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2018.07.31 12:16:08 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2018.07.31 12:16:08 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/home/enovia/Bureau/sonarqube-7.2.1]: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-3.b13.el7_5.x86_64/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/home/enovia/Bureau/sonarqube-7.2.1/temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*:/home/enovia/Bureau/sonarqube-7.2.1/lib/jdbc/mysql/mysql-connector-java-5.1.46.jar org.sonar.server.app.WebServer /home/enovia/Bureau/sonarqube-7.2.1/temp/sq-process4251581204595748290properties
2018.07.31 12:16:25 INFO app[][o.s.a.SchedulerImpl] Process [web] is stopped
2018.07.31 12:16:25 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
2018.07.31 12:16:25 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
2018.07.31 12:16:25 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 143
<-- Wrapper Stopped
--> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.

2018.08.01 13:41:07 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /home/enovia/sonarqube-7.2.1/temp
2018.08.01 13:41:07 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2018.08.01 13:41:07 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/home/enovia/sonarqube-7.2.1/elasticsearch]: /home/enovia/sonarqube-7.2.1/elasticsearch/bin/elasticsearch -Epath.conf=/home/enovia/sonarqube-7.2.1/temp/conf/es
2018.08.01 13:41:07 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2018.08.01 13:41:09 INFO app[][o.e.p.PluginsService] no modules loaded
2018.08.01 13:41:09 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2018.08.01 13:41:10 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 1
2018.08.01 13:41:10 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
2018.08.01 13:41:10 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped
--> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.

2018.08.01 15:17:17 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /home/enovia/sonarqube-7.2.1/temp
2018.08.01 15:17:17 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2018.08.01 15:17:18 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/home/enovia/sonarqube-7.2.1/elasticsearch]: /home/enovia/sonarqube-7.2.1/elasticsearch/bin/elasticsearch -Epath.conf=/home/enovia/sonarqube-7.2.1/temp/conf/es
2018.08.01 15:17:18 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2018.08.01 15:17:18 INFO app[][o.e.p.PluginsService] no modules loaded
2018.08.01 15:17:18 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2018.08.01 15:17:20 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 1
2018.08.01 15:17:20 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
2018.08.01 15:17:20 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped
--> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.

2018.08.01 15:18:01 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /home/enovia/sonarqube-7.2.1/temp

WrapperSimpleApp: Encountered an error running main: java.nio.file.AccessDeniedException: /home/enovia/sonarqube-7.2.1/temp/conf/es/elasticsearch.yml
java.nio.file.AccessDeniedException: /home/enovia/sonarqube-7.2.1/temp/conf/es/elasticsearch.yml
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244)
at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
at java.nio.file.Files.delete(Files.java:1126)
at org.sonar.process.FileUtils2$DeleteRecursivelyFileVisitor.visitFile(FileUtils2.java:170)
at org.sonar.process.FileUtils2$DeleteRecursivelyFileVisitor.visitFile(FileUtils2.java:165)
at java.nio.file.Files.walkFileTree(Files.java:2670)
at java.nio.file.Files.walkFileTree(Files.java:2742)
at org.sonar.process.FileUtils2.deleteDirectoryImpl(FileUtils2.java:127)
at org.sonar.process.FileUtils2.deleteDirectory(FileUtils2.java:112)
at org.sonar.application.AppFileSystem$CleanTempDirFileVisitor.visitFile(AppFileSystem.java:117)
at org.sonar.application.AppFileSystem$CleanTempDirFileVisitor.visitFile(AppFileSystem.java:101)
at java.nio.file.Files.walkFileTree(Files.java:2670)
at org.sonar.application.AppFileSystem.createOrCleanTempDirectory(AppFileSystem.java:96)
at org.sonar.application.AppFileSystem.reset(AppFileSystem.java:62)
at org.sonar.application.App.start(App.java:55)
at org.sonar.application.App.main(App.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
at java.lang.Thread.run(Thread.java:748)
<-- Wrapper Stopped
--> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.

2018.08.01 15:38:18 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /etc/sonarqube-7.2.1/temp
2018.08.01 15:38:18 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2018.08.01 15:38:18 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/etc/sonarqube-7.2.1/elasticsearch]: /etc/sonarqube-7.2.1/elasticsearch/bin/elasticsearch -Epath.conf=/etc/sonarqube-7.2.1/temp/conf/es
2018.08.01 15:38:18 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2018.08.01 15:38:19 INFO app[][o.e.p.PluginsService] no modules loaded
2018.08.01 15:38:19 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2018.08.01 15:38:29 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2018.08.01 15:38:29 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/etc/sonarqube-7.2.1]: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-3.b13.el7_5.x86_64/jre/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/etc/sonarqube-7.2.1/temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*:/etc/sonarqube-7.2.1/lib/jdbc/mysql/mysql-connector-java-5.1.46.jar org.sonar.server.app.WebServer /etc/sonarqube-7.2.1/temp/sq-process1389488387217549973properties
2018.08.01 15:38:46 INFO app[][o.s.a.SchedulerImpl] Process [web] is stopped
2018.08.01 15:38:46 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
2018.08.01 15:38:46 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 143
2018.08.01 15:38:46 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped


Any help would be appreciated!

Thank you

hunter86_bg
Posts: 1217
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: SonarQube 7.2 won't start with systemd on CentOS 7

Post by hunter86_bg » 2018/08/11 19:41:51

Without checking everything Inoticed that your application is installed under /home.
This could be a problem if SELINUX is in enforcing.
To check if SELINUX is blocking you run:

Code: Select all

setenforce 0 && getenforce
Then start your apllications and try again.

Post Reply