Running SonarQube on docker, getting error on startup (docker run -d --name sonarqube -p 9000:9000 -m 4gb -e (+environment variables). The docker host is Windows Server 2019 DataCenter running on SQL Server back end:
[2] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
I can see that there is an issue in the setup of elastic search but that seems to be part of the docker container, I can’t see that it is something I have control over.
Looking here, there are instructions for this but these are Linux focussed. There doesn’t seem to be anything to tell me how to configure this for docker containers on windows. Environment Variables | SonarQube Docs
Also, I can see mention here again about Linux. sonarqube - Docker Hub
but nothing in terms of instructions for Windows. Install Elasticsearch with Docker | Elasticsearch Reference [7.10] | Elastic
docker-machine ssh gives me the error ‘docker-machine’ is not recognised as an internal or external command. When I installed docker-machine, I got error:
error no machine name(s) specified and no default machine exists
I can see there is something I need to do but no clear instructions on what that something is!
docker run -d --name sonarqube -p 9000:9000 -m 4gb -e SONAR_JDBC_URL=jdbc:sqlserver://xx.xxx.xx.xx;databaseName=DBName -e SONAR_JDBC_USERNAME=username -e SONAR_JDBC_PASSWORD=password -v sonarqube_data:/opt/sonarqube/data -v sonarqube_extensions:/opt/sonarqube/extensions -v sonarqube_logs:/opt/sonarqube/logs sonarqube
2021.01.15 21:40:27 INFO es[][o.e.n.Node] version[7.9.3], pid[36], build[oss/tar/c4138e51121ef06a6404866cddc601906fe5c868/2020-10-16T10:36:16.141335Z], OS[Linux/4.14.35-linuxkit/amd64], JVM[AdoptOpenJDK/OpenJDK 64-Bit Server VM/11.0.8/11.0.8+10]
2021.01.15 21:40:27 INFO es[][o.e.n.Node] JVM home [/opt/java/openjdk]
2021.01.15 21:40:27 INFO es[][o.e.n.Node] JVM arguments [-XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.io.tmpdir=/opt/sonarqube/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, -Des.path.home=/opt/sonarqube/elasticsearch, -Des.path.conf=/opt/sonarqube/temp/conf/es, -Des.distribution.flavor=oss, -Des.distribution.type=tar, -Des.bundled_jdk=false]
2021.01.15 21:40:28 INFO es[][o.e.p.PluginsService] loaded module [analysis-common]
2021.01.15 21:40:28 INFO es[][o.e.p.PluginsService] loaded module [lang-painless]
2021.01.15 21:40:28 INFO es[][o.e.p.PluginsService] loaded module [parent-join]
2021.01.15 21:40:28 INFO es[][o.e.p.PluginsService] loaded module [percolator]
2021.01.15 21:40:28 INFO es[][o.e.p.PluginsService] loaded module [transport-netty4]
2021.01.15 21:40:28 INFO es[][o.e.p.PluginsService] no plugins loaded
2021.01.15 21:40:28 INFO es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/opt/sonarqube/data (/tmp/gcs/d6818d699de0fe3f30f56f61e5a626dc3eac1c4019a3d316f80dce65ca9d56bc/binds/opt/sonarqube/data)]], net usable_space [29.7gb], net total_space [59.3gb], types [9p]
2021.01.15 21:40:28 INFO es[][o.e.e.NodeEnvironment] heap size [495.3mb], compressed ordinary object pointers [true]
2021.01.15 21:40:28 WARN es[][o.e.d.c.s.Settings] [node.master] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version.
2021.01.15 21:40:28 WARN es[][o.e.d.c.s.Settings] [node.data] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version.
2021.01.15 21:40:28 INFO es[][o.e.n.Node] node name [sonarqube], node ID [0E5vCAXjQauLGZuXX3byqg], cluster name [sonarqube]
2021.01.15 21:40:30 WARN es[][o.e.d.c.r.OperationRouting] searches will not be routed based on awareness attributes starting in version 8.0.0; to opt into this behaviour now please set the system property [es.search.ignore_awareness_attributes] to [true]
2021.01.15 21:40:31 INFO es[][o.e.t.NettyAllocator] creating NettyAllocator with the following configs: [name=unpooled, factors={es.unsafe.use_unpooled_allocator=false, g1gc_enabled=false, g1gc_region_size=0b, heap_size=495.3mb}]
2021.01.15 21:40:32 INFO es[][o.e.d.DiscoveryModule] using discovery type [zen] and seed hosts providers [settings]
2021.01.15 21:40:32 WARN es[][o.e.g.DanglingIndicesState] gateway.auto_import_dangling_indices is disabled, dangling indices will not be automatically detected or imported and must be managed manually
2021.01.15 21:40:32 INFO es[][o.e.n.Node] initialized
2021.01.15 21:40:32 INFO es[][o.e.n.Node] starting ...
2021.01.15 21:40:44 INFO es[][o.e.t.TransportService] publish_address {127.0.0.1:40741}, bound_addresses {127.0.0.1:40741}
2021.01.15 21:40:45 INFO es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
2021.01.15 21:40:45 ERROR es[][o.e.b.Bootstrap] node validation exception
[2] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
[2]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
2021.01.15 21:40:45 INFO es[][o.e.n.Node] stopping ...
2021.01.15 21:40:45 INFO es[][o.e.n.Node] stopped
2021.01.15 21:40:45 INFO es[][o.e.n.Node] closing ...
2021.01.15 21:40:45 INFO es[][o.e.n.Node] closed