Must-share information:
Which versions are you using:
sonarqube-10.4.1.88267 community edition
How is SonarQube deployed:
zip
What are you trying to achieve:
Starting SonarQube for the first time
What have you tried so far to achieve this
I have been trying to deploy the zip version on a Windows Server 2022, with a SQL Server 2022 as data storage.
This is the following I have done to prior to my current issue.
- I have installed microsoft-jdk-21.0.2-windows-x64.msi on the server.
- I have created the database in accordance with the guide SonarQube database installation
- I have following the installation guide on Installing from ZIP | SonarQube Docs
- I have created a dedicated user and I am running (and currently stuck) it as that user aswell.
- I did have a problem with the port 9001 for Elasticsearch, so I have changed this to 40404.
My current activated properties in sonar.properties are as follows (password removed):
sonar.jdbc.username=SonarQubeLogin
sonar.jdbc.password=password
sonar.jdbc.url=jdbc:sqlserver://localhost;databaseName=MySonarCube
sonar.search.port=40404
sonar.log.level=INFO
But it seems that system is stuck waiting for Elasticsearch, or that is what I can infer from the log. Keep in mid, this logs was genereated by shutting down the system, clear data and temp folder and restarting the system.
Side note. The es.log cannot be removed but the rest can, before shutting down the java processes, suggesting Elasticsearch is running.
sonar.log
2024.03.27 13:03:41 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory D:\SonarQube\sonarqube-10.4.1.88267\temp
2024.03.27 13:03:41 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:40404, TCP: 127.0.0.1:52449]
2024.03.27 13:03:41 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [D:\SonarQube\sonarqube-10.4.1.88267\elasticsearch]: C:\Program Files\Microsoft\jdk-21.0.2.13-hotspot\bin\java -Xms4m -Xmx64m -XX:+UseSerialGC -Dcli.name=server -Dcli.script=./bin/elasticsearch -Dcli.libs=lib/tools/server-cli -Des.path.home=D:\SonarQube\sonarqube-10.4.1.88267\elasticsearch -Des.path.conf=D:\SonarQube\sonarqube-10.4.1.88267\temp\conf\es -Des.distribution.type=tar -cp D:\SonarQube\sonarqube-10.4.1.88267\elasticsearch\lib\*;D:\SonarQube\sonarqube-10.4.1.88267\elasticsearch\lib\cli-launcher\* org.elasticsearch.launcher.CliToolLauncher
2024.03.27 13:03:41 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
es.log:
2024.03.27 13:03:44 WARN es[][o.a.l.i.v.VectorizationProvider] Java vector incubator module is not readable. For optimal vector performance, pass --add-modules jdk.incubator.vector to enable Vector API.
2024.03.27 13:03:45 INFO es[][o.e.n.Node] version[8.11.0], pid[8488], build[tar/d9ec3fa628c7b0ba3d25692e277ba26814820b20/2023-11-04T10:04:57.184859352Z], OS[Windows Server 2022/10.0/amd64], JVM[Microsoft/OpenJDK 64-Bit Server VM/21.0.2/21.0.2+13-LTS]
2024.03.27 13:03:45 INFO es[][o.e.n.Node] JVM home [C:\Program Files\Microsoft\jdk-21.0.2.13-hotspot], using bundled JDK [false]
2024.03.27 13:03:45 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=D:\SonarQube\sonarqube-10.4.1.88267\temp, -XX:ErrorFile=D:\SonarQube\sonarqube-10.4.1.88267\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=D:\SonarQube\sonarqube-10.4.1.88267\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, -Des.enforce.bootstrap.checks=true, -Xmx512m, -Xms512m, -XX:MaxDirectMemorySize=256m, -XX:+HeapDumpOnOutOfMemoryError, -XX:G1HeapRegionSize=4m, -XX:InitiatingHeapOccupancyPercent=30, -XX:G1ReservePercent=15, -Des.distribution.type=tar, --module-path=D:\SonarQube\sonarqube-10.4.1.88267\elasticsearch\lib, --add-modules=jdk.net, --add-modules=ALL-MODULE-PATH, -Djdk.module.main=org.elasticsearch.server]
2024.03.27 13:03:47 INFO es[][o.e.p.PluginsService] loaded module [lang-painless]
2024.03.27 13:03:47 INFO es[][o.e.p.PluginsService] loaded module [x-pack-core]
2024.03.27 13:03:47 INFO es[][o.e.p.PluginsService] loaded module [old-lucene-versions]
2024.03.27 13:03:47 INFO es[][o.e.p.PluginsService] loaded module [parent-join]
2024.03.27 13:03:47 INFO es[][o.e.p.PluginsService] loaded module [rest-root]
2024.03.27 13:03:47 INFO es[][o.e.p.PluginsService] loaded module [reindex]
2024.03.27 13:03:47 INFO es[][o.e.p.PluginsService] loaded module [x-pack-redact]
2024.03.27 13:03:47 INFO es[][o.e.p.PluginsService] loaded module [analysis-common]
2024.03.27 13:03:47 INFO es[][o.e.p.PluginsService] loaded module [x-pack-security]
2024.03.27 13:03:47 INFO es[][o.e.p.PluginsService] loaded module [transport-netty4]
2024.03.27 13:03:47 INFO es[][o.e.p.PluginsService] loaded module [aggregations]
2024.03.27 13:03:47 INFO es[][o.e.p.PluginsService] loaded module [apm]
2024.03.27 13:03:49 INFO es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[DATA (D:)]], net usable_space [497.6gb], net total_space [499.9gb], types [NTFS]
2024.03.27 13:03:49 INFO es[][o.e.e.NodeEnvironment] heap size [512mb], compressed ordinary object pointers [true]
2024.03.27 13:03:49 INFO es[][o.e.n.Node] node name [sonarqube], node ID [q6FBOrO0SwqKt6v8ENKPOw], cluster name [sonarqube], roles [transform, data_hot, ml, data_frozen, ingest, data_cold, data, remote_cluster_client, master, data_warm, data_content]
2024.03.27 13:03:50 INFO es[][o.e.x.s.Security] Security is disabled
2024.03.27 13:03:50 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.03.27 13:03:50 INFO es[][o.e.i.r.RecoverySettings] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]
2024.03.27 13:03:50 INFO es[][o.e.d.DiscoveryModule] using discovery type [single-node] and seed hosts providers [settings]
2024.03.27 13:03:51 INFO es[][o.e.n.Node] initialized
2024.03.27 13:03:51 INFO es[][o.e.n.Node] starting ...
2024.03.27 13:03:51 INFO es[][o.e.t.TransportService] publish_address {127.0.0.1:52449}, bound_addresses {127.0.0.1:52449}
2024.03.27 13:03:51 INFO es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
2024.03.27 13:03:51 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.03.27 13:03:51 INFO es[][o.e.c.c.Coordinator] setting initial configuration to VotingConfiguration{q6FBOrO0SwqKt6v8ENKPOw}
2024.03.27 13:03:51 INFO es[][o.e.c.s.MasterService] elected-as-master ([1] nodes joined in term 1)[_FINISH_ELECTION_, {sonarqube}{q6FBOrO0SwqKt6v8ENKPOw}{sxSH1gDnT5yWPsFmKYbVRg}{sonarqube}{127.0.0.1}{127.0.0.1:52449}{cdfhilmrstw}{8.11.0}{7000099-8500003} completing election], term: 1, version: 1, delta: master node changed {previous [], current [{sonarqube}{q6FBOrO0SwqKt6v8ENKPOw}{sxSH1gDnT5yWPsFmKYbVRg}{sonarqube}{127.0.0.1}{127.0.0.1:52449}{cdfhilmrstw}{8.11.0}{7000099-8500003}]}
2024.03.27 13:03:51 INFO es[][o.e.c.c.CoordinationState] cluster UUID set to [LprOZWrRQZqMwP9W-2zPNA]
2024.03.27 13:03:51 INFO es[][o.e.c.s.ClusterApplierService] master node changed {previous [], current [{sonarqube}{q6FBOrO0SwqKt6v8ENKPOw}{sxSH1gDnT5yWPsFmKYbVRg}{sonarqube}{127.0.0.1}{127.0.0.1:52449}{cdfhilmrstw}{8.11.0}{7000099-8500003}]}, term: 1, version: 1, reason: Publication{term=1, version=1}
2024.03.27 13:03:51 INFO es[][o.e.c.f.AbstractFileWatchingService] starting file watcher ...
2024.03.27 13:03:51 INFO es[][o.e.c.f.AbstractFileWatchingService] file settings service up and running [tid=39]
2024.03.27 13:03:51 INFO es[][o.e.c.c.NodeJoinExecutor] node-join: [{sonarqube}{q6FBOrO0SwqKt6v8ENKPOw}{sxSH1gDnT5yWPsFmKYbVRg}{sonarqube}{127.0.0.1}{127.0.0.1:52449}{cdfhilmrstw}{8.11.0}{7000099-8500003}] with reason [completing election]
2024.03.27 13:03:51 INFO es[][o.e.h.AbstractHttpServerTransport] publish_address {127.0.0.1:40404}, bound_addresses {127.0.0.1:40404}
2024.03.27 13:03:51 INFO es[][o.e.n.Node] started {sonarqube}{q6FBOrO0SwqKt6v8ENKPOw}{sxSH1gDnT5yWPsFmKYbVRg}{sonarqube}{127.0.0.1}{127.0.0.1:52449}{cdfhilmrstw}{8.11.0}{7000099-8500003}{rack_id=sonarqube, xpack.installed=true}
And this is what I see. Nothing happens after this, nothing it added to the logs even after hours. What can be the reason for this?
I am currently looking into the COMPUTE ENGINE notification in the properties file where -server
mode should be enabled. I think it is, but have not been able to confirm or test it yet.