Must-share information (formatted with Markdown):
- Using Community Edition 10.7.0 (also tested with 24.12.0.100206)
- how is SonarQube deployed: Docker
- what are you trying to achieve: Trying to start the container
- what have you tried so far to achieve this: Tried adding
SONAR_SEARCH_JAVAADDITIONALOPTS="-Dbootstrap.system_call_filter=false"
as mentioned in an old post.
I’m starting a fresh install of SonarQube on docker (host system is Debian), and the container is failing to start. I originally had a permissions issue but resolved that, but ElasticSearch is failing its bootstrap checks:
025.01.03 14:56:30 INFO es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
2025.01.03 14:56:30 ERROR es[][o.e.b.Elasticsearch] node validation exception
[1] bootstrap checks failed. You must address the points described in the following [1] lines before starting Elasticsearch. For more information see [https://www.elastic.co/guide/en/elasticsearch/reference/8.14/bootstrap-checks.html]
bootstrap check failure [1] of [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]; for more information see [https://www.elastic.co/guide/en/elasticsearch/reference/8.14/_maximum_map_count_check.html]
ERROR: Elasticsearch did not exit normally - check the logs at /opt/sonarqube/logs/sonarqube.log
2025.01.03 14:56:30 INFO es[][o.e.n.Node] stopping ...
2025.01.03 14:56:30 INFO es[][o.e.n.Node] stopped
2025.01.03 14:56:30 INFO es[][o.e.n.Node] closing ...
2025.01.03 14:56:30 INFO es[][o.e.n.Node] closed
ERROR: Elasticsearch died while starting up, with exit code 78
As mentioned above, I tried adding SONAR_SEARCH_JAVAADDITIONALOPTS="-Dbootstrap.system_call_filter=false"
to my deployment as I saw that in a couple of older posts, but that also fails, with a different error:
2025.01.03 14:59:15 ERROR es[][o.e.b.Elasticsearch] fatal exception while booting Elasticsearch
java.lang.IllegalArgumentException: unknown setting [bootstrap.system_call_filter] please check that any required plugins are installed, or check the breaking changes documentation for removed settings
at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:563) ~[elasticsearch-8.14.1.jar:?]
at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:509) ~[elasticsearch-8.14.1.jar:?]
at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:479) ~[elasticsearch-8.14.1.jar:?]
at org.elasticsearch.common.settings.AbstractScopedSettings.validate(AbstractScopedSettings.java:449) ~[elasticsearch-8.14.1.jar:?]
at org.elasticsearch.common.settings.SettingsModule.<init>(SettingsModule.java:132) ~[elasticsearch-8.14.1.jar:?]
at org.elasticsearch.common.settings.SettingsModule.<init>(SettingsModule.java:50) ~[elasticsearch-8.14.1.jar:?]
at org.elasticsearch.node.NodeConstruction.validateSettings(NodeConstruction.java:503) ~[elasticsearch-8.14.1.jar:?]
at org.elasticsearch.node.NodeConstruction.prepareConstruction(NodeConstruction.java:256) ~[elasticsearch-8.14.1.jar:?]
at org.elasticsearch.node.Node.<init>(Node.java:192) ~[elasticsearch-8.14.1.jar:?]
at org.elasticsearch.bootstrap.Elasticsearch$2.<init>(Elasticsearch.java:240) ~[elasticsearch-8.14.1.jar:?]
at org.elasticsearch.bootstrap.Elasticsearch.initPhase3(Elasticsearch.java:240) ~[elasticsearch-8.14.1.jar:?]
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:75) ~[elasticsearch-8.14.1.jar:?]
ERROR: Elasticsearch did not exit normally - check the logs at /opt/sonarqube/logs/sonarqube.log
I think these are the commands that would resolve things if it was on my host, but how can I do it in the container? I’d prefer not to have to build my own container extending off the published image:
ulimit -n 65536
sysctl -w vm.max_map_count=262144
Thanks!