Last 1 hours + getting this message on my local sonarqube server when string -Waiting for Elasticsea

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) - sonarqube-10.4.1.88267
  • how is SonarQube deployed: zip, Docker, Helm - zip in local system for testing
  • what are you trying to achieve
  • what have you tried so far to achieve this

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

Welcome :slight_smile:

you didn’t reveil any details beside the Sonarqube version.
We need to check the logs in $SONARQUBE_HOME/logs see

You can attach your logs, redacting the sensitive parts if necessary.

Gilbert

es.log

2024.04.26 14:31:35 INFO  es[][o.e.n.Node] version[8.11.0], pid[19068], build[tar/d9ec3fa628c7b0ba3d25692e277ba26814820b20/2023-11-04T10:04:57.184859352Z], OS[Windows 11/10.0/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/17.0.8/17.0.8+9-LTS-211]
2024.04.26 14:31:35 INFO  es[][o.e.n.Node] JVM home [C:\Program Files\Java\jdk-17], using bundled JDK [false]
2024.04.26 14:31:35 INFO  es[][o.e.n.Node] JVM arguments [-Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -Djava.security.manager=allow, -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, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j2.formatMsgNoLookups=true, -Djava.locale.providers=SPI,COMPAT, --add-opens=java.base/java.io=org.elasticsearch.preallocate, -XX:+UseG1GC, -Djava.io.tmpdir=E:\xyz\xyz_Cpu\Demo-Projects\SonarTest\ServerV1\sonarqube-10.5.0.89998\temp, -XX:ErrorFile=E:\xyz\xyz_Cpu\Demo-Projects\SonarTest\ServerV1\sonarqube-10.5.0.89998\logs\es_hs_err_pid%p.log, -Xlog:disable, -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, -Djna.tmpdir=E:\xyz\xyz_Cpu\Demo-Projects\SonarTest\ServerV1\sonarqube-10.5.0.89998\temp, -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, -Dlog4j2.formatMsgNoLookups=true, -Djava.locale.providers=COMPAT, -Dcom.redhat.fips=false, -Xmx512m, -Xms512m, -XX:MaxDirectMemorySize=256m, -XX:+HeapDumpOnOutOfMemoryError, -XX:G1HeapRegionSize=4m, -XX:InitiatingHeapOccupancyPercent=30, -XX:G1ReservePercent=15, -Des.distribution.type=tar, --module-path=E:\xyz\xyz_Cpu\Demo-Projects\SonarTest\ServerV1\sonarqube-10.5.0.89998\elasticsearch\lib, --add-modules=jdk.net, --add-modules=ALL-MODULE-PATH, -Djdk.module.main=org.elasticsearch.server]
2024.04.26 14:31:38 INFO  es[][o.e.p.PluginsService] loaded module [lang-painless]
2024.04.26 14:31:38 INFO  es[][o.e.p.PluginsService] loaded module [x-pack-core]
2024.04.26 14:31:38 INFO  es[][o.e.p.PluginsService] loaded module [old-lucene-versions]
2024.04.26 14:31:38 INFO  es[][o.e.p.PluginsService] loaded module [parent-join]
2024.04.26 14:31:38 INFO  es[][o.e.p.PluginsService] loaded module [rest-root]
2024.04.26 14:31:38 INFO  es[][o.e.p.PluginsService] loaded module [reindex]
2024.04.26 14:31:38 INFO  es[][o.e.p.PluginsService] loaded module [x-pack-redact]
2024.04.26 14:31:38 INFO  es[][o.e.p.PluginsService] loaded module [analysis-common]
2024.04.26 14:31:38 INFO  es[][o.e.p.PluginsService] loaded module [x-pack-security]
2024.04.26 14:31:38 INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]
2024.04.26 14:31:38 INFO  es[][o.e.p.PluginsService] loaded module [aggregations]
2024.04.26 14:31:38 INFO  es[][o.e.p.PluginsService] loaded module [apm]
2024.04.26 14:31:41 INFO  es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[New Volume (E:)]], net usable_space [440.3gb], net total_space [499.9gb], types [NTFS]
2024.04.26 14:31:41 INFO  es[][o.e.e.NodeEnvironment] heap size [512mb], compressed ordinary object pointers [true]
2024.04.26 14:31:41 INFO  es[][o.e.n.Node] node name [sonarqube], node ID [XmtTGZUjR0qMFKdY5MoO4A], cluster name [sonarqube], roles [data_frozen, ingest, data_cold, data, remote_cluster_client, master, data_warm, data_content, transform, data_hot, ml]
2024.04.26 14:31:43 INFO  es[][o.e.x.s.Security] Security is disabled
2024.04.26 14:31:43 INFO  es[][o.e.t.n.NettyAllocator] creating NettyAllocator with the following configs: [name=unpooled, suggested_max_allocation_size=1mb, factors={es.unsafe.use_unpooled_allocator=null, g1gc_enabled=true, g1gc_region_size=4mb, heap_size=512mb}]
2024.04.26 14:31:43 INFO  es[][o.e.i.r.RecoverySettings] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]
2024.04.26 14:31:43 INFO  es[][o.e.d.DiscoveryModule] using discovery type [single-node] and seed hosts providers [settings]
2024.04.26 14:31:44 INFO  es[][o.e.n.Node] initialized
2024.04.26 14:31:44 INFO  es[][o.e.n.Node] starting ...
2024.04.26 14:31:44 INFO  es[][o.e.t.TransportService] publish_address {127.0.0.1:59152}, bound_addresses {127.0.0.1:59152}
2024.04.26 14:31:45 INFO  es[][o.e.c.c.ClusterBootstrapService] this node is locked into cluster UUID [1lZqgE67SPun9Q5rF5X1wg] and will not attempt further cluster bootstrapping
2024.04.26 14:31:45 INFO  es[][o.e.c.s.MasterService] elected-as-master ([1] nodes joined in term 5)[_FINISH_ELECTION_, {sonarqube}{XmtTGZUjR0qMFKdY5MoO4A}{YqST4eo7RVi9Zax1TfmhFg}{sonarqube}{127.0.0.1}{127.0.0.1:59152}{cdfhilmrstw}{8.11.0}{7000099-8500003} completing election], term: 5, version: 18, delta: master node changed {previous [], current [{sonarqube}{XmtTGZUjR0qMFKdY5MoO4A}{YqST4eo7RVi9Zax1TfmhFg}{sonarqube}{127.0.0.1}{127.0.0.1:59152}{cdfhilmrstw}{8.11.0}{7000099-8500003}]}
2024.04.26 14:31:45 INFO  es[][o.e.c.s.ClusterApplierService] master node changed {previous [], current [{sonarqube}{XmtTGZUjR0qMFKdY5MoO4A}{YqST4eo7RVi9Zax1TfmhFg}{sonarqube}{127.0.0.1}{127.0.0.1:59152}{cdfhilmrstw}{8.11.0}{7000099-8500003}]}, term: 5, version: 18, reason: Publication{term=5, version=18}
2024.04.26 14:31:45 INFO  es[][o.e.c.f.AbstractFileWatchingService] starting file watcher ...
2024.04.26 14:31:45 INFO  es[][o.e.c.f.AbstractFileWatchingService] file settings service up and running [tid=33]
2024.04.26 14:31:45 INFO  es[][o.e.h.AbstractHttpServerTransport] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2024.04.26 14:31:45 INFO  es[][o.e.c.c.NodeJoinExecutor] node-join: [{sonarqube}{XmtTGZUjR0qMFKdY5MoO4A}{YqST4eo7RVi9Zax1TfmhFg}{sonarqube}{127.0.0.1}{127.0.0.1:59152}{cdfhilmrstw}{8.11.0}{7000099-8500003}] with reason [completing election]
2024.04.26 14:31:45 INFO  es[][o.e.n.Node] started {sonarqube}{XmtTGZUjR0qMFKdY5MoO4A}{YqST4eo7RVi9Zax1TfmhFg}{sonarqube}{127.0.0.1}{127.0.0.1:59152}{cdfhilmrstw}{8.11.0}{7000099-8500003}{xpack.installed=true, rack_id=sonarqube}
2024.04.26 14:31:46 INFO  es[][o.e.l.ClusterStateLicenseService] license [7306b47c-7100-4fb8-8132-970ced5c8c78] mode [basic] - valid
2024.04.26 14:31:46 INFO  es[][o.e.g.GatewayService] recovered [0] indices into cluster_state
2024.04.26 14:31:46 INFO  es[][o.e.h.n.s.HealthNodeTaskExecutor] Node [{sonarqube}{XmtTGZUjR0qMFKdY5MoO4A}] is selected as the current health node.

sonar.log

2024.04.26 14:31:27 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory E:\xyz\xyz_Cpu\Demo-Projects\SonarTest\ServerV1\sonarqube-10.5.0.89998\temp
2024.04.26 14:31:27 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:59152]
2024.04.26 14:31:27 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [E:\xyz\xyz_Cpu\Demo-Projects\SonarTest\ServerV1\sonarqube-10.5.0.89998\elasticsearch]: C:\Program Files\Java\jdk-17\bin\java -Xms4m -Xmx64m -XX:+UseSerialGC -Dcli.name=server -Dcli.script=./bin/elasticsearch -Dcli.libs=lib/tools/server-cli -Des.path.home=E:\xyz\xyz_Cpu\Demo-Projects\SonarTest\ServerV1\sonarqube-10.5.0.89998\elasticsearch -Des.path.conf=E:\xyz\xyz_Cpu\Demo-Projects\SonarTest\ServerV1\sonarqube-10.5.0.89998\temp\conf\es -Des.distribution.type=tar -cp E:\xyz\xyz_Cpu\Demo-Projects\SonarTest\ServerV1\sonarqube-10.5.0.89998\elasticsearch\lib\*;E:\xyz\xyz_Cpu\Demo-Projects\SonarTest\ServerV1\sonarqube-10.5.0.89998\elasticsearch\lib\cli-launcher\* org.elasticsearch.launcher.CliToolLauncher
2024.04.26 14:31:27 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running

im using JDK-17

This is happed after scan big project, before it was working without any issue.

OK, nothing obvious at a first glance.
You may increase the loglevel to get more details

Stop Sonarqube and set
sonar.log.level=DEBUG in %SONARQUBE_HOME%\conf\sonar.properties
Also delete the %SONARQUBE_HOME%\data\es8 folder.

then restart.

It’s better to attach the logs as file attachment to your post.
Please attach es.log, sonar.log and web.log

Thanks, Will do it as you suggested, and let you know the status.

Hi Gilbert,

Thank you very much!

SonarQube is now operational. I made the changes as you suggested, and it’s working fine. Could you please let me know what the issue was?

Best regards,
Ajay

Hi Ajay,

ok, then it was a problem with elasticsearch and deleting and rebuilding the ES indices did help,
see

As everything runs fine now, you should set your loglevel back to
sonar.log.level=INFO in %SONARQUBE_HOME%\conf\sonar.properties

as loglevel DEBUG has performance impacts.

For short tests it’s also possible to change the loglevel temporarely via
https://<yoursonarhost>/admin/system

It works without having to restart. But of course you need to have Sonarqube running, otherwise you
need to edit %SONARQUBE_HOME%\conf\sonar.properties

Gilbert

Thank you very much for your prompt support.

Thanks
Ajay