A terminally deprecated method in java.lang.system has been called

Must-share information (formatted with Markdown):

  • which versions are you using: sonarqube-10.2.1.78527, java version “17.0.9” 2023-10-17 LTS
  • how is SonarQube deployed: zip
  • what are you trying to achieve: Run StartSonar.bat
  • what have you tried so far to achieve this: I made sure that all the prerequisites are met.

I am getting the following error when I run StartSonar.bat

C:\Users\USER\Downloads\sonarqube-10.2.1.78527\sonarqube-10.2.1.78527\bin\windows-x86-64>StartSonar.bat
Starting SonarQube... 
2023.11.15 08:28:44 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory C:\Users\USER\Downloads\sonarqube-10.2.1.78527\sonarqube-10.2.1.78527\temp 
2023.11.15 08:28:44 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:55509] 
2023.11.15 08:28:45 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [C:\Users\USER\Downloads\sonarqube-10.2.1.78527\sonarqube-10.2.1.78527\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=C:\Users\USER\Downloads\sonarqube-10.2.1.78527\sonarqube-10.2.1.78527\elasticsearch -Des.path.conf=C:\Users\USER\Downloads\sonarqube-10.2.1.78527\sonarqube-10.2.1.78527\temp\conf\es -Des.distribution.type=tar -cp C:\Users\USER\Downloads\sonarqube-10.2.1.78527\sonarqube-10.2.1.78527\elasticsearch\lib\*;C:\Users\USER\Downloads\sonarqube-10.2.1.78527\sonarqube-10.2.1.78527\elasticsearch\lib\cli-launcher\* org.elasticsearch.launcher.CliToolLauncher 2023.11.15 08:28:45 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running 2023.11.15 08:29:10 INFO app[][o.s.a.SchedulerImpl] Process[es] is up 2023.11.15 08:29:10 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [C:\Users\USER\Downloads\sonarqube-10.2.1.78527\sonarqube-10.2.1.78527]: C:\Program Files\Java\jdk-17\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\Users\USER\Downloads\sonarqube-10.2.1.78527\sonarqube-10.2.1.78527\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.2.1.78527.jar;C:\Users\USER\Downloads\sonarqube-10.2.1.78527\sonarqube-10.2.1.78527\lib\jdbc\postgresql\postgresql-42.6.0.jar org.sonar.server.app.WebServer C:\Users\USER\Downloads\sonarqube-10.2.1.78527\sonarqube-10.2.1.78527\temp\sq-process3912479945881823449properties 
WARNING: A terminally deprecated method in java.lang.System has been called 
WARNING: System::setSecurityManager has been called by org.sonar.process.PluginSecurityManager (file:/C:/Users/USER/Downloads/sonarqube-10.2.1.78527/sonarqube-10.2.1.78527/lib/sonar-application-10.2.1.78527.jar) 
WARNING: Please consider reporting this to the maintainers of org.sonar.process.PluginSecurityManager 
WARNING: System::setSecurityManager will be removed in a future release 
2023.11.15 08:29:14 INFO app[][o.s.a.SchedulerImpl] Process[Web Server] is stopped 
2023.11.15 08:29:14 INFO app[][o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped 
2023.11.15 08:29:14 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped

ES Logs

2023.11.15 08:28:51 INFO  es[][o.e.n.Node] version[8.7.0], pid[9372], build[tar/09520b59b6bc1057340b55750186466ea715e30e/2023-03-27T16:31:09.816451435Z], OS[Windows 10/10.0/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/17.0.9/17.0.9+11-LTS-201]
2023.11.15 08:28:51 INFO  es[][o.e.n.Node] JVM home [C:\Program Files\Java\jdk-17], using bundled JDK [false]
2023.11.15 08:28:51 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=ALL-UNNAMED, -XX:+UseG1GC, -Djava.io.tmpdir=C:\Users\USER\Downloads\sonarqube-10.2.1.78527\sonarqube-10.2.1.78527\temp, -XX:ErrorFile=C:\Users\USER\Downloads\sonarqube-10.2.1.78527\sonarqube-10.2.1.78527\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=C:\Users\USER\Downloads\sonarqube-10.2.1.78527\sonarqube-10.2.1.78527\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=C:\Users\USER\Downloads\sonarqube-10.2.1.78527\sonarqube-10.2.1.78527\elasticsearch\lib, --add-modules=jdk.net, -Djdk.module.main=org.elasticsearch.server]
2023.11.15 08:28:53 INFO  es[][o.e.p.PluginsService] loaded module [aggregations]
2023.11.15 08:28:53 INFO  es[][o.e.p.PluginsService] loaded module [analysis-common]
2023.11.15 08:28:53 INFO  es[][o.e.p.PluginsService] loaded module [apm]
2023.11.15 08:28:53 INFO  es[][o.e.p.PluginsService] loaded module [blob-cache]
2023.11.15 08:28:53 INFO  es[][o.e.p.PluginsService] loaded module [lang-painless]
2023.11.15 08:28:53 INFO  es[][o.e.p.PluginsService] loaded module [old-lucene-versions]
2023.11.15 08:28:53 INFO  es[][o.e.p.PluginsService] loaded module [parent-join]
2023.11.15 08:28:53 INFO  es[][o.e.p.PluginsService] loaded module [reindex]
2023.11.15 08:28:53 INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]
2023.11.15 08:28:53 INFO  es[][o.e.p.PluginsService] loaded module [x-pack-aggregate-metric]
2023.11.15 08:28:53 INFO  es[][o.e.p.PluginsService] loaded module [x-pack-core]
2023.11.15 08:28:53 INFO  es[][o.e.p.PluginsService] loaded module [x-pack-profiling]
2023.11.15 08:28:53 INFO  es[][o.e.p.PluginsService] loaded module [x-pack-security]
2023.11.15 08:28:53 INFO  es[][o.e.p.PluginsService] no plugins loaded
2023.11.15 08:28:57 INFO  es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[(C:)]], net usable_space [84.5gb], net total_space [231.2gb], types [NTFS]
2023.11.15 08:28:57 INFO  es[][o.e.e.NodeEnvironment] heap size [512mb], compressed ordinary object pointers [true]
2023.11.15 08:28:57 INFO  es[][o.e.n.Node] node name [sonarqube], node ID [zB1DX77WQlyxkdsfuFpAJg], cluster name [sonarqube], roles [transform, data_hot, ml, data_frozen, ingest, data_cold, data, remote_cluster_client, master, data_warm, data_content]
2023.11.15 08:28:59 INFO  es[][o.e.x.p.ProfilingPlugin] Profiling is enabled
2023.11.15 08:28:59 INFO  es[][o.e.x.s.Security] Security is disabled
2023.11.15 08:28:59 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}]
2023.11.15 08:28:59 INFO  es[][o.e.i.r.RecoverySettings] using rate limit [40mb] with [default=40mb, read=0b, write=0b, max=0b]
2023.11.15 08:28:59 INFO  es[][o.e.d.DiscoveryModule] using discovery type [single-node] and seed hosts providers [settings]
2023.11.15 08:29:00 INFO  es[][o.e.n.Node] initialized
2023.11.15 08:29:00 INFO  es[][o.e.n.Node] starting ...
2023.11.15 08:29:00 INFO  es[][o.e.t.TransportService] publish_address {127.0.0.1:55509}, bound_addresses {127.0.0.1:55509}
2023.11.15 08:29:01 INFO  es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
2023.11.15 08:29:01 WARN  es[][o.e.c.c.ClusterBootstrapService] this node is locked into cluster UUID [WYlw3r3IQ8Sz441v3z_jaQ] but [cluster.initial_master_nodes] is set to [sonarqube]; remove this setting to avoid possible data loss caused by subsequent cluster bootstrap attempts; for further information see https://www.elastic.co/guide/en/elasticsearch/reference/8.7/important-settings.html#initial_master_nodes
2023.11.15 08:29:01 INFO  es[][o.e.c.s.MasterService] elected-as-master ([1] nodes joined)[_FINISH_ELECTION_, {sonarqube}{zB1DX77WQlyxkdsfuFpAJg}{SLuXshFwT7KAo9A8YgpTTw}{sonarqube}{127.0.0.1}{127.0.0.1:55509}{cdfhilmrstw}{8.7.0} completing election], term: 18, version: 235, delta: master node changed {previous [], current [{sonarqube}{zB1DX77WQlyxkdsfuFpAJg}{SLuXshFwT7KAo9A8YgpTTw}{sonarqube}{127.0.0.1}{127.0.0.1:55509}{cdfhilmrstw}{8.7.0}]}
2023.11.15 08:29:02 INFO  es[][o.e.c.s.ClusterApplierService] master node changed {previous [], current [{sonarqube}{zB1DX77WQlyxkdsfuFpAJg}{SLuXshFwT7KAo9A8YgpTTw}{sonarqube}{127.0.0.1}{127.0.0.1:55509}{cdfhilmrstw}{8.7.0}]}, term: 18, version: 235, reason: Publication{term=18, version=235}
2023.11.15 08:29:02 INFO  es[][o.e.r.s.FileSettingsService] starting file settings watcher ...
2023.11.15 08:29:02 INFO  es[][o.e.r.s.FileSettingsService] file settings service up and running [tid=33]
2023.11.15 08:29:02 INFO  es[][o.e.h.AbstractHttpServerTransport] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2023.11.15 08:29:02 INFO  es[][o.e.n.Node] started {sonarqube}{zB1DX77WQlyxkdsfuFpAJg}{SLuXshFwT7KAo9A8YgpTTw}{sonarqube}{127.0.0.1}{127.0.0.1:55509}{cdfhilmrstw}{8.7.0}{rack_id=sonarqube, xpack.installed=true}
2023.11.15 08:29:02 INFO  es[][o.e.c.c.NodeJoinExecutor] node-join: [{sonarqube}{zB1DX77WQlyxkdsfuFpAJg}{SLuXshFwT7KAo9A8YgpTTw}{sonarqube}{127.0.0.1}{127.0.0.1:55509}{cdfhilmrstw}{8.7.0}] with reason [completing election]
2023.11.15 08:29:02 INFO  es[][o.e.l.LicenseService] license [9f2dac39-b542-4609-bac3-5856e0819b59] mode [basic] - valid
2023.11.15 08:29:02 INFO  es[][o.e.g.GatewayService] recovered [6] indices into cluster_state
2023.11.15 08:29:05 INFO  es[][o.e.h.n.s.HealthNodeTaskExecutor] Node [{sonarqube}{zB1DX77WQlyxkdsfuFpAJg}] is selected as the current health node.
2023.11.15 08:29:10 INFO  es[][o.e.c.r.a.AllocationService] current.health="GREEN" message="Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[metadatas][0]]])." previous.health="RED" reason="shards started [[metadatas][0]]"
2023.11.15 08:29:14 INFO  es[][o.e.n.Node] stopping ...
2023.11.15 08:29:14 INFO  es[][o.e.r.s.FileSettingsService] shutting down watcher thread
2023.11.15 08:29:14 INFO  es[][o.e.r.s.FileSettingsService] watcher service stopped
2023.11.15 08:29:14 INFO  es[][o.e.n.Node] stopped
2023.11.15 08:29:14 INFO  es[][o.e.n.Node] closing ...
2023.11.15 08:29:14 INFO  es[][o.e.n.Node] closed

What does the web.log file say?