Error on SonarQube 6.0

1,387 views
Skip to first unread message

norega...@gmail.com

unread,
Sep 14, 2016, 7:57:16 AM9/14/16
to SonarQube
Hi all

I've getting the following when trying to run a default sonarqube installation:

Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
  Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.

2016.09.14 12:44:45 INFO  app[o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube\temp
2016.09.14 12:44:45 INFO  app[o.s.p.m.JavaProcessLauncher] Launch process[es]: C:\Program Files (x86)\Java\jre1.8.0_74\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\temp -javaagent:C:\Program Files (x86)\Java\jre1.8.0_74\lib\management-agent.jar -cp ./lib/common/*;./lib/search/* org.sonar.search.SearchServer C:\sonarqube\temp\sq-process963832750465965545properties
2016.09.14 12:44:46 INFO   es[o.s.p.ProcessEntryPoint]  Starting es
2016.09.14 12:44:46 INFO   es[o.s.s.EsSettings]  Elasticsearch listening on /127.0.0.1:9001
2016.09.14 12:44:46 INFO   es[o.elasticsearch.node]  [sonar-1473853485125] version[2.3.3], pid[10212], build[218bdf1/2016-05-17T15:40:04Z]
2016.09.14 12:44:46 INFO   es[o.elasticsearch.node]  [sonar-1473853485125] initializing ...
2016.09.14 12:44:46 INFO   es[o.e.plugins]  [sonar-1473853485125] modules [], plugins [], sites []
2016.09.14 12:44:46 INFO   es[o.elasticsearch.env]  [sonar-1473853485125] using [1] data paths, mounts [[OSDisk (C:)]], net usable_space [322.4gb], net total_space [476gb], spins? [unknown], types [NTFS]
2016.09.14 12:44:46 INFO   es[o.elasticsearch.env]  [sonar-1473853485125] heap size [998.4mb], compressed ordinary object pointers [unknown]
2016.09.14 12:44:50 INFO   es[o.elasticsearch.node]  [sonar-1473853485125] initialized
2016.09.14 12:44:50 INFO   es[o.elasticsearch.node]  [sonar-1473853485125] starting ...
2016.09.14 12:44:51 INFO   es[o.e.transport]  [sonar-1473853485125] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2016.09.14 12:44:51 INFO   es[o.e.discovery]  [sonar-1473853485125] sonarqube/rD_K5Eo7RLeTN79XbVN15Q
2016.09.14 12:44:55 INFO   es[o.e.cluster.service]  [sonar-1473853485125] new_master {sonar-1473853485125}{rD_K5Eo7RLeTN79XbVN15Q}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonar-1473853485125}, reason: zen-disco-join(elected_as_master, [0] joins received)
2016.09.14 12:44:55 INFO   es[o.elasticsearch.node]  [sonar-1473853485125] started
2016.09.14 12:44:55 INFO   es[o.e.gateway]  [sonar-1473853485125] recovered [0] indices into cluster_state
2016.09.14 12:44:55 INFO  app[o.s.p.m.Monitor] Process[es] is up
2016.09.14 12:44:55 INFO  app[o.s.p.m.JavaProcessLauncher] Launch process[web]: C:\Program Files (x86)\Java\jre1.8.0_74\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=C:\sonarqube\temp -javaagent:C:\Program Files (x86)\Java\jre1.8.0_74\lib\management-agent.jar -cp ./lib/common/*;./lib/server/*;C:\sonarqube\lib\jdbc\mssql\sqljdbc42.jar org.sonar.server.app.WebServer C:\sonarqube\temp\sq-process7279884349706658030properties
2016.09.14 12:44:56 INFO  web[o.s.p.ProcessEntryPoint] Starting web
2016.09.14 12:44:56 INFO  web[o.s.s.a.TomcatContexts] Webapp directory: C:\sonarqube\web
2016.09.14 12:44:56 INFO  web[o.a.c.h.Http11NioProtocol] Initializing ProtocolHandler ["http-nio-127.0.0.1-9000"]
2016.09.14 12:44:56 INFO  web[o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2016.09.14 12:44:58 INFO  web[o.s.s.p.ServerImpl] SonarQube Server / 6.0 / 93442889cd219e78b028c7dcf51a30de74c987fe
2016.09.14 12:44:58 INFO  web[o.sonar.db.Database] Create JDBC data source for jdbc:sqlserver://localhost;databaseName=sonar
2016.09.14 12:44:58 ERROR web[o.a.c.c.C.[.[.[/]] Exception sending context initialized event to listener instance of class org.sonar.server.platform.PlatformServletContextListener
org.sonar.api.utils.MessageException: Current version is too old. Please upgrade to Long Term Support version firstly.
2016.09.14 12:44:58 ERROR web[o.a.c.c.StandardContext] One or more listeners failed to start. Full details will be found in the appropriate container log file
2016.09.14 12:44:58 ERROR web[o.a.c.c.StandardContext] Context [] startup failed due to previous errors
2016.09.14 12:44:58 WARN  web[o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [Timer-0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 java.util.TimerThread.mainLoop(Unknown Source)
 java.util.TimerThread.run(Unknown Source)
2016.09.14 12:44:58 INFO  web[o.a.c.h.Http11NioProtocol] Starting ProtocolHandler ["http-nio-127.0.0.1-9000"]
2016.09.14 12:44:58 INFO  web[o.s.s.a.TomcatAccessLog] Web server is started
2016.09.14 12:44:58 INFO  web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2016.09.14 12:44:58 WARN  web[o.s.p.ProcessEntryPoint] Fail to start web
java.lang.IllegalStateException: Webapp did not start
at org.sonar.server.app.EmbeddedTomcat.isUp(EmbeddedTomcat.java:84) ~[sonar-server-6.0.jar:na]
at org.sonar.server.app.WebServer.isUp(WebServer.java:47) [sonar-server-6.0.jar:na]
at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:105) ~[sonar-process-6.0.jar:na]
at org.sonar.server.app.WebServer.main(WebServer.java:68) [sonar-server-6.0.jar:na]
2016.09.14 12:44:58 INFO  web[o.a.c.h.Http11NioProtocol] Pausing ProtocolHandler ["http-nio-127.0.0.1-9000"]
2016.09.14 12:44:59 INFO  web[o.a.c.h.Http11NioProtocol] Stopping ProtocolHandler ["http-nio-127.0.0.1-9000"]
2016.09.14 12:44:59 INFO  web[o.a.c.h.Http11NioProtocol] Destroying ProtocolHandler ["http-nio-127.0.0.1-9000"]
2016.09.14 12:44:59 INFO  web[o.s.s.a.TomcatAccessLog] Web server is stopped
Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="Sun Microsystems Inc."
2016.09.14 12:45:00 INFO  app[o.s.p.m.Monitor] Process[es] is stopping
2016.09.14 12:45:00 INFO   es[o.s.p.StopWatcher]  Stopping process
2016.09.14 12:45:00 INFO   es[o.elasticsearch.node]  [sonar-1473853485125] stopping ...
2016.09.14 12:45:00 INFO   es[o.elasticsearch.node]  [sonar-1473853485125] stopped
2016.09.14 12:45:00 INFO   es[o.elasticsearch.node]  [sonar-1473853485125] closing ...
2016.09.14 12:45:00 INFO   es[o.elasticsearch.node]  [sonar-1473853485125] closed
Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="Sun Microsystems Inc."
2016.09.14 12:45:00 INFO  app[o.s.p.m.Monitor] Process[es] is stopped
Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="Sun Microsystems Inc."
<-- Wrapper Stopped


I'm on version 6 already.  Do I have to downgrade to the LTS version?

nicolas...@sonarsource.com

unread,
Sep 14, 2016, 8:05:32 AM9/14/16
to SonarQube, norega...@gmail.com
Hi,

Which SonarQube version are you upgrading from ? (i.e. which version were you using previously ?). If you come from a version older than SonarQube 5.6 then you must first upgrade to v5.6 LTS (the intermediary LTS) and then to 6.0. This is explicitly mentioned in the SonarQube Upgrade Guide, and it explains why you get this error:

org.sonar.api.utils.MessageException: Current version is too old. Please upgrade to Long Term Support version firstly.

Best regards,
Nicolas

Nore Gabbidon

unread,
Sep 14, 2016, 8:28:22 AM9/14/16
to SonarQube, norega...@gmail.com
Hi Nicolas

It's not an upgrade, its a clean install of V6.0.

nicolas...@sonarsource.com

unread,
Sep 14, 2016, 8:34:31 AM9/14/16
to SonarQube, norega...@gmail.com
Hi Nore,

Please share the output of the following SQL query in the database that you're using ( sqlserver://localhost;databaseName=sonar ):

select text_value from properties where prop_key='sonar.core.version';

Thanks,
Nicolas

Nore Gabbidon

unread,
Sep 14, 2016, 8:37:15 AM9/14/16
to nicolas...@sonarsource.com, SonarQube
I get no rows back with that query Nicolas.

nicolas...@sonarsource.com

unread,
Sep 14, 2016, 10:46:41 AM9/14/16
to SonarQube, nicolas...@sonarsource.com
Hi Nore,

Clearly the database used by SonarQube seems to have been tampered with at some point, and when you start SonarQube 6.0 for the first time it does not find a fresh empty database one would expect it to find for a fresh install.

You're attempting a new installation so the easiest at this point is to start over (and confirm that these basic steps are working): create empty database (e.g. new_sonar_db), get the SonarQube 6.0 distribution , configure sonar.properties to point to that new DB (do not copy-paste some other sonar.properties), start SonarQube.

Best regards,
Nicolas

Nore Gabbidon

unread,
Sep 14, 2016, 11:44:56 AM9/14/16
to SonarQube, nicolas...@sonarsource.com
Hi NIcolas

The database is new.  However after deleting and starting again I'm getting the following:

ActiveRecord::JDBCError: The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.: INSERT INTO [groups] ([name], [description], [created_at], [updated_at]) VALUES(N'sonar-administrators', N'System administrators', '2016-09-14 16:37:03', '2016-09-14 16:37:03')

Nore Gabbidon

unread,
Sep 14, 2016, 12:06:03 PM9/14/16
to SonarQube
Hi 

Found the issue I believe.  Its to do with date formats

This helped:


My login user was set to British English.  Setting the user to English seems to do the trick.  I simply changed my login user (alter login <loginname> with default_language = ENGLISH )
Reply all
Reply to author
Forward
0 new messages