Error running SonarQube console with brew on Mac - macos

I am trying to run /usr/local/opt/sonarqube/bin/sonar console but getting following error:
wrapper | Launching a JVM...
jvm 1 | WrapperManager: Initializing...
jvm 1 | WrapperManager: ERROR - The version of the Wrapper which launched this JVM is "3.5.48"
jvm 1 | WrapperManager: while the version of the Wrapper jar file currently in use
jvm 1 | WrapperManager: is "3.5.49".
jvm 1 | WrapperManager:
jvm 1 | WrapperManager: ERROR - The version of the Wrapper which launched this JVM is
jvm 1 | WrapperManager: "3.5.48" while the version of the native library
jvm 1 | WrapperManager: is "3.5.49".
jvm 1 | WrapperManager:
wrapper | <-- Wrapper Stopped

Faced the same issue and it is now resolved by reinstalling sonarqube.
brew reinstall -s sonarqube

Related

SonarQube Wrapper stopped -> Failure -> Mac OS Big Sur

SonarQube Wrapper stopped
(base) Kalidosss-MacBook-Pro:~ admin$ sh /Applications/SonarQube/bin/macosx-universal-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 |
jvm 1 | WrapperSimpleApp: Encountered an error running main: java.lang.IllegalStateException: SonarQube requires Java 11 to run
jvm 1 | java.lang.IllegalStateException: SonarQube requires Java 11 to run
jvm 1 | at com.google.common.base.Preconditions.checkState(Preconditions.java:508)
jvm 1 | at org.sonar.application.App.checkJavaVersion(App.java:93)
jvm 1 | at org.sonar.application.App.start(App.java:56)
jvm 1 | at org.sonar.application.App.main(App.java:97)
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
jvm 1 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
jvm 1 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
jvm 1 | at java.lang.reflect.Method.invoke(Method.java:498)
jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
jvm 1 | at java.lang.Thread.run(Thread.java:748)
wrapper | <-- Wrapper Stopped

Unable to install sonarqube 7.1 on windows

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.

Unable to start sonarqube 7.1 on mac

I had downloaded latest sonarqube 7.1. And trying to start using command:
./bin/macosx-universal-64/sonar.sh console
But, It's not get started. Logs are:
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:57:34 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /Users/deepakagrawal/softwares/sonarqube-7.1/temp
jvm 1 | 2018.04.26 14:57:34 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1 | 2018.04.26 14:57:34 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/Users/deepakagrawal/softwares/sonarqube-7.1/elasticsearch]: /Users/deepakagrawal/softwares/sonarqube-7.1/elasticsearch/bin/elasticsearch -Epath.conf=/Users/deepakagrawal/softwares/sonarqube-7.1/temp/conf/es
jvm 1 | 2018.04.26 14:57:34 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1 | 2018.04.26 14:57:34 INFO app[][o.e.p.PluginsService] no modules loaded
jvm 1 | 2018.04.26 14:57:34 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1 | Error: Could not find or load main class -XX:+UseConcMarkSweepGC
jvm 1 | 2018.04.26 14:57:34 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 1
jvm 1 | 2018.04.26 14:57:34 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
jvm 1 | 2018.04.26 14:57:34 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
wrapper | <-- Wrapper Stopped
I tried other versions like 7.0. But it's still not working.
I had installed Oracle Java 8.
java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
root user will not work
Looks like elastic search is failing to start. Do not attempt to run sonar as a root. Elastic is designed to prevent you from doing running as root.
$ tail logs/es.log
Caused by: java.lang.RuntimeException: can not run elasticsearch as root
at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:103) ~[elasticsearch-6.8.4.jar:6.8.4]
at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:170) ~[elasticsearch-6.8.4.jar:6.8.4]
at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-6.8.4.jar:6.8.4]
at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-6.8.4.jar:6.8.4]
... 6 more
If you are running as root:
Prepare system user.
Open sonar.sh find RUN_AS_USER and assign your system user.
Notes
If you were using root to avoid file permission issues and just quickly want to get something running, you can do this instead:
sudo chown $(whoami) temp logs -Rv
After a macOS update to 10.14.5 I got a similar log. I found out that write permissions were removed from /opt/sonarqube/temp/, which are needed by elastic search (ls -l /opt/sonarqube/temp/). After re-adding write permissions using chmod, sonarqube started successfully again.

Sonar service stopped after few seconds

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

Issue while installing SonarQube

I tried to install SonarQube on my laptop. But when I run the StartSonar.bat file, I get the following output:
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 | 2016.10.15 04:04:00 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory D:\sonarqube-5.6.3\temp
jvm 1 | 2016.10.15 04:04:00 INFO app[o.s.p.m.JavaProcessLauncher] Launch process[es]: C:\Program Files\Java\jre1.8.0_101\bin\java
jvm 1 | 2016.10.15 04:04:22 INFO app[o.s.p.m.Monitor] Process[es] is stopping
jvm 1 | 2016.10.15 04:04:23 INFO app[o.s.p.m.Monitor] Process[es] is stopped
wrapper | <-- Wrapper Stopped
I checked the logs, but I can't find anything. Maybe I misunderstood.
I had the same problem. I found out that I didn't have the rights to run Sonar in my computer. Had to go and ask someone from IT with administrator rights.
1-Please look into the sonar log not in command line console.
2-Basically this error comes when there is environment variable not set properly.
3-Please check the java version compatibility also.

Resources