Trying to install developers edition but getting an error it won’t start - using latest Postgres SQL. DB user and password exist - DB is using UTF-8. Thanks
When starting 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 | 2021.05.19 22:36:58 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory D:\sonarqube-Dev\sonarqube-8.8.0.42792\temp
jvm 1 | 2021.05.19 22:36:58 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:9226]
jvm 1 | 2021.05.19 22:36:58 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘es’, ipcIndex=1, logFilenamePrefix=es]] from [D:\sonarqube-Dev\sonarqube-8.8.0.42792\elasticsearch]: D:\Program Files\Java\jdk-11.0.11\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djava.io.tmpdir=D:\sonarqube-Dev\sonarqube-8.8.0.42792\temp -XX:ErrorFile=…/logs/es_hs_err_pid%p.log -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 -Dio.netty.allocator.numDirectArenas=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.locale.providers=COMPAT -Des.enforce.bootstrap.checks=true -Xmx512m -Xms512m -XX:MaxDirectMemorySize=256m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=D:\sonarqube-Dev\sonarqube-8.8.0.42792\elasticsearch -Des.path.conf=D:\sonarqube-Dev\sonarqube-8.8.0.42792\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
jvm 1 | 2021.05.19 22:36:58 INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1 | Java HotSpot™ 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
jvm 1 | 2021.05.19 22:36:59 INFO app[o.s.a.SchedulerImpl] Process[es] is up
jvm 1 | 2021.05.19 22:37:00 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘web’, ipcIndex=2, logFilenamePrefix=web]] from [D:\sonarqube-Dev\sonarqube-8.8.0.42792]: D:\Program Files\Java\jdk-11.0.11\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=D:\sonarqube-Dev\sonarqube-8.8.0.42792\temp -XX:-OmitStackTraceInFastThrow --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/;D:\sonarqube-Dev\sonarqube-8.8.0.42792\lib\jdbc\postgresql\postgresql-42.2.19.jar org.sonar.server.app.WebServer D:\sonarqube-Dev\sonarqube-8.8.0.42792\temp\sq-process17782490715341955416properties
jvm 1 | uncaught exception in thread [main]
jvm 1 | java.lang.IllegalStateException: failed to obtain node locks, tried [[D:\sonarqube-Dev\sonarqube-8.8.0.42792\data\es7]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?
jvm 1 | at org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:292)
jvm 1 | at org.elasticsearch.node.Node.(Node.java:351)
jvm 1 | at org.elasticsearch.node.Node.(Node.java:278)
jvm 1 | at org.elasticsearch.bootstrap.Bootstrap$5.(Bootstrap.java:216)
jvm 1 | at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:216)
jvm 1 | at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:387)
jvm 1 | at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159)
jvm 1 | at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
jvm 1 | at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75)
jvm 1 | at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116)
jvm 1 | at org.elasticsearch.cli.Command.main(Command.java:79)
jvm 1 | at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
jvm 1 | at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81)
jvm 1 | For complete error details, refer to the log at D:\sonarqube-Dev\sonarqube-8.8.0.42792\logs\sonarqube.log
jvm 1 | 2021.05.19 22:37:08 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
jvm 1 | 2021.05.19 22:37:08 INFO app[o.s.a.SchedulerImpl] Process[es] is stopped
jvm 1 | 2021.05.19 22:37:11 WARN app[startup] ################################################################################
jvm 1 | 2021.05.19 22:37:11 WARN app[startup] The database must be manually upgraded. Please backup the database and browse /setup. For more information: https://docs.sonarqube.org/latest/setup/upgrading
jvm 1 | 2021.05.19 22:37:11 WARN app[startup] ################################################################################
jvm 1 | 2021.05.19 22:37:18 INFO app[o.s.a.SchedulerImpl] Process[web] is stopped
jvm 1 | 2021.05.19 22:37:18 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped
wrapper | ← Wrapper Stopped
You are upgrading SonarQube from an old version to a new version or an old edition (community) to a new edition (developer), which implies a database migration must occur. Is that what you expected? Is your PostgreSQL DB used with an older version or different edition of SonarQube?
The error means you need to back up your database, go to the browser (Chrome, Firefox, Opera, Edge, etc.) and type in https://$SONARQUBE-HOSTNAME/setup address where $SONARQUBE-HOSTNAME is your SonarQube URL. Then the DB migration/upgrade will begin.
Hi Joe,
Thank you for the response. Oh yes i have community edition installed. Then i installed Dev Edition without removing the community edition. Alright i will try the solution you have provided.
Hello i tried the suggestion this is the message i got when i access community edition (I have the latest community and latest dev edition installed). My POSTGres version is 11.x and freshly installed yesterday when i tried setting up the Dev edition of sonarqube
2021.05.21 21:06:58 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [D:\sonarqube-Dev\sonarqube-8.8.0.42792]: D:\Program Files\Java\jdk-11.0.11\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=D:\sonarqube-Dev\sonarqube-8.8.0.42792\temp -XX:-OmitStackTraceInFastThrow --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/*;D:\sonarqube-Dev\sonarqube-8.8.0.42792\lib\jdbc\postgresql\postgresql-42.2.19.jar org.sonar.server.app.WebServer D:\sonarqube-Dev\sonarqube-8.8.0.42792\temp\sq-process15731150146913328120properties
uncaught exception in thread [main]
java.lang.IllegalStateException: failed to obtain node locks, tried [[D:\sonarqube-Dev\sonarqube-8.8.0.42792\data\es7]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?
at org.elasticsearch.env.NodeEnvironment.<init>(NodeEnvironment.java:292)
at org.elasticsearch.node.Node.<init>(Node.java:351)
Hey Joe,
I followed your instruction. Sonarqube is no longer stopping however, this is what happens - I can’t still access sonarqube http://localhost:9000 - HTTP Status 404 – Not Found (i tried /setup same error) however, when i access http://localhost:9001 (elastic search port i see some details)
D:\sonarqube-Dev\sonarqube-8.8.0.42792\bin\windows-x86-64>startsonar
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 | 2021.05.25 19:37:40 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory D:\sonarqube-Dev\sonarqube-8.8.0.42792\temp
jvm 1 | 2021.05.25 19:37:41 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:6135]
jvm 1 | 2021.05.25 19:37:41 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [D:\sonarqube-Dev\sonarqube-8.8.0.42792\elasticsearch]: D:\Program Files\Java\jdk-11.0.11\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djava.io.tmpdir=D:\sonarqube-Dev\sonarqube-8.8.0.42792\temp -XX:ErrorFile=../logs/es_hs_err_pid%p.log -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 -Dio.netty.allocator.numDirectArenas=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.locale.providers=COMPAT -Des.enforce.bootstrap.checks=true -Xmx512m -Xms512m -XX:MaxDirectMemorySize=256m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=D:\sonarqube-Dev\sonarqube-8.8.0.42792\elasticsearch -Des.path.conf=D:\sonarqube-Dev\sonarqube-8.8.0.42792\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
jvm 1 | 2021.05.25 19:37:41 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 | 2021.05.25 19:38:16 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
jvm 1 | 2021.05.25 19:38:16 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [D:\sonarqube-Dev\sonarqube-8.8.0.42792]: D:\Program Files\Java\jdk-11.0.11\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=D:\sonarqube-Dev\sonarqube-8.8.0.42792\temp -XX:-OmitStackTraceInFastThrow --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/*;D:\sonarqube-Dev\sonarqube-8.8.0.42792\lib\jdbc\postgresql\postgresql-42.2.19.jar org.sonar.server.app.WebServer D:\sonarqube-Dev\sonarqube-8.8.0.42792\temp\sq-process3810226214515426615properties
jvm 1 | 2021.05.25 19:38:34 WARN app[][startup] ################################################################################
jvm 1 | 2021.05.25 19:38:34 WARN app[][startup] The database must be manually upgraded. Please backup the database and browse /setup. For more information: https://docs.sonarqube.org/latest/setup/upgrading
jvm 1 | 2021.05.25 19:38:34 WARN app[][startup] ################################################################################
PostGres SQL config in sonar properties
#----- PostgreSQL 9.3 or greater
# By default the schema named "public" is used. It can be overridden with the parameter "currentSchema".
#sonar.jdbc.url=jdbc:postgresql://localhost/sonarqube?currentSchema=my_schema
sonar.jdbc.url=jdbc:postgresql://localhost:5432/sonarqube
Apologies for the delay. I see you are using a startsonar custom script. Can you show me what you have in that script? Can you try just running SonarQube as ./sonar.sh console?
Also, I suggest creating a new PostgreSQL database with a new user and password and grant privileges on the database (see here) and then use this new database, username, and password in your sonar.properties file.