Sonarqube UI is not coming up, elasticsearch issue, Log4j issue

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) - 9.2.4
  • how is SonarQube deployed: zip, Docker, Helm - zip
  • what are you trying to achieve - Not able to start Sonarqube
  • what have you tried so far to achieve this

we are on RHEL8
getting below error in start up:

May 05 18:41:01 systemd[1]: Started SonarQube service.

May 05 18:41:01 sudo[1167648]: puser : PWD=/ ; USER=root ; COMMAND=/usr/sbin/sysctl -w vm.max_map_count=524228

May 05 18:41:01 startup.sh[1167659]: vm.max_map_count = 524228

May 05 18:41:01 startup.sh[1167661]: sysctl: permission denied on key ‘fs.file-max’

May 05 18:41:02 startup.sh[1167662]: 2024.05.05 18:41:02 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp

May 05 18:41:02 startup.sh[1167662]: 2024.05.05 18:41:02 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:457>

May 05 18:41:03 startup.sh[1167662]: 2024.05.05 18:41:03 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘es’, ipcIndex=1, logFilenamePrefix=es]] f>

May 05 18:41:03 startup.sh[1167662]: 2024.05.05 18:41:03 INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

sonarqube.service - SonarQube service
   Loaded: loaded (/etc/systemd/system/sonarqube.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2024-05-05 18:41:01 CDT; 3s ago
 Main PID: 1167647 (startup.sh)
    Tasks: 60 (limit: 48950)
   Memory: 220.3M
   CGroup: /system.slice/sonarqube.service
           ├─1167647 /bin/bash /opt/sonarqube/bin/linux-x86-64/startup.sh
           ├─1167662 /etc/alternatives/jre_11_openjdk/bin/java -Xms64m -Xmx64m -Djava.net.preferIPv4Stack=true -jar /opt/sonarqube/lib/sonar-application-9.2.4.50792.jar
           ├─1167698 /bin/bash /opt/sonarqube/elasticsearch/bin/elasticsearch
           └─1167730 /usr/lib/jvm/java-11-openjdk-11.0.23.0.9-3.el8.x86_64/bin/java -Xshare:auto -cp /opt/sonarqube/elasticsearch/lib/* org.elasticsearch.tools.java_ve>

May 05 18:41:01 systemd[1]: Started SonarQube service.
May 05 18:41:01  sudo[1167648]: puser : PWD=/ ; USER=root ; COMMAND=/usr/sbin/sysctl -w vm.max_map_count=524228
May 05 18:41:01  startup.sh[1167659]: vm.max_map_count = 524228
May 05 18:41:01  startup.sh[1167661]: sysctl: permission denied on key 'fs.file-max'
May 05 18:41:02  startup.sh[1167662]: 2024.05.05 18:41:02 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
May 05 18:41:02  startup.sh[1167662]: 2024.05.05 18:41:02 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:457>
May 05 18:41:03  startup.sh[1167662]: 2024.05.05 18:41:03 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] f>
May 05 18:41:03  startup.sh[1167662]: 2024.05.05 18:41:03 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running

Sonar.log shows below info:

2024.05.05 19:25:23 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2024.05.05 19:25:27 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
2024.05.05 19:25:27 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2024.05.05 19:25:27 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
2024.05.05 19:25:29 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2024.05.05 19:25:29 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:44493]
2024.05.05 19:25:29 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2024.05.05 19:25:30 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2024.05.05 19:25:33 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
2024.05.05 19:25:33 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2024.05.05 19:25:33 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
2024.05.05 19:25:36 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2024.05.05 19:25:36 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:36545]
2024.05.05 19:25:36 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2024.05.05 19:25:36 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2024.05.05 19:25:40 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
2024.05.05 19:25:40 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2024.05.05 19:25:40 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
2024.05.05 19:25:44 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2024.05.05 19:25:44 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening o

updated startup.sh with sudo to run fs.file-max, getting below msg in status of service.

elasticserach is not running, it should be part of startup script right!? why is not running?

[puser@server logs]$ sudo systemctl status sonarqube.service 
● sonarqube.service - SonarQube service
   Loaded: loaded (/etc/systemd/system/sonarqube.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2024-05-05 20:06:19 CDT; 4s ago
 Main PID: 63003 (startup.sh)
    Tasks: 69 (limit: 48950)
   Memory: 699.1M
   CGroup: /system.slice/sonarqube.service
           ├─63003 /bin/bash /opt/sonarqube/bin/linux-x86-64/startup.sh
           ├─63010 /etc/alternatives/jre_17_openjdk/bin/java -Xms64m -Xmx64m -Djava.net.preferIPv4Stack=true -jar /opt/sonarqube/lib/sonar-application-9.2.4.50792.jar
           └─63057 /usr/lib/jvm/java-17-openjdk-17.0.11.0.9-2.el8.x86_64/bin/java -XX:+UseG1GC -Djava.io.tmpdir=/opt/sonarqube/temp -XX:ErrorFile=../logs/es_hs_err_pid>

May 05 20:06:19  systemd[1]: Started SonarQube service.
May 05 20:06:19 sudo[63004]: pwamsnqu : PWD=/ ; USER=root ; COMMAND=/usr/sbin/sysctl -w vm.max_map_count=524228
May 05 20:06:19 startup.sh[63005]: vm.max_map_count = 524228
May 05 20:06:19 sudo[63007]: puser : PWD=/ ; USER=root ; COMMAND=/usr/sbin/sysctl -w fs.file-max=131072
May 05 20:06:19 startup.sh[63008]: fs.file-max = 131072
May 05 20:06:21 startup.sh[63010]: 2024.05.05 20:06:21 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
May 05 20:06:21 startup.sh[63010]: 2024.05.05 20:06:21 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:44983]
May 05 20:06:21 startup.sh[63010]: 2024.05.05 20:06:21 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] fro>
May 05 20:06:21 startup.sh[63010]: 2024.05.05 20:06:21 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running

es.log - below

tail -f es.log 
2024.03.24 05:27:22 INFO  es[][o.e.h.AbstractHttpServerTransport] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2024.03.24 05:27:22 INFO  es[][o.e.n.Node] started
2024.03.24 05:27:22 INFO  es[][o.e.g.GatewayService] recovered [7] indices into cluster_state
2024.03.24 05:27:25 INFO  es[][o.e.c.r.a.AllocationService] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[metadatas][0]]]).
2024.03.30 18:36:22 WARN  es[][o.e.t.ThreadPool] timer thread slept for [41s/41007ms] on absolute clock which is above the warn threshold of [5000ms]
2024.03.30 18:36:23 WARN  es[][o.e.t.ThreadPool] timer thread slept for [41s/41006908651ns] on relative clock which is above the warn threshold of [5000ms]
2024.05.05 05:41:35 INFO  es[][o.e.n.Node] stopping ...
2024.05.05 05:41:35 INFO  es[][o.e.n.Node] stopped
2024.05.05 05:41:35 INFO  es[][o.e.n.Node] closing ...
2024.05.05 05:41:35 INFO  es[][o.e.n.Node] closed

sonar.log - below

2024.05.05 20:11:48 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2024.05.05 20:11:48 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2024.05.05 20:11:53 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
2024.05.05 20:11:53 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2024.05.05 20:11:53 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
2024.05.05 20:11:55 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2024.05.05 20:11:55 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:33541]
2024.05.05 20:11:55 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2024.05.05 20:11:55 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2024.05.05 20:11:58 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 1
2024.05.05 20:11:58 INFO  app[][o.s.a.SchedulerImpl] Process[es] is stopped
2024.05.05 20:11:58 ERROR app[][o.s.a.p.EsManagedProcess] Failed to check status
org.elasticsearch.ElasticsearchException: java.lang.InterruptedException
	at org.elasticsearch.client.RestHighLevelClient.performClientRequest(RestHighLevelClient.java:2695)
	at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:2171)
	at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:2137)
	at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:2105)
	at org.elasticsearch.client.ClusterClient.health(ClusterClient.java:151)
	at org.sonar.application.es.EsConnectorImpl.getClusterHealthStatus(EsConnectorImpl.java:64)
	at org.sonar.application.process.EsManagedProcess.checkStatus(EsManagedProcess.java:97)
	at org.sonar.application.process.EsManagedProcess.checkOperational(EsManagedProcess.java:89)
	at org.sonar.application.process.EsManagedProcess.isOperational(EsManagedProcess.java:67)
	at org.sonar.application.process.ManagedProcessHandler.refreshState(ManagedProcessHandler.java:220)
	at org.sonar.application.process.ManagedProcessHandler$EventWatcher.run(ManagedProcessHandler.java:285)
Caused by: java.lang.InterruptedException: null
	at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1048)
	at org.elasticsearch.common.util.concurrent.BaseFuture$Sync.get(BaseFuture.java:243)
	at org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.java:75)
	at org.elasticsearch.client.RestHighLevelClient.performClientRequest(RestHighLevelClient.java:2692)
	... 10 common frames omitted
2024.05.05 20:11:58 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
2024.05.05 20:12:01 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
2024.05.05 20:12:01 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:45117]
2024.05.05 20:12:01 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
2024.05.05 20:12:01 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running

@Joe @ganncamp @jmelter Can you please check and help me on this?
thank you.

Hi,

Per the FAQ, please don’t @ people not already involved in your thread. You may think it moves you to the tops of their lists, but it typically does just the opposite.

Regarding your question, your version is past EOL. You should upgrade to either the latest version or the current LTA (long-term active version) at your earliest convenience. Your upgrade path is:

9.2.4 → 9.9.4 → 10.5.1 (last step optional)

You may find these resources helpful:

 
Ann
If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.

Thank you Ann

it was log4j file in elasticserach/lib folder, we renamed that file, when the server restarted, elastic search was not coming up without log4j.

we restored the file, then it started working.

upgraded Sonarqube to 9.9.4, it looks good , up and running.

I see this warning msg in startup, do we need to fix this warning?

WARNING: A terminally deprecated method in java.lang.System has been called
May 15 18:13:53  startup.sh[1615979]: WARNING: System::setSecurityManager has been called by org.sonar.process.PluginSecurityManager (f>
May 15 18:13:53  startup.sh[1615979]: WARNING: Please consider reporting this to the maintainers of org.sonar.process.PluginSecurityMan>
May 15 18:13:53  startup.sh[1615979]: WARNING: System::setSecurityManager will be removed in a future release

Hi,

You can ignore those warnings.

 
Ann

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.