sonarqube-azure-setup
sonarqube-azure-setup copied to clipboard
The Elasticsearch Bootstrap cluster has failed the initial checks
Thanks for the excellent guide! I tried to run image in a Web App for Container and for some reason it initially was able to run the Sonarqube on the first time but after rebooting (Because it was still showing H2 database), I started getting the following error -
2019-08-18T09:55:20.862616501Z tail: cannot open './logs/es.log' for reading: No such file or directory
2019-08-18T09:55:23.906838496Z 2019.08.18 09:55:23 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2019-08-18T09:55:24.232454000Z 2019.08.18 09:55:24 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2019-08-18T09:55:24.744697123Z 2019.08.18 09:55:24 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2019-08-18T09:55:25.018441972Z 2019.08.18 09:55:25 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2019-08-18T09:55:27.349069352Z OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2019-08-18T09:55:27.399430100Z 2019.08.18 09:55:27 INFO app[][o.e.p.PluginsService] no modules loaded
2019-08-18T09:55:27.417703690Z 2019.08.18 09:55:27 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2019-08-18T09:55:44.923096208Z tail: './logs/es.log' has appeared; following new file
2019-08-18T09:55:46.923978662Z 2019.08.18 09:55:46 INFO es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/opt/sonarqube/data (/dev/loop0p1)]], net usable_space [3.4gb], net total_space [26.7gb], types [ext4]
2019-08-18T09:55:46.924037963Z 2019.08.18 09:55:46 INFO es[][o.e.e.NodeEnvironment] heap size [503.6mb], compressed ordinary object pointers [true]
2019-08-18T09:55:46.924047863Z 2019.08.18 09:55:46 INFO es[][o.e.n.Node] node name [sonarqube], node ID [thEweOIzSEWbpCEzAsL_Hw]
2019-08-18T09:55:46.924052763Z 2019.08.18 09:55:46 INFO es[][o.e.n.Node] version[6.8.0], pid[21], build[default/tar/65b6179/2019-05-15T20:06:13.172855Z], OS[Linux/4.4.0-128-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/11.0.4/11.0.4+11]
2019-08-18T09:55:46.924059063Z 2019.08.18 09:55:46 INFO es[][o.e.n.Node] JVM arguments [-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=/opt/sonarqube/temp, -XX:ErrorFile=../logs/es_hs_err_pid%p.log, -Des.enforce.bootstrap.checks=true, -Xms512m, -Xmx512m, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/opt/sonarqube/elasticsearch, -Des.path.conf=/opt/sonarqube/temp/conf/es, -Des.distribution.flavor=default, -Des.distribution.type=tar]
2019-08-18T09:55:51.942966779Z 2019.08.18 09:55:51 INFO es[][o.e.p.PluginsService] loaded module [analysis-common]
2019-08-18T09:55:51.942992280Z 2019.08.18 09:55:51 INFO es[][o.e.p.PluginsService] loaded module [lang-painless]
2019-08-18T09:55:51.942998080Z 2019.08.18 09:55:51 INFO es[][o.e.p.PluginsService] loaded module [mapper-extras]
2019-08-18T09:55:51.943011080Z 2019.08.18 09:55:51 INFO es[][o.e.p.PluginsService] loaded module [parent-join]
2019-08-18T09:55:51.943015980Z 2019.08.18 09:55:51 INFO es[][o.e.p.PluginsService] loaded module [percolator]
2019-08-18T09:55:51.943031080Z 2019.08.18 09:55:51 INFO es[][o.e.p.PluginsService] loaded module [reindex]
2019-08-18T09:55:51.943035780Z 2019.08.18 09:55:51 INFO es[][o.e.p.PluginsService] loaded module [repository-url]
2019-08-18T09:55:51.943039980Z 2019.08.18 09:55:51 INFO es[][o.e.p.PluginsService] loaded module [transport-netty4]
2019-08-18T09:55:51.943044280Z 2019.08.18 09:55:51 INFO es[][o.e.p.PluginsService] no plugins loaded
2019-08-18T09:56:04.004852176Z 2019.08.18 09:56:03 WARN es[][o.e.d.c.s.Settings] [http.enabled] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version.
2019-08-18T09:56:12.019139938Z 2019.08.18 09:56:11 INFO es[][o.e.d.DiscoveryModule] using discovery type [zen] and host providers [settings]
2019-08-18T09:56:15.030012063Z 2019.08.18 09:56:14 INFO es[][o.e.n.Node] initialized
2019-08-18T09:56:15.030060363Z 2019.08.18 09:56:14 INFO es[][o.e.n.Node] starting ...
2019-08-18T09:56:15.286264024Z ERROR: [1] bootstrap checks failed
2019-08-18T09:56:15.286865027Z [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
2019-08-18T09:56:15.741996568Z 2019.08.18 09:56:15 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 78
2019-08-18T09:56:15.762457469Z 2019.08.18 09:56:15 INFO app[][o.s.a.SchedulerImpl] Process[es] is stopped
2019-08-18T09:56:15.771063411Z 2019.08.18 09:56:15 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
2019-08-18T09:56:16.030489589Z 2019.08.18 09:56:15 INFO es[][o.e.t.TransportService] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2019-08-18T09:56:16.030523989Z 2019.08.18 09:56:15 INFO es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
2019-08-18T09:56:16.030530289Z 2019.08.18 09:56:15 ERROR es[][o.e.b.Bootstrap] node validation exception
2019-08-18T09:56:16.030535089Z [1] bootstrap checks failed
2019-08-18T09:56:16.030539789Z [1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
2019-08-18T09:56:16.030544489Z 2019.08.18 09:56:15 INFO es[][o.e.n.Node] stopping ...
2019-08-18T09:56:16.030549189Z 2019.08.18 09:56:15 INFO es[][o.e.n.Node] stopped
2019-08-18T09:56:16.030556289Z 2019.08.18 09:56:15 INFO es[][o.e.n.Node] closing ...
2019-08-18T09:56:16.030560589Z 2019.08.18 09:56:15 INFO es[][o.e.n.Node] closed
Any idea what could be the issue?
**EDIT - ** I found that whenever I am passing the Sql Server connection string, it is starting in production mode and is causing this error. If I try to start this up using the normal H2 database, it starts up correctly however, I see the warning that Sonarqube is not running in production mode.
Hi @blueelvis, I see the same issue when I use a PostresSQL Azure Database. Have you been able to resolve your issue in the meantime?
This is the problem:
max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
I have the same issue with current sonarqube images. It looks like there is nothing you can do in case of azure container apps. You'll have to switch to a full VM or AKS in order to increase that parameter (vm.max_map_count) on the host :(
The solution is to add "-Dsonar.search.javaAdditionalOpts=-Dnode.store.allow_mmapfs=false" to app_command_line site config in the azure web app.
This will disable mmapfs bypassing the check.