Hi Gilbert,
Thanks for your prompt support, I have already done the changes in below values as prescribed in sonarqube documentation page you shared.
sysctl -w vm.max_map_count=262144
sysctl -w fs.file-max=65536
ulimit -n 65536
ulimit -u 4096
But there is still some issue can you or anyone in the community help me troubleshoot this.
Attaching some logs and outputs for your reference here.
Below is the output of my sonar.sh file.
sonar@ubuntu:/opt/sonarqube/bin/linux-x86-64$ ./sonar.sh start
Starting SonarQube...
Started SonarQube.
sonar@ubuntu:/opt/sonarqube/bin/linux-x86-64$ ./sonar.sh status
SonarQube is running (2320).
sonar@ubuntu:/opt/sonarqube/bin/linux-x86-64$ ./sonar.sh status
SonarQube is not running.
sonar@ubuntu:/opt/sonarqube/bin/linux-x86-64$
`
Also below are some latest logs from es.log file
2019.10.07 14:09:54 INFO es[][o.e.n.Node] initializing ...
2019.10.07 14:09:54 INFO es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/ (/dev/sda1)]], net usable_space [11.2gb], net total_space [19.5gb], spins? [possibly], types [ext4]
2019.10.07 14:09:54 INFO es[][o.e.e.NodeEnvironment] heap size [503.6mb], compressed ordinary object pointers [true]
2019.10.07 14:09:54 INFO es[][o.e.n.Node] node name [sonarqube], node ID [SMgqu5CET2qyGck3m9NFrQ]
2019.10.07 14:09:54 INFO es[][o.e.n.Node] version[5.6.3], pid[2344], build[1a2f265/2017-10-06T20:33:39.012Z], OS[Linux/5.0.0-31-generic/amd64], JVM[Ubuntu/OpenJDK 64-Bit Server VM/11.0.4/11.0.4+11-post-Ubuntu-1ubuntu218.04.3]
2019.10.07 14:09:54 INFO es[][o.e.n.Node] JVM arguments [-XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -Djdk.io.permissionsUseCanonicalPath=true, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j.skipJansi=true, -Xms512m, -Xmx512m, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/opt/sonarqube/elasticsearch]
2019.10.07 14:09:55 INFO es[][o.e.p.PluginsService] loaded module [aggs-matrix-stats]
2019.10.07 14:09:55 INFO es[][o.e.p.PluginsService] loaded module [ingest-common]
2019.10.07 14:09:55 INFO es[][o.e.p.PluginsService] loaded module [parent-join]
2019.10.07 14:09:55 INFO es[][o.e.p.PluginsService] loaded module [percolator]
2019.10.07 14:09:55 INFO es[][o.e.p.PluginsService] loaded module [reindex]
2019.10.07 14:09:55 INFO es[][o.e.p.PluginsService] loaded module [transport-netty4]
2019.10.07 14:09:55 INFO es[][o.e.p.PluginsService] no plugins loaded
2019.10.07 14:09:58 INFO es[][o.e.d.DiscoveryModule] using discovery type [zen]
2019.10.07 14:09:59 INFO es[][o.e.n.Node] initialized
2019.10.07 14:09:59 INFO es[][o.e.n.Node] starting ...
2019.10.07 14:09:59 INFO es[][o.e.t.TransportService] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2019.10.07 14:10:02 INFO es[][o.e.c.s.ClusterService] new_master {sonarqube}{SMgqu5CET2qyGck3m9NFrQ}{S6deqD2zQuyF8hjdzhFZmA}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}, reason: zen-disco-elected-as-master ([0] nodes joined)
2019.10.07 14:10:02 INFO es[][o.e.n.Node] started
2019.10.07 14:10:02 INFO es[][o.e.g.GatewayService] recovered [0] indices into cluster_state
2019.10.07 14:10:10 INFO es[][o.e.n.Node] stopping ...
2019.10.07 14:10:10 INFO es[][o.e.n.Node] stopped
2019.10.07 14:10:10 INFO es[][o.e.n.Node] closing ...
2019.10.07 14:10:10 INFO es[][o.e.n.Node] closed
sonar.log file
Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
2019.10.07 14:09:49 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2019.10.07 14:09:49 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2019.10.07 14:09:49 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch -Epath.conf=/opt/sonarqube/temp/conf/es
2019.10.07 14:09:49 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.
2019.10.07 14:09:50 INFO app[][o.e.p.PluginsService] no modules loaded
2019.10.07 14:09:50 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:/opt/sonarqube/lib/common/netty-common-4.1.13.Final.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2019.10.07 14:10:03 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
2019.10.07 14:10:03 INFO app[][o.s.a.p.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonarqube]: /usr/lib/jvm/java-11-openjdk-amd64/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/temp -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -cp ./lib/common/*:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.2.5.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process15825974849717185881properties
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:/opt/sonarqube/lib/common/netty-common-4.1.13.Final.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2019.10.07 14:10:10 INFO app[][o.s.a.SchedulerImpl] Process [web] is stopped
2019.10.07 14:10:10 WARN app[][o.s.a.p.AbstractProcessMonitor] Process exited with exit value [es]: 143
2019.10.07 14:10:10 INFO app[][o.s.a.SchedulerImpl] Process [es] is stopped
2019.10.07 14:10:10 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped