Get Started in Two Minutes Guide fails

Fresh install on a fully updated Win10 box.
Fresh download of Sonarqube 7.9 LTS
Fresh download of jdk-11.0.3_windows_x64_bin

Sonarqube extracted to C:\Program Files\sonarqube-7.9

To this point, no error messages shown on screen.

Running C:\Program Files\sonarqube-7.9\bin\windows-x86-64\StartSonar
results in:
Inline code
SonarQube wrapper

–> Wrapper Started as Console Launching a 1VM…
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
WARNING - Unable to load the Wrapper’s native library ‘wrapper.dll’.
The file is located on the path at the following location but could not be
loaded:
C:\Program Files\sonarqube-7.9\bin\windows-x86-64.\lib\wrapper.dll

Please verify that the file is readable by the current user and that the file
has not been corrupted in any way.

One common cause of this problem is running a 32-bit version of the Wrapper with
a 64-bit version of Dava, or vica versa.
This is a 32-bit DVM.
Reported cause:
C:\Program Files\sonarqube-7.9\bin\windows-x86-64\lib\wrapper.dll: Can’t load
AMD 64-bit .dll on a IA 32-bit platform

System signals will not be handled correctly.
W
WrapperSimpleApp: Encountered an error running main:
java.lang.IllegalStateException: SonarQube requires Java 11+ to run
java.lang.IllegalStateException: SonarQube requires Java 11+ to run at
org.sonar.application.App.checkiavaVersion(App.java : 93)
at org.sonar.application.App.start(App.java : 56)
at org.sonar.application.App.main(App.java :98)
at sun.reflect.NativeMethodAccessorlmpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorlmpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorlmpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java : 240)
at java.lang.Thread.run(Unknown Source)
<-- Wrapper Stopped
Press any key to continue …

So for some reason, my fully 64bit system thinks one or more pieces are built for 32bit…
Thoughts or suggestions ?

Mike

Hi,

It could be that you are using another 32 bit installation of Java, that was previously installed.
Note that the next error message indicates that you are running an older version of Java.
Could you run java -version?
Check what you have configured in JAVA_HOME environment variable and also in your PATH.

Everything comes back saying 64-bit… Currently in the process of removing ALL (found 6 versions of JRE installed) installed versions
of JRE and JDK. Once clean, I’ll try again.

thanks.

1 Like

Exactly the same…
Really disappointing software.

It simply doesn’t run.

Welcome @Ricardo_Casquete - please open a new topic for your problem, giving as much details as possible - version of SonarQube, OS you are running on, what command is failing, the logs.

Exact same issue here. I am on the very latest Java release Version 8 update 221. I am running 64-bit win10 pro and 64-bit Java.

Hi @James_Erwin,

SonarQube 7.9+ requires Java 11.

 
Ann

So this failed for me with a different problem. It starts…and then it stops before I can open a web browser to the localhost address (using SonarQube 7.9 community and jdk11 from AdoptOpenJDK):

root@71c906c03d05:/work# /opt/sonarqube-7.9.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    | 2019.10.15 21:49:31 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube-7.9.1/temp
jvm 1    | 2019.10.15 21:49:31 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1    | 2019.10.15 21:49:31 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube-7.9.1/elasticsearch]: /opt/sonarqube-7.9.1/elasticsearch/bin/elasticsearch
jvm 1    | 2019.10.15 21:49:31 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1    | 2019.10.15 21:49:32 INFO  app[][o.e.p.PluginsService] no modules loaded
jvm 1    | 2019.10.15 21:49:32 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1    | OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
jvm 1    | 2019.10.15 21:49:37 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
jvm 1    | 2019.10.15 21:49:37 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
jvm 1    | 2019.10.15 21:49:37 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
wrapper  | <-- Wrapper Stopped
root@71c906c03d05:/work#        

Any thoughts on this one?

Thanks,
James

Hi James,

this error is ES related

jvm 1 | 2019.10.15 21:49:37 INFO app[o.s.a.SchedulerImpl] Process[es] is stopped

you need to check …\sonarqube-7.9.1\logs\es.log for more details.

Gilbert

1 Like

Greetings! Thanks for the response Gilbert. It appears that elasticsearch is not starting. Here are the log entries:

root@71c906c03d05:/opt/sonarqube-7.9.1/logs# more es.log
2019.10.15 22:11:38 ERROR es[][o.e.b.Bootstrap] Exception
java.lang.RuntimeException: can not run elasticsearch as root
        at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:103) ~[elasticsearch-6.8.0.jar:6.8.0]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:170) ~[elasticsearch-6.8.0.jar:6.8.0]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) [elasticsearch-6.8.0.jar:6.8.0]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) [elasticsearch-6.8.0.jar:6.8.0]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) [elasticsearch-6.8.0.jar:6.8.0]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) [elasticsearch-6.8.0.j
ar:6.8.0]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) [elasticsearch-cli-6.8.0.jar:6.8.0]
        at org.elasticsearch.cli.Command.main(Command.java:90) [elasticsearch-cli-6.8.0.jar:6.8.0]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:116) [elasticsearch-6.8.0.jar:6.8.0]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) [elasticsearch-6.8.0.jar:6.8.0]
2019.10.15 22:11:38 WARN  es[][o.e.b.ElasticsearchUncaughtExceptionHandler] uncaught exception in thread [main]
org.elasticsearch.bootstrap.StartupException: java.lang.RuntimeException: can not run elasticsearch as root
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:163) ~[elasticsearch-6.8.0.jar:6.8.0]
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150) ~[elasticsearch-6.8.0.jar:6.8.0]
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86) ~[elasticsearch-6.8.0.
jar:6.8.0]
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124) ~[elasticsearch-cli-6.8.0.jar:6.8.0]
        at org.elasticsearch.cli.Command.main(Command.java:90) ~[elasticsearch-cli-6.8.0.jar:6.8.0]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:116) ~[elasticsearch-6.8.0.jar:6.8.0]
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93) ~[elasticsearch-6.8.0.jar:6.8.0]
Caused by: java.lang.RuntimeException: can not run elasticsearch as root
        at org.elasticsearch.bootstrap.Bootstrap.initializeNatives(Bootstrap.java:103) ~[elasticsearch-6.8.0.jar:6.8.0]
        at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:170) ~[elasticsearch-6.8.0.jar:6.8.0]
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:333) ~[elasticsearch-6.8.0.jar:6.8.0]
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159) ~[elasticsearch-6.8.0.jar:6.8.0]
        ... 6 more

I am going to look into that part with a coworker who may have some insight and I’ll post an update.

Hi,

this is the reason

java.lang.RuntimeException: can not run elasticsearch as root

see Installation introduction | SonarQube Docs :

SonarQube cannot be run as root on Unix-based systems, so create a dedicated user account to use for SonarQube if necessary.

Gilbert

2 Likes

Thank you Gilbert! :slightly_smiling_face: Yep that is what we found. I didn’t know this though because the docs seemed a little vague and also since I started with the Get Started in Two Minutes guide and trying to start with the Community Edition. I had moved to a Developer Edition yesterday when I hit this error, only to hit the same error. I have a 2 week trial license key for this and I’m sure it will be needed so where is that to be pasted? I can create a new thread for this if you prefer. It was not clear from the sales contact email containing the key.

The docs are really fuzzy on permissions for the install folders. Do I change the owner of the folders to the sonarqube user? I need to setup a database (postgresql) too, but now the server will not start now because it cannot write to the logs folder as the sonarqube user. I suggest that the install documents need to be updated with more steps and there’s no way this can happen in 2 minutes unless all other steps are in place before starting the process.

Hi James,

The Two Minutes guide is really a guide for an initial “what is this?” trial, so it assumes that you’re running as yourself on your localhost, in which case when your account expands the zip, everything is owned to you and when you start it up, the account running SonarQube (i.e. you) has access to everything it needs. So yes, just chown -R the SonarQube directory to your SonarQube user and you should be good to go.

For production installation you should take a look at the detailed Install the Server docs.

With regard to the license key, there’s some UI magic in place to direct an Admin-priv-ed user to the license page on the first login, but that isn’t presented on every login (maybe once a day? I forget the details). The direct path is: Administration > Configuration > License Manager.

 
HTH,
Ann

1 Like

Thanks. When I got stuck on that Community edition, which we cannot really use for our c++ source, I switched to trying with the developer edition. At this point that seems to start but I have to now install the trial license key…somewhere, set up PostgreSQL (hopefully 11 is ok) server and then perhaps I can configure it all and get moving with the tool. I’m a bit rusty on linux since it’s been like 16 years and I’ve only been working on it again for a month or so.