SonarQube Developer Edition Exits Due To Elasticsearch (?)

Must-share information (formatted with Markdown):

  • sonarqube-developer-10.6.0.92116
  • zip
  • MacOS 14.5 Arm
  • Just trying to get it running for the very first time

Downloaded sonarQube developer zip

Ran sonar.sh for my platform

$ java --version
openjdk 17.0.11 2024-04-16
OpenJDK Runtime Environment Homebrew (build 17.0.11+0)
OpenJDK 64-Bit Server VM Homebrew (build 17.0.11+0, mixed mode, sharing)
$ ./sonar.sh start
/usr/bin/java
Starting SonarQube...
Started SonarQube.
$

I assume that output is correct and successful. Nothing is running however.

$ ./sonar.sh status
/usr/bin/java
Removed stale pid file: ./SonarQube.pid
SonarQube is not running.
$

The sonar.log appears to show that the problem is:

Process exited with exit value [ElasticSearch]: 143

In the es.log file, Elasticsearch appears to fail here:

2024.06.26 17:39:01 WARN es[][r.suppressed] path: /metadatas/_doc/dbVendor, params: {stored_fields=value, index=metadatas, id=dbVendor}

$ cat sonar.log
2024.06.26 17:12:17 INFO  app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /Users/myuser/Downloads/sonarqube-10.5.1.90531/temp
2024.06.26 17:12:17 INFO  app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:55321]
2024.06.26 17:12:17 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [/Users/myuser/Downloads/sonarqube-10.5.1.90531/elasticsearch]: /opt/homebrew/Cellar/openjdk@17/17.0.11/libexec/openjdk.jdk/Contents/Home/bin/java -Xms4m -Xmx64m -XX:+UseSerialGC -Dcli.name=server -Dcli.script=./bin/elasticsearch -Dcli.libs=lib/tools/server-cli -Des.path.home=/Users/myuser/Downloads/sonarqube-10.5.1.90531/elasticsearch -Des.path.conf=/Users/myuser/Downloads/sonarqube-10.5.1.90531/temp/conf/es -Des.distribution.type=tar -cp /Users/myuser/Downloads/sonarqube-10.5.1.90531/elasticsearch/lib/*:/Users/myuser/Downloads/sonarqube-10.5.1.90531/elasticsearch/lib/cli-launcher/* org.elasticsearch.launcher.CliToolLauncher
2024.06.26 17:12:17 INFO  app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2024.06.26 17:12:21 INFO  app[][o.s.a.SchedulerImpl] Process[es] is up
2024.06.26 17:12:21 INFO  app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [/Users/myuser/Downloads/sonarqube-10.5.1.90531]: /opt/homebrew/Cellar/openjdk@17/17.0.11/libexec/openjdk.jdk/Contents/Home/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/Users/myuser/Downloads/sonarqube-10.5.1.90531/temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports=java.base/jdk.internal.ref=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED --add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED -Dcom.redhat.fips=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-10.5.1.90531.jar:/Users/myuser/Downloads/sonarqube-10.5.1.90531/lib/jdbc/h2/h2-2.2.224.jar org.sonar.server.app.WebServer /Users/myuser/Downloads/sonarqube-10.5.1.90531/temp/sq-process7141555183576177040properties
2024.06.26 17:12:25 INFO  app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped
2024.06.26 17:12:25 INFO  app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2024.06.26 17:12:25 WARN  app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [ElasticSearch]: 143
2024.06.26 17:12:25 INFO  app[][o.s.a.SchedulerImpl] SonarQube is stopped
$

Or maybe this from the web.log?

2024.06.26 17:39:01 WARN  web[][o.s.c.a.AnnotationConfigApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@5ffd2b27-org.sonar.server.es.IndexCreator': Initialization of bean failed; nested exception is org.sonar.server.es.ElasticsearchException: Fail to execute es requestES get request for key 'dbVendor' on index 'metadatas'
2024.06.26 17:39:01 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@5ffd2b27-org.sonar.server.es.IndexCreator': Initialization of bean failed; nested exception is org.sonar.server.es.ElasticsearchException: Fail to execute es requestES get request for key 'dbVendor' on index 'metadatas'

Any ideas?

Hey there.

Normally I’d expect more information in es.log, such as indicating that you’re running up against a disk space watermark.

Since you’re starting SQ for the first time, can you try using SonarQube v10.6 that was released last week?

My bad. It was version sonarqube-10.6.0.92116. I think the 10.5 version was the Community Edition (that also failed)

The logs here pretty clearly state 10.5.1.

Are the logs for 10.6 exactly the same?

I face this problem just yesterday… I was doing in EKS and I just increase the memory for the pod and it works. Try that if you have access to it

Still fails. Is 20 gig free disk not enough? is 8gig RAM not enough?
Here’s the es.log:

2024.07.03 12:09:22 INFO  es[][o.e.n.NativeAccess] Using [jna] native provider and native methods for [MacOS]
2024.07.03 12:09:22 INFO  es[][o.e.n.Node] version[8.13.4], pid[63862], build[tar/da95df118650b55a500dcc181889ac35c6d8da7c/2024-05-06T22:04:45.107454559Z], OS[Mac OS X/14.5/aarch64], JVM[Homebrew/OpenJDK 64-Bit Server VM/17.0.11/17.0.11+0]
2024.07.03 12:09:22 INFO  es[][o.e.n.Node] JVM home [/opt/homebrew/Cellar/openjdk@17/17.0.11/libexec/openjdk.jdk/Contents/Home], using bundled JDK [false]
2024.07.03 12:09:22 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:ReplayDataFile=logs/replay_pid%p.log, -Des.distribution.type=tar, -XX:+UseG1GC, -Djava.io.tmpdir=/Users/slimandslam/Downloads/sonarqube-10.6.0.92116/temp, -XX:ErrorFile=/Users/slimandslam/Downloads/sonarqube-10.6.0.92116/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=/Users/slimandslam/Downloads/sonarqube-10.6.0.92116/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, -Xmx512m, -Xms512m, -XX:MaxDirectMemorySize=256m, -XX:+HeapDumpOnOutOfMemoryError, -XX:G1HeapRegionSize=4m, -XX:InitiatingHeapOccupancyPercent=30, -XX:G1ReservePercent=15, --module-path=/Users/slimandslam/Downloads/sonarqube-10.6.0.92116/elasticsearch/lib, --add-modules=jdk.net, --add-modules=ALL-MODULE-PATH, -Djdk.module.main=org.elasticsearch.server]
2024.07.03 12:09:22 INFO  es[][o.e.n.Node] Default Locale [en_US]
2024.07.03 12:09:23 INFO  es[][o.e.p.PluginsService] loaded module [rest-root]
2024.07.03 12:09:23 INFO  es[][o.e.p.PluginsService] loaded module [x-pack-core]
2024.07.03 12:09:23 INFO  es[][o.e.p.PluginsService] loaded module [x-pack-redact]
2024.07.03 12:09:23 INFO  es[][o.e.p.PluginsService] loaded module [reindex]
2024.07.03 12:09:23 INFO  es[][o.e.p.PluginsService] loaded module [x-pack-security]
2024.07.03 12:09:23 INFO  es[][o.e.p.PluginsService] loaded module [x-pack-apm-data]
2024.07.03 12:09:23 INFO  es[][o.e.p.PluginsService] loaded module [lang-painless]
2024.07.03 12:09:23 INFO  es[][o.e.p.PluginsService] loaded module [parent-join]
2024.07.03 12:09:23 INFO  es[][o.e.p.PluginsService] loaded module [old-lucene-versions]
2024.07.03 12:09:23 INFO  es[][o.e.p.PluginsService] loaded module [counted-keyword]
2024.07.03 12:09:23 INFO  es[][o.e.p.PluginsService] loaded module [x-pack-inference]
2024.07.03 12:09:23 INFO  es[][o.e.p.PluginsService] loaded module [analysis-common]
2024.07.03 12:09:23 INFO  es[][o.e.p.PluginsService] loaded module [health-shards-availability]
2024.07.03 12:09:23 INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]
2024.07.03 12:09:23 INFO  es[][o.e.p.PluginsService] loaded module [apm]
2024.07.03 12:09:23 INFO  es[][o.e.p.PluginsService] loaded module [aggregations]
2024.07.03 12:09:23 INFO  es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/System/Volumes/Data (/dev/disk3s5)]], net usable_space [15.4gb], net total_space [926.3gb], types [apfs]
2024.07.03 12:09:23 INFO  es[][o.e.e.NodeEnvironment] heap size [512mb], compressed ordinary object pointers [true]
2024.07.03 12:09:23 INFO  es[][o.e.n.Node] node name [sonarqube], node ID [sb2LA1n3TzCPavmywRhCsw], cluster name [sonarqube], roles [data_frozen, ml, data_hot, transform, data_content, data_warm, master, remote_cluster_client, data, data_cold, ingest]
2024.07.03 12:09:24 INFO  es[][o.e.f.FeatureService] Registered local node features [desired_node.version_deprecated, features_supported, health.extended_repository_indicator, usage.data_tiers.precalculate_stats]
2024.07.03 12:09:25 INFO  es[][o.e.x.s.Security] Security is disabled
2024.07.03 12:09:25 INFO  es[][o.e.x.a.APMPlugin] APM ingest plugin is disabled
2024.07.03 12:09:25 INFO  es[][o.e.t.a.APM] Sending apm metrics is disabled
2024.07.03 12:09:25 INFO  es[][o.e.t.a.APM] Sending apm tracing is disabled
2024.07.03 12:09:25 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.07.03 12:09:25 INFO  es[][o.e.i.r.RecoverySettings] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]
2024.07.03 12:09:25 INFO  es[][o.e.d.DiscoveryModule] using discovery type [single-node] and seed hosts providers [settings]
2024.07.03 12:09:25 INFO  es[][o.e.n.Node] initialized
2024.07.03 12:09:25 INFO  es[][o.e.n.Node] starting ...
2024.07.03 12:09:25 INFO  es[][o.e.t.TransportService] publish_address {127.0.0.1:50424}, bound_addresses {127.0.0.1:50424}
2024.07.03 12:09:25 INFO  es[][o.e.c.c.ClusterBootstrapService] this node has not joined a bootstrapped cluster yet; [cluster.initial_master_nodes] is set to [sonarqube]
2024.07.03 12:09:25 INFO  es[][o.e.c.c.Coordinator] setting initial configuration to VotingConfiguration{sb2LA1n3TzCPavmywRhCsw}
2024.07.03 12:09:25 INFO  es[][o.e.c.s.MasterService] elected-as-master ([1] nodes joined in term 1)[_FINISH_ELECTION_, {sonarqube}{sb2LA1n3TzCPavmywRhCsw}{pgWsJmUMTfqaG1UpaHhFHA}{sonarqube}{127.0.0.1}{127.0.0.1:50424}{cdfhilmrstw}{8.13.4}{7000099-8503000} completing election], term: 1, version: 1, delta: master node changed {previous [], current [{sonarqube}{sb2LA1n3TzCPavmywRhCsw}{pgWsJmUMTfqaG1UpaHhFHA}{sonarqube}{127.0.0.1}{127.0.0.1:50424}{cdfhilmrstw}{8.13.4}{7000099-8503000}]}
2024.07.03 12:09:25 INFO  es[][o.e.c.c.CoordinationState] cluster UUID set to [O0whkKetTLSMeUc_IGvhIw]
2024.07.03 12:09:25 INFO  es[][o.e.c.s.ClusterApplierService] master node changed {previous [], current [{sonarqube}{sb2LA1n3TzCPavmywRhCsw}{pgWsJmUMTfqaG1UpaHhFHA}{sonarqube}{127.0.0.1}{127.0.0.1:50424}{cdfhilmrstw}{8.13.4}{7000099-8503000}]}, term: 1, version: 1, reason: Publication{term=1, version=1}
2024.07.03 12:09:25 INFO  es[][o.e.c.f.AbstractFileWatchingService] starting file watcher ...
2024.07.03 12:09:25 INFO  es[][o.e.c.f.AbstractFileWatchingService] file settings service up and running [tid=31]
2024.07.03 12:09:25 INFO  es[][o.e.c.c.NodeJoinExecutor] node-join: [{sonarqube}{sb2LA1n3TzCPavmywRhCsw}{pgWsJmUMTfqaG1UpaHhFHA}{sonarqube}{127.0.0.1}{127.0.0.1:50424}{cdfhilmrstw}{8.13.4}{7000099-8503000}] with reason [completing election]
2024.07.03 12:09:25 INFO  es[][o.e.h.AbstractHttpServerTransport] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2024.07.03 12:09:25 INFO  es[][o.e.n.Node] started {sonarqube}{sb2LA1n3TzCPavmywRhCsw}{pgWsJmUMTfqaG1UpaHhFHA}{sonarqube}{127.0.0.1}{127.0.0.1:50424}{cdfhilmrstw}{8.13.4}{7000099-8503000}{xpack.installed=true, rack_id=sonarqube}
2024.07.03 12:09:25 INFO  es[][o.e.g.GatewayService] recovered [0] indices into cluster_state
2024.07.03 12:09:26 INFO  es[][o.e.l.ClusterStateLicenseService] license [6947f4bc-4246-49a2-9b12-d045ff34c8ef] mode [basic] - valid
2024.07.03 12:09:26 INFO  es[][o.e.h.n.s.HealthNodeTaskExecutor] Node [{sonarqube}{sb2LA1n3TzCPavmywRhCsw}] is selected as the current health node.
2024.07.03 12:09:30 INFO  es[][o.e.c.m.MetadataCreateIndexService] [metadatas] creating index, cause [api], templates [], shards [1]/[0]
2024.07.03 12:09:30 INFO  es[][o.e.c.r.a.AllocationService] current.health="RED" message="Cluster health status changed from [YELLOW] to [RED] (reason: [reconcile-desired-balance])." previous.health="YELLOW" reason="reconcile-desired-balance"
2024.07.03 12:09:55 WARN  es[][o.e.c.r.a.DiskThresholdMonitor] flood stage disk watermark [95%] exceeded on [sb2LA1n3TzCPavmywRhCsw][sonarqube][/Users/slimandslam/Downloads/sonarqube-10.6.0.92116/data/es8] free: 15gb[1.6%], all indices on this node will be marked read-only
2024.07.03 12:10:25 WARN  es[][o.e.c.r.a.DiskThresholdMonitor] flood stage disk watermark [95%] exceeded on [sb2LA1n3TzCPavmywRhCsw][sonarqube][/Users/slimandslam/Downloads/sonarqube-10.6.0.92116/data/es8] free: 15gb[1.6%], all indices on this node will be marked read-only
2024.07.03 12:10:31 INFO  es[][o.e.c.m.MetadataMappingService] [metadatas/2j5o0apoQGCJZJkoviPc5w] create_mapping
2024.07.03 12:10:55 WARN  es[][o.e.c.r.a.DiskThresholdMonitor] flood stage disk watermark [95%] exceeded on [sb2LA1n3TzCPavmywRhCsw][sonarqube][/Users/slimandslam/Downloads/sonarqube-10.6.0.92116/data/es8] free: 15gb[1.6%], all indices on this node will be marked read-only
2024.07.03 12:11:01 INFO  es[][o.e.n.Node] stopping ...
2024.07.03 12:11:01 INFO  es[][o.e.c.f.AbstractFileWatchingService] shutting down watcher thread
2024.07.03 12:11:01 INFO  es[][o.e.c.f.AbstractFileWatchingService] watcher service stopped
2024.07.03 12:11:01 INFO  es[][o.e.n.Node] stopped
2024.07.03 12:11:01 INFO  es[][o.e.n.Node] closing ...
2024.07.03 12:11:01 INFO  es[][o.e.n.Node] closed

Elasticsearch doesn’t care about how much disk space you have but what percentage of it is free.

How do I file bug reports on SonarQube Developer Edition?
Thanks!

Voila, you’re already in the right place, this Community. :slight_smile:

Where do I file a trackable issue?

If we classify a specific bug/improvement based on your report, we’ll create the ticket.

I really like how easy it is to download SonarQube. Bu, not having
indepth knowledge of the product, I’d recommend these bug reports:

  1. Documentation bug. No prerequisites listed other than Java 17.
    It appears that Elasticsearch needs 10% free space on the disk to keep
    from exiting. So, that should be
    listed, along with Java 17, as a prerequisite.

  2. Code bug. Sonar.sh does not check for all prerequisites. Before
    Sonar.sh does anything, it should be checking for 10% free disk space.
    It probably should also check for free RAM but that is a bit trickier
    to do.

2 Likes