changed the limits.conf with line sonar - nofile 65535
sudo sysctl -w vm.max_map_count=262144
tail -f /opt/sonarqube/logs/sonar.log - I am seeing below statements repetatively.
020.08.03 14:24:43 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2020.08.03 14:24:43 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2020.08.03 14:24:43 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2020.08.03 14:24:43 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.
2020.08.03 14:24:44 INFO app[][o.e.p.PluginsService] no modules loaded
2020.08.03 14:24:44 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
ERROR: [1] bootstrap checks failed
[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]
2020.08.03 14:24:49 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 78
2020.08.03 14:24:49 INFO app[][o.s.a.SchedulerImpl] Process[es] is stopped
2020.08.03 14:24:49 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
<-- Wrapper Stopped
--> Wrapper Started as Daemon
Launching a JVM...
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
When you sudo sysctl... that changes the values for the current session. Not necessarily the session SonarQube is running in if you’re running it as a service. There are system files you need to edit for this. The docs should help.
Error
If i start sonar qube from Sonar user getting below error
2020.08.04 06:06:41 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
2020.08.04 06:06:41 ERROR app[][o.s.a.p.ManagedProcessHandler] Fail to launch process [es]
java.lang.IllegalStateException: Cannot write Elasticsearch yml settings file
at org.sonar.application.es.EsYmlSettings.writeToYmlSettingsFile(EsYmlSettings.java:53)
at org.sonar.application.ProcessLauncherImpl.writeConfFiles(ProcessLauncherImpl.java:152)
at org.sonar.application.ProcessLauncherImpl.launch(ProcessLauncherImpl.java:84)
at org.sonar.application.SchedulerImpl.lambda$tryToStartProcess$2(SchedulerImpl.java:196)
at org.sonar.application.process.ManagedProcessHandler.start(ManagedProcessHandler.java:73)
at org.sonar.application.SchedulerImpl.tryToStartProcess(SchedulerImpl.java:194)
If I am starting with Root user
2020.08.04 06:05:44 INFO app[][o.e.c.t.TransportClientNodesService] failed to get node info for {#transport#-1}{DnoxOe9ISM2j_vOfLBjI-A}{127.0.0.1}{127.0.0.1:9001}, disconnecting...
java.lang.IllegalStateException: Future got interrupted
at org.elasticsearch.common.util.concurrent.FutureUtils.get(FutureUtils.java:60)
at org.elasticsearch.action.support.AdapterActionFuture.actionGet(AdapterActionFuture.java:34)
at org.elasticsearch.transport.ConnectionManager.internalOpenConnection(ConnectionManager.java:209)
at org.elasticsearch.transport.ConnectionManager.open