I’m trying to install SonarQube:10.6.0-Community Image as docker container in Ubuntu 20.04 LTS in Ubuntu 20.04 LTS as part of Suite of Applications as docker container to run local Jenkins Workloads. My Services Include Jenkins 2.440.1,Sonans NexusRepo(3.70.0-03), Vault.
I deploy the above all of the services as Jenkins Compose File. The issue I’m facing is that I’m not able to access Sonar Qube Web Portal. Eventhough my Container is coming up properly and stablised. On Examining Logs I found error realted to Elastic Search as follows which is causing Sonar Qube Portal issues( I think !!). I trired to tweak params in Ubuntu in sysctl i.e fs.inotify.max_user_watches and vm.max_map_count.
But none of these resolve my error releated to elastic search.
Elastic Search Error :
WARN es[][o.e.c.s.ClusterApplierService] failed to notify ClusterStateListener
java.lang.IllegalStateException: unable to launch a new watch service
at org.elasticsearch.common.file.AbstractFileWatchingService.startWatcher(AbstractFileWatchingService.java:159) ~[elasticsearch-8.13.4.jar:?]
at org.elasticsearch.common.file.MasterNodeFileWatchingService.clusterChanged(MasterNodeFileWatchingService.java:67) ~[elasticsearch-8.13.4.jar:?]
at org.elasticsearch.cluster.service.ClusterApplierService.callClusterStateListener(ClusterApplierService.java:560) ~[elasticsearch-8.13.4.jar:?]
at org.elasticsearch.cluster.service.ClusterApplierService.callClusterStateListeners(ClusterApplierService.java:546) ~[elasticsearch-8.13.4.jar:?]
at org.elasticsearch.cluster.service.ClusterApplierService.applyChanges(ClusterApplierService.java:505) ~[elasticsearch-8.13.4.jar:?]
at org.elasticsearch.cluster.service.ClusterApplierService.runTask(ClusterApplierService.java:429) ~[elasticsearch-8.13.4.jar:?]
at org.elasticsearch.cluster.service.ClusterApplierService$UpdateTask.run(ClusterApplierService.java:154) ~[elasticsearch-8.13.4.jar:?]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:917) ~[elasticsearch-8.13.4.jar:?]
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:217) ~[elasticsearch-8.13.4.jar:?]
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:183) ~[elasticsearch-8.13.4.jar:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
at java.lang.Thread.run(Unknown Source) ~[?:?]
Caused by: java.io.IOException: User limit of inotify instances reached or too many open files
at sun.nio.fs.LinuxWatchService.<init>(Unknown Source) ~[?:?]
at sun.nio.fs.LinuxFileSystem.newWatchService(Unknown Source) ~[?:?]
at org.elasticsearch.common.file.AbstractFileWatchingService.startWatcher(AbstractFileWatchingService.java:137) ~[elasticsearch-8.13.4.jar:?]
... 12 more
2024.09.12 10:39:43 WARN es[][o.e.c.r.a.DiskThresholdMonitor] flood stage disk watermark [95%] exceeded on [ktTU66ORQ6eMycWtaYyjgA][sonarqube][/opt/sonarqube/data/es8] free: 9.3gb[4%], all indices on this node will be marked read-only
2024.09.12 10:40:13 WARN es[][o.e.c.r.a.DiskThresholdMonitor] flood stage disk watermark [95%] exceeded on [ktTU66ORQ6eMycWtaYyjgA][sonarqube][/opt/sonarqube/data/es8] free: 9.3gb[4%], all indices on this node will be marked read-only
SonarQube Log :
024.09.12 10:39:05 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/opt/sonarqube/elasticsearch]: /opt/java/openjdk/bin/java -Xms4m -Xmx64m -XX:+UseSerialGC -Dcli.name=server -Dcli.script=./bin/elasticsearch -Dcli.libs=lib/tools/server-cli -Des.path.home=/opt/sonarqube/elasticsearch -Des.path.conf=/opt/sonarqube/temp/conf/es -Des.distribution.type=tar -cp /opt/sonarqube/elasticsearch/lib/*:/opt/sonarqube/elasticsearch/lib/cli-launcher/* org.elasticsearch.launcher.CliToolLauncher
2024.09.12 10:39:05 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
I tried tweaking params for sysctl and tried to increase java heap size param for Javaopts config
3