Unable to upgrade SonarQube server

Hi all,

I’ve been trying to upgrade SonarQube server from version 8.6 to LTS version 8.9.

So, I followed this “Upgrade Guide | SonarQube Docs” site. I followed “Upgrading from the ZIP file” method.

But It didn’t upgrade as expected. So, I checked the SonarQube logs and found these

So, I checked my database status for upgrade. It’s up to date

Also I have changed the database as Case Sensitve.

Please provide solution to fix this issue.

Regard,
Khopi

Hi Khopi,

The problem is there in your second screenshot. We prefer logs copy/pasted as text rather than screenshots, partly because they’re easier to read and partly because it’s impossible for me to quote from your log to you.

I suggest you go back to your second screenshot. Begin reading after “The database must be manually upgraded”

 
HTH,
Ann

Hi @ganncamp,

Thank you for your reply.

This is the log file that you mentioned

2021.12.12 21:14:43 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\SonarQube\sonarqube-8.9.3.48735\temp
2021.12.12 21:14:43 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:64859]
2021.12.12 21:14:43 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [C:\SonarQube\sonarqube-8.9.3.48735\elasticsearch]: C:\SonarQube\openjdk-11+28_windows-x64_bin\jdk-11\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djava.io.tmpdir=C:\SonarQube\sonarqube-8.9.3.48735\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=C:\SonarQube\sonarqube-8.9.3.48735\elasticsearch -Des.path.conf=C:\SonarQube\sonarqube-8.9.3.48735\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
2021.12.12 21:14:43 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2021.12.12 21:14:45 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2021.12.12 21:14:45 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [C:\SonarQube\sonarqube-8.9.3.48735]: C:\SonarQube\openjdk-11+28_windows-x64_bin\jdk-11\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\SonarQube\sonarqube-8.9.3.48735\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 -Xmx1024m -Xms512m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-8.9.3.48735.jar;C:\SonarQube\sonarqube-8.9.3.48735\lib\jdbc\mssql\mssql-jdbc-9.2.0.jre11.jar org.sonar.server.app.WebServer C:\SonarQube\sonarqube-8.9.3.48735\temp\sq-process9482862505300142632properties
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
uncaught exception in thread [main]
java.lang.IllegalStateException: failed to obtain node locks, tried [[C:\SonarQube\sonarqube-8.9.3.48735\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:368)
	at org.elasticsearch.node.Node.<init>(Node.java:278)
	at org.elasticsearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:217)
	at org.elasticsearch.bootstrap.Bootstrap.setup(Bootstrap.java:217)
	at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:397)
	at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:159)
	at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:150)
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:75)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:116)
	at org.elasticsearch.cli.Command.main(Command.java:79)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:115)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:81)
For complete error details, refer to the log at C:\SonarQube\sonarqube-8.9.3.48735\logs\sonarqube.log
2021.12.12 21:14:50 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
2021.12.12 21:14:50 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2021.12.12 21:14:52 WARN  app[][startup] ################################################################################
2021.12.12 21:14:52 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
2021.12.12 21:14:52 WARN  app[][startup] ################################################################################
2021.12.12 21:15:03 INFO  app[][o.s.a.SchedulerImpl] Process[web] is stopped
2021.12.12 21:15:03 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped

I tried to upgrade the database manually, but it is up to date. You can see it in the third screenshot.

And also I’m getting this error.

2021.12.12 15:03:24 WARN  es[][o.e.c.r.a.DiskThresholdMonitor] flood stage disk watermark [95%] exceeded on [gAyZVIHES0qux1PhvIa1Tg][sonarqube][C:\SonarQube\sonarqube-8.9.3.48735\data\es7\nodes\0] free: 1.4gb[3.5%], all indices on this node will be marked read-only

So, I increased the disk space in Database server. But still I’m getting the same error.

Regards,
Khopi

Hi Khopi,

That second one is the key:

As a result of that you get

I know that 1.4G free seems like a lot, but Elasticsearch is working off of percentages, and 3.5% free doesn’t meet its threshold. You’ll need to free up some disk space. I believe you need to get to the 10% mark. Once you do, just restart SonarQube. The indices will be unlocked automatically.

 
HTH,
Ann

Thank you. I fixed the issue.

Regards,
Khopi

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.