Error message "max virtual memory areas vm.max_map_count [65530] is too low"

Must-share information (formatted with Markdown):
Hi all
I start upgrading from SonarQube version 6.x to 7.x (7.9.4).
Following error occurs during start up.

2021.09.24 13:43:05 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2021.09.24 13:43:05 WARN  app[][o.s.a.c.CommandFactoryImpl] ES_JAVA_OPTS is defined but will be ignored. Use properties and/or in to change SQ JVM processes options
2021.09.24 13:43:05 INFO  app[][] Elasticsearch listening on /
2021.09.24 13:43:05 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2021.09.24 13:43:05 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2021.09.24 13:43:07 INFO  app[][o.e.p.PluginsService] no modules loaded
2021.09.24 13:43:07 INFO  app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
ERROR: [1] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

My SonarQube is running in OpenShift. I consultant the internet about this error and found following solution:

sysctl -w vm.max_map_count=524288
sysctl -w fs.file-max=131072

But on my side, I’m not allowed to run a privileged container. So, this is no way. I also tried to set "" without any luck.
Du you have any other iedeas?
Thank you very much in advance
Kind regards

Hi Raphael,

First, even 7.9.4 is past EOL. You should upgrade to either the latest version or the current LTS at your earliest convenience. Your upgrade path is:

7.9.4 → 8.9.2 → 9.1 (last step optional)

You may find the Upgrade Guide and the LTS-to-LTS Upgrade Notes helpful. If you have questions about upgrading, feel free to open a new thread for that here.

Regarding your actual question, you’re going to have to find a way to increase those limits. SonarQube simply isn’t going to spin up without that.

Note that by 7.9 official Docker images begin to be available.


Hi Ann
Thank you for your clarification.
I went back to our OpenShift provider and he set the configuration like it is mentioned. Now I could install 7.9.4 and go on with the version 8.9.2.

Regards Rapha