Upgrade Sonarqube from 6.7.7 to 7.9.1 fails (Windows)

Hello,

Now, I have Sonarqube 6.7.7 with postgreeSQL 9.6.15 in Windows Server 2012 R2.
When I try upgrading sonarqube to the latest version (7.9.1) it fails and after review all configuration I don’t know why.
(I have installed Java 11 yet and check installed postgreeSQL version is compatible)

I get this error in sonar.log:

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

INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqubeultimo\temp
INFO app[o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘es’, ipcIndex=1, logFilenamePrefix=es]] from [C:\sonarqubeultimo\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:\sonarqubeultimo\temp -XX:ErrorFile=…/logs/es_hs_err_pid%p.log -Des.enforce.bootstrap.checks=true -Xmx1G -Delasticsearch -Des.path.home=C:\sonarqubeultimo\elasticsearch -Des.path.conf=C:\sonarqubeultimo\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
Java HotSpot™ 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
INFO app[o.e.p.PluginsService] no modules loaded
INFO app[o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
ERROR: [1] bootstrap checks failed
[1]: initial heap size [134217728] not equal to maximum heap size [1073741824]; this can cause resize pauses and prevents mlockall from locking the entire heap
WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 78
INFO app[o.s.a.SchedulerImpl] Process[es] is stopped
INFO app[o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped

I have checked my C:\Sonarqube\elasticsearch\config\jvm.options and everything is like in the version that is installed now. Can you help me?

Thank you very much

hello, can you please show us the value for the property sonar.search.javaOpts in your sonar.properties ?

sonar.search.javaOpts=-Xmx1G

please give a try with :

sonar.search.javaOpts=-Xms1G -Xmx1G -XX:+HeapDumpOnOutOfMemoryError

Thank you very much! :slight_smile:
Now I can do the upgrade of Sonarqube.

Why does it need those parameters now?

Elasticsearch require to have the initial amount of allocated memory equals to the maximum size of allocated memory :slight_smile: as the error message says, not having this can cause resize pauses and prevents mlockall from locking the entire heap

1 Like