I am new to using Sonar. I am trying to run Sonar Server but getting 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 | 2017.12.01 11:20:53 INFO app[][o.s.a.AppFileSystem] Cleaning
or creating temp directory C:\sonarqube-6.5\temp
jvm 1 | 2017.12.01 11:20:54 INFO app[]
[o.s.a.p.JavaProcessLauncherImpl] Launch process[es]: C:\Program
Files\Java\jre1.8.0_151\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-
process3727603115591368728properties
jvm 1 | 2017.12.01 11:21:01 INFO app[][o.s.a.SchedulerImpl]
Process[es] is up
jvm 1 | 2017.12.01 11:21:01 INFO app[][o.s.a.p.JavaProcessLauncherImpl]
Launch process[web]: C:\Program Files\Java\jre1.8.0_151\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\h2\h2-1.3.176.jar
org.sonar.server.app.WebServer C:\sonarqube-6.5\temp\sq-
process5462578831133863784properties
jvm 1 | 2017.12.01 11:21:02 INFO app[][o.s.a.SchedulerImpl] Process
[web] is stopped
jvm 1 | 2017.12.01 11:21:03 INFO app[][o.s.a.SchedulerImpl] Process
[es] is stopped
jvm 1 | 2017.12.01 11:21:03 INFO app[][o.s.a.SchedulerImpl]
SonarQube is stopped
wrapper | <-- Wrapper Stopped
checking the log for web getting error
Failed to initialize end point associated with ProtocolHandler ["http-nio-
0.0.0.0-9000"]java.net.BindException: Address already in use: bind
I am not sure what is solution for this problem I have changed Java Path in wrapper.conf as well added path in environment variable also.
Kindly help me with this.
ProtocolHandler ["http-nio- 0.0.0.0-9000"]java.net.BindException: Address already in use
This kind of error means that another process is listening on port 9000.
Check a few things:
Do you already have another instance of SonarQube running?
Go to localhost:9000 in a browser
Do you have another process that might be using this port?
Check the list of running processes. On Linux you can use netstat -ntlp | grep :9000 to find what's running on port 9000
Once you have identified what else is using port 9000 there are several solution paths:
Kill the other process
Change the configuration of the other process or SonarQube to use a different port
That is becauseof the port already in use so kill the port and use.
with WINDOWS10 default tools:
Step 1: Open Windows PowerShell as Administrator
Step 2: Find PID (ProcessID) for port 8080:
netstat -aon | findstr 9000
TCP 0.0.0.0:8080 0.0.0.0:0 LISTEN 77777
Step 3: Kill the zombie process:
taskkill /f /pid 77777
where "77777" is your PID
I had a perfect solution for this you just need to kill the process of sonarqube. If you are using windows machine I have these steps for you:-
Press the Windows key on your keyboard, type resmon.exe and press Enter.
In the window that appears, click the CPU tab.
In the third bar from the top, see the label Associated Handles.
Type the name of the file you're trying to close into the Search Handles bar, and then
click the magnifying glass icon.
Locate the program that is using your file.
Right-click the program using the file in question and select End Process.
Related
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.
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.
I want to install sonar on my vps (linux x86_64 debian 9) but when i exec this cdm : ./sonar.sh console i have this following log :
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 | 2017.12.14 18:45:28 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /etc/sonarqube/temp
jvm 1 | 2017.12.14 18:45:28 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1 | 2017.12.14 18:45:29 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/etc/sonarqube/elasticsearch]: /etc/sonarqube/elasticsearch/bin/elasticsearch -Epath.conf=/etc/sonarqube/temp/conf/es
jvm 1 | 2017.12.14 18:45:29 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1 | 2017.12.14 18:45:29 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 137
jvm 1 | 2017.12.14 18:45:29 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
jvm 1 | 2017.12.14 18:45:29 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
jvm 1 | 2017.12.14 18:45:29 INFO app[][o.e.p.PluginsService] no modules loaded
jvm 1 | 2017.12.14 18:45:29 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1 | 2017.12.14 18:45:30 WARN app[][i.n.u.i.MacAddressUtil] Failed to find a usable hardware address from the network interfaces; using random bytes: 05:2b:7f:2f:de:90:ca:4a
wrapper | <-- Wrapper Stopped
An idea why the server is shut down immediately? I searched for [es]: 137 but I found nothing :(
it is memory problem. We experienced that kind of problems when we run Sonar as container and we try to limit maximum memory available for Sonar container below 2GB or RAM.
The Sonar runs under the hood Elasticsearch which requires a lot of memory so in this case I suggest to assign more that 2GB for Sonar.
You could also try to limit memory by ES_JAVA_OPTS below 2GB (if you have limited memory server) but when I've tried to play with this option Sonar started sucessfully but after some time and with some traffic problem returns and container stopped.
So the desciption on the ticket mentioned above that this is memory issue is correct: https://github.com/10up/wp-local-docker/issues/6
So I I think in this situation the easiest way to deal with the problem - just increase the memory for your Sonar server (container).
I found this page looking for SonarQube Process exited with exit value [es]: 1 .
I my case the answer was not memory but the fact that I tried to run as root.
Thanks to #Varun for the comment on the original question.
running as a non privileged user solved it for me
root#hostname # useradd sonar
root#hostname # chown -R sonar:sonar /opt/sonarqube
root#hostname # su - sonar
sonar#hostname # cd /opt/sonarqube
sonar#hostname # bin/linux-x86-64/sonar.sh console
The permissions on /opt/sonarqube are probably too wide but this is just a trial install.
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 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.