Get Started in Two Minutes Guide doesn't work

Summary:

  • The demo of SonarQube only work for a seconds following steps in Get Started in Two Minutes Guide.

Enviroment:

  • Windows 10 + 4 Cores + 16Gb Ram + JDK-11.0.4
  • Fresh instance of SonarQube 7.9.1 (Downloaded from “Get Started in Two Minutes Guide” page).

Steps to reproduce:
1.- Download Comunity Edition instance. “Get Started in Two Minutes Guide” page redirect to download page.
2.- Unzip it in *C:\sonarqube-7.9.1*
3.- Execute “C:\sonarqube\bin\windows-x86-xx\StartSonar.bat” in the console. All seems ok. Log:

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.09.04 08:49:52 INFO  app [ ][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube-7.9.1\temp
jvm 1    | 2019.09.04 08:49:52 INFO  app [][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
jvm 1    | 2019.09.04 08:49:53 INFO  app [][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [C:\sonarqube-7.9.1\elasticsearch]: C:\Program Files\Java\jdk-11.0.4\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.io.tmpdir=C:\sonarqube-7.9.1\temp -XX:ErrorFile=../logs/es_hs_err_pid%p.log -Xms512m -Xmx512m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=C:\sonarqube-7.9.1\elasticsearch -Des.path.conf=C:\sonarqube-7.9.1\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
jvm 1    | 2019.09.04 08:49:53 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
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    | 2019.09.04 08:49:53 INFO  app[][o.e.p.PluginsService] no modules loaded
jvm 1    | 2019.09.04 08:49:53 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
jvm 1    | 2019.09.04 08:49:55 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
jvm 1    | 2019.09.04 08:49:55 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [C:\sonarqube-7.9.1]: C:\Program Files\Java\jdk-11.0.4\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\sonarqube-7.9.1\temp --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/common/*;C:\sonarqube-7.9.1\lib\jdbc\h2\h2-1.3.176.jar org.sonar.server.app.WebServer C:\sonarqube-7.9.1\temp\sq-process5474940711028927724properties
jvm 1    | 2019.09.04 08:49:55 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
jvm 1    | 2019.09.04 08:49:55 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
jvm 1    | 2019.09.04 08:50:14 INFO  app[][o.s.a.SchedulerImpl] Process[web] is up

4.- Log in to http://localhost:9000 with admin/admin.
5.- After several seconds (Sometimes 5 seconds…sometimes I can create a new project, maybe 20 seconds) the application crash. Log:

jvm 1    | 2019.09.04 08:50:55 INFO  app[][o.s.a.p.ManagedProcessHandler] web failed to stop in a quick fashion. Killing it.
jvm 1    | 2019.09.04 08:50:55 INFO  app[][o.s.a.SchedulerImpl] Process[web] is stopped
jvm 1    | 2019.09.04 08:50:55 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
wrapper  | <-- Wrapper Stopped

6.- es.log shows several errors as the following. I dont know if it is related:



2019.09.04 08:55:11 WARN es[o.e.t.TcpTransport] exception caught on transport layer [Netty4TcpChannel{localAddress=/127.0.0.1:9001, remoteAddress=/127.0.0.1:50839}], closing connection
java.io.IOException: Se ha forzado la interrupción de una conexión existente por el host remoto
P.S.: use the bug:fault sub-category if you’re hitting a specific crash/error , or the #bug:fp sub-category for rules-related behaviour

Can anyone help me?
Thank you. Regards,
Iñigo

Hi Inigo,

Welcome to the community!

For the record, any time you have errors in your logs, it’s really better to include the full stacktrace with a few lines before for context.

Google translate tells me the error you’re getting about the connection being closed by the host. Since the “remote” address is actually on the same machine, then we’re looking at something on the machine killing the connection, and so SonarQube shuts down because it doesn’t have access to all the resources it needs.

I suspect that Windows or some automated process is “helpfully” killing off “suspicious” connections it doesn’t recognize. This belief is fueled by the fact that I’ve never encountered similar problems on Linux.

 
HTH,
Ann