I am facing an issue while trying to install SonarQube.
Here is the log:
E:\sonarqube-7.1 (1)\sonarqube-7.1\bin\windows-x86-64>startsonar.bat
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 2018.05.21 13:20:36 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory E:\sonarqube-7.1 (1)\sonarqube-7.1\temp
jvm 1 | 2018.05.21 13:20:36 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1 | 2018.05.21 13:20:36 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [E:\sonarqube-7.1 (1)\sonarqube-7.1\elasticsearch]: C:\Program Files (x86)\Java\jdk1.8.0_20\jre\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Djdk.io.permissionsUseCanonicalPath=true -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j.skipJansi=true -Xms512m -Xmx512m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=E:\sonarqube-7.1 (1)\sonarqube-7.1\elasticsearch -cp lib/* org.elasticsearch.bootstrap.Elasticsearch -Epath.conf=E:\sonarqube-7.1 (1)\sonarqube-7.1\temp\conf\es
jvm 1 | 2018.05.21 13:20:36 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1 | Error: Could not create the Java Virtual Machine.
jvm 1 | Error: A fatal exception has occurred. Program will exit.
jvm 1 | Must use the serial GC in the DCEVM
jvm 1 | 2018.05.21 13:20:36 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 1
jvm 1 | 2018.05.21 13:20:36 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
jvm 1 | 2018.05.21 13:20:36 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
jvm 1 | FATAL StatusLogger Interrupted before Log4j Providers could be loaded.
jvm 1 | java.lang.InterruptedException
jvm 1 | at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly(AbstractQueuedSynchronizer.java:1220)
jvm 1 | at java.util.concurrent.locks.ReentrantLock.lockInterruptibly(ReentrantLock.java:335)
jvm 1 | at org.apache.logging.log4j.util.ProviderUtil.lazyInit(ProviderUtil.java:121)
jvm 1 | at org.apache.logging.log4j.util.ProviderUtil.hasProviders(ProviderUtil.java:108)
jvm 1 | at org.apache.logging.log4j.LogManager.<clinit>(LogManager.java:89)
jvm 1 | at org.elasticsearch.common.logging.ESLoggerFactory.getLogger(ESLoggerFactory.java:54)
jvm 1 | at org.elasticsearch.common.logging.Loggers.getLogger(Loggers.java:105)
jvm 1 | at org.elasticsearch.common.logging.Loggers.getLogger(Loggers.java:72)
jvm 1 | at org.elasticsearch.common.component.AbstractComponent.<init>(AbstractComponent.java:37)
jvm 1 | at org.elasticsearch.plugins.PluginsService.<init>(PluginsService.java:97)
jvm 1 | at org.elasticsearch.client.transport.TransportClient.newPluginService(TransportClient.java:101)
jvm 1 | at org.elasticsearch.client.transport.TransportClient.buildTemplate(TransportClient.java:126)
jvm 1 | at org.elasticsearch.client.transport.TransportClient.<init>(TransportClient.java:254)
jvm 1 | at org.sonar.application.process.EsProcessMonitor$MinimalTransportClient.<init>(EsProcessMonitor.java:109)
jvm 1 | at org.sonar.application.process.EsProcessMonitor.buildTransportClient(EsProcessMonitor.java:175)
jvm 1 | at org.sonar.application.process.EsProcessMonitor.getTransportClient(EsProcessMonitor.java:160)
jvm 1 | at org.sonar.application.process.EsProcessMonitor.checkStatus(EsProcessMonitor.java:134)
jvm 1 | at org.sonar.application.process.EsProcessMonitor.checkOperational(EsProcessMonitor.java:93)
jvm 1 | at org.sonar.application.process.EsProcessMonitor.isOperational(EsProcessMonitor.java:78)
jvm 1 | at org.sonar.application.process.SQProcess.refreshState(SQProcess.java:161)
jvm 1 | at org.sonar.application.process.SQProcess$EventWatcher.run(SQProcess.java:220)
jvm 1 | ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
wrapper | <-- Wrapper Stopped
I faced similar issue. I had JDK 1.8 installed, reverting it to JDK 11 fixed the issue.
Related
I'm trying to start SonarQube on a Windows 10 box. I've installed Postgres 10. When I run StartSonar.bat, I get the following:
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 2019.02.07 06:22:23 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\Users\Administrator\Downloads\sonarqube-7.5\sonarqube-7.5\temp
jvm 1 | 2019.02.07 06:22:23 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1 | 2019.02.07 06:22:23 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [C:\Users\Administrator\Downloads\sonarqube-7.5\sonarqube-7.5\elasticsearch]: C:\Program Files\Java\jre1.8.0_201\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Djdk.io.permissionsUseCanonicalPath=true -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j.skipJansi=true -Xms512m -Xmx512m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=C:\Users\Administrator\Downloads\sonarqube-7.5\sonarqube-7.5\elasticsearch -cp lib/* org.elasticsearch.bootstrap.Elasticsearch -Epath.conf=C:\Users\Administrator\Downloads\sonarqube-7.5\sonarqube-7.5\temp\conf\es
jvm 1 | 2019.02.07 06:22:23 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1 | 2019.02.07 06:22:23 INFO app[][o.e.p.PluginsService] no modules loaded
jvm 1 | 2019.02.07 06:22:23 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1 | 2019.02.07 06:22:34 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
jvm 1 | 2019.02.07 06:22:34 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [C:\Users\Administrator\Downloads\sonarqube-7.5\sonarqube-7.5]: C:\Program Files\Java\jre1.8.0_201\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\Users\Administrator\Downloads\sonarqube-7.5\sonarqube-7.5\temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*;C:\Users\Administrator\Downloads\sonarqube-7.5\sonarqube-7.5\lib\jdbc\postgresql\postgresql-42.2.5.jar org.sonar.server.app.WebServer C:\Users\Administrator\Downloads\sonarqube-7.5\sonarqube-7.5\temp\sq-process8601102404220274862properties
jvm 1 | 2019.02.07 06:22:36 INFO app[][o.s.a.SchedulerImpl] Process [web] is stopped
jvm 1 | 2019.02.07 06:22:36 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
jvm 1 | 2019.02.07 06:22:36 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
wrapper | <-- Wrapper Stopped
The following are the changes I've made to the sonar.properties file:
sonar.jdbc.url=jdbc:postgresql://localhost/sonarqube
# By default, ports will be used on all IP addresses associated with the server.
sonar.web.host=192.0.0.1
# TCP port for incoming HTTP connections. Default value is 9000.
sonar.web.port=9000
# Defaults are respectively <installation home>/data and <installation home>/temp
sonar.path.data=data
sonar.path.temp=temp
The following are screenshots from pgAdmin:
So there were two issues.
The first was due to the sonar.web.host property. I had set it to 192.0.0.1 and after I changed it to 127.0.0.1, this issue was resolved.
The second issue was due to the port the database server was using. After I changed it to the default (i.e. 5432), it worked.
I have downloaded the sonarqube and unzipped it to a folder.
As per the document ,
i have followed these steps.
Download the SonarQube Community Edition
Unzip it, let's say in C:\sonarqube or /etc/sonarqube
Start the SonarQube Server:
On Windows, execute:
"C:\sonarqube\bin\windows-x86-xx\StartSonar.bat"
Once i execute this, i found the below error.
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 2018.12.06 14:11:31 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory D:\Public\SIVA\SoftwareInsatallationFolder\Sonarqube\temp
jvm 1 | 2018.12.06 14:11:31 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1 | 2018.12.06 14:11:31 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [D:\Public\SIVA\SoftwareInsatallationFolder\Sonarqube\elasticsearch]: C:\Users\Public\SIVA\SoftwareInsatallationFolder\Java\jre\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Djdk.io.permissionsUseCanonicalPath=true -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j.skipJansi=true -Xms512m -Xmx512m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=D:\Public\SIVA\SoftwareInsatallationFolder\Sonarqube\elasticsearch -cp lib/* org.elasticsearch.bootstrap.Elasticsearch -Epath.conf=D:\Public\SIVA\SoftwareInsatallationFolder\Sonarqube\temp\conf\es
jvm 1 | 2018.12.06 14:11:31 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1 | 2018.12.06 14:11:32 INFO app[][o.e.p.PluginsService] no modules loaded
jvm 1 | 2018.12.06 14:11:32 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1 | Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
jvm 1 | WARNING: An illegal reflective access operation has occurred
jvm 1 | WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:/D:/Public/SIVA/SoftwareInsatallationFolder/Sonarqube/lib/common/netty-common-4.1.13.Final.jar) to constructor java.nio.DirectByteBuffer(long,int)
jvm 1 | WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.ReflectionUtil
jvm 1 | WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
jvm 1 | WARNING: All illegal access operations will be denied in a future release
jvm 1 | 2018.12.06 14:11:36 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 1
jvm 1 | 2018.12.06 14:11:36 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
jvm 1 | 2018.12.06 14:11:36 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
wrapper | <-- Wrapper Stopped
I have run the cmd as administrator , still the error exists.
help me !
Thank you !
You've provided an excerpt from $SONARQUBE_HOME/logs/sonar.log. There are other log files in that directory. Your answer lies in one of them, likely in web.log.
This docs page should help.
Hi i din't get any exception but still sonarQube shutdown after few second
root#testmachine:~/sonarqube-7.1/bin/linux-x86-64# ./sonar.sh start
Starting SonarQube...
Started SonarQube.
root#testmachine:~/sonarqube-7.1/bin/linux-x86-64# ./sonar.sh console
Running SonarQube...
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 2018.04.26 14:46:11 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /root/sonarqube-7.1/temp
jvm 1 | 2018.04.26 14:46:11 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1 | 2018.04.26 14:46:11 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/root/sonarqube-7.1/elasticsearch]: /root/sonarqube-7.1/elasticsearch/bin/elasticsearch -Epath.conf=/root/sonarqube-7.1/temp/conf/es
jvm 1 | 2018.04.26 14:46:11 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1 | 2018.04.26 14:46:12 INFO app[][o.e.p.PluginsService] no modules loaded
jvm 1 | 2018.04.26 14:46:12 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1 | 2018.04.26 14:46:14 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 1
jvm 1 | 2018.04.26 14:46:14 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
jvm 1 | 2018.04.26 14:46:14 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
wrapper | <-- Wrapper Stopped
You seem to be executing as root , SonarQube does not support that. See v6.6 Upgrade Note.
I have installed Sonar on Ubuntu 12.04 LTS with all prerequisites Mysql & Java. When I start the service in console mode below error messages are appearing:
Running SonarQube...
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
wrapper | JVM exited while loading the application.
jvm 1 | wrapper | Unable to start JVM: No such file or directory (2)
wrapper | JVM Restarts disabled. Shutting down.
wrapper | <-- Wrapper Stopped
Even, java environment variable also configured in wrapper.properties file but still the issue persists.
Someone, help me to solve this issue.
After setting the java path in wrapper.java.command (wrapper.properties)
below error is occurring.
Running SonarQube...
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 | 2017.12.19 12:06:19 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube-6.7/temp
jvm 1 | 2017.12.19 12:06:19 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1 | 2017.12.19 12:06:19 INFO app[][o.s.a.p.ProcessLauncherImpl]
Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube-6.7/elasticsearch]: /opt/sonarqube-6.7/elasticsearch/bin/elasticsearch -Epath.conf=/opt/sonarqube-6.7/temp/conf/es
jvm 1 | 2017.12.19 12:06:19 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1 | 2017.12.19 12:06:20 INFO app[][o.e.p.PluginsService] no modules loaded
jvm 1 | 2017.12.19 12:06:20 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1 | 2017.12.19 12:06:22 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 1
jvm 1 | 2017.12.19 12:06:22 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
jvm 1 | 2017.12.19 12:06:22 INFO app[][o.s.a.SchedulerImpl]
SonarQube is stopped
wrapper | <-- Wrapper Stopped
Please help #Eric
It looks like the property wrapper.java.command (in wrapper.conf) is incorrectly set.
The default value is java, if you have installed Java in a particular location, just update this value with the full path of the java executable.
Please, check the permission of jdk folder. I think its not accessible.
On MacOS, i needed copy the wrapper.conf file and past on the same path of wrapper exec with this wrapper.java.command:
wrapper.java.command=/Library/Java/JavaVirtualMachines/jdk-15.0.2.jdk/Contents/Home/bin/java
I create a user sonarqube on Postgres.
I create a database sonarqube on Postgres.
I add host sonarqube sonarqube 127.0.0.1/32 md5 in pg_hba.conf
I custom sonar.properties file:
sonar.jdbc.username=sonarqube
sonar.jdbc.password=sonarqube
sonar.jdbc.url=jdbc:postgresql://localhost/sonarqube
When I start Sonar (sonarqube-6.5\bin\windows-x86-64\StartSonar.bat) I have this logs:
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 2017.09.11 11:49:36 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube-6.5\temp
jvm 1 | 2017.09.11 11:49:36 INFO app[][o.s.a.p.JavaProcessLauncherImpl] Launch process[es]: C:\Program Files\Java\jre1.8.0_144\bin\java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djna.nosys=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=C:\sonarqube-6.5\temp -cp ./lib/common/*;./lib/search/* org.sonar.search.SearchServer C:\sonarqube-6.5\temp\sq-process7757413999425394311properties
jvm 1 | 2017.09.11 11:49:44 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
jvm 1 | 2017.09.11 11:49:44 INFO app[][o.s.a.p.JavaProcessLauncherImpl] Launch process[web]: C:\Program Files\Java\jre1.8.0_144\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=C:\sonarqube-6.5\temp -cp ./lib/common/*;./lib/server/*;C:\sonarqube-6.5\lib\jdbc\postgresql\postgresql-42.1.1.jar org.sonar.server.app.WebServer C:\sonarqube-6.5\temp\sq-process301306345978378097properties
jvm 1 | 2017.09.11 11:49:48 INFO app[][o.s.a.SchedulerImpl] Process [web] is stopped
jvm 1 | 2017.09.11 11:49:48 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
jvm 1 | 2017.09.11 11:49:48 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
wrapper | <-- Wrapper Stopped
I resolve when I change privilege of sonarqube role in my PostgreSQL data base: