SonarQube server error

Hi, Request you to help with below mentioned error. I am unable to start the server as it says referring to a deprecated method.

  • Using SonarQube Server 9.9 LTA version
  • SonarQube is deployed: in zip format
  • what are you trying to achieve - trying to start the server (StartSonar.bat)

Logs pasted below -

Starting SonarQube…
2024.12.12 12:50:48 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory C:\sonarqube\sonarqube-9.9.8.100196\temp
2024.12.12 12:50:48 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:54983]
2024.12.12 12:50:48 INFO app[o.s.a.ProcessLauncherImpl] Launch process[ELASTICSEARCH] from [C:\sonarqube\sonarqube-9.9.8.100196\elasticsearch]: C:\Program Files\Zulu\zulu-17\bin\java -XX:+UseG1GC -Djava.io.tmpdir=C:\sonarqube\sonarqube-9.9.8.100196\temp -XX:ErrorFile=C:\sonarqube\sonarqube-9.9.8.100196\logs\es_hs_err_pid%p.log -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:\sonarqube\sonarqube-9.9.8.100196\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 -Delasticsearch -Des.path.home=C:\sonarqube\sonarqube-9.9.8.100196\elasticsearch -Des.path.conf=C:\sonarqube\sonarqube-9.9.8.100196\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
2024.12.12 12:50:50 INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
2024.12.12 12:51:05 INFO app[o.s.a.SchedulerImpl] Process[es] is up
2024.12.12 12:51:05 INFO app[o.s.a.ProcessLauncherImpl] Launch process[WEB_SERVER] from [C:\sonarqube\sonarqube-9.9.8.100196]: C:\Program Files\Zulu\zulu-17\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\sonarqube\sonarqube-9.9.8.100196\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-9.9.8.100196.jar;C:\sonarqube\sonarqube-9.9.8.100196\lib\jdbc\h2\h2-2.1.214.jar org.sonar.server.app.WebServer C:\sonarqube\sonarqube-9.9.8.100196\temp\sq-process13234949780142782690properties
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:/sonarqube/sonarqube-9.9.8.100196/lib/sonar-application-9.9.8.100196.jar)
WARNING: Please consider reporting this to the maintainers of org.sonar.process.PluginSecurityManager
WARNING: System::setSecurityManager will be removed in a future release
2024.12.12 12:51:10 INFO app[o.s.a.SchedulerImpl] Process[Web Server] is stopped
2024.12.12 12:51:10 INFO app[o.s.a.SchedulerImpl] Process[ElasticSearch] is stopped
2024.12.12 12:51:10 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped

That’s a bit of a red herring. It looks like the Web Server stops, unrelated to that message.

What do the other logs say?

there’s a deprecated method in java which is been referenced while starting SonarQube which is why it’s failing to start I guess. There is no change in the setup which could lead to this. Thanks!

This is a non-fatal warning. There are 4 log files in total, what do the others say?

Hi, Please see attached logs for reference.
sonar.log (3.3 KB)
web.log (4.5 KB)
es.log (4.6 KB)
Kindly help.

2024.12.12 12:06:42 INFO  web[][o.s.p.ProcessEntryPoint] Starting Web Server
2024.12.12 12:06:42 ERROR web[][o.s.s.a.EmbeddedTomcat] Fail to start web server
org.apache.catalina.LifecycleException: Protocol handler initialization failed
	at org.apache.catalina.connector.Connector.initInternal(Connector.java:1011)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:127)
	at org.apache.catalina.core.StandardService.initInternal(StandardService.java:554)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:127)
	at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:1039)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:127)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:161)
	at org.apache.catalina.startup.Tomcat.start(Tomcat.java:489)
	at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:72)
	at org.sonar.server.app.WebServer.start(WebServer.java:55)
	at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:97)
	at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:81)
	at org.sonar.server.app.WebServer.main(WebServer.java:104)
Caused by: java.net.BindException: Address already in use: bind
	at java.base/sun.nio.ch.Net.bind0(Native Method)
	at java.base/sun.nio.ch.Net.bind(Net.java:555)
	at java.base/sun.nio.ch.ServerSocketChannelImpl.netBind(ServerSocketChannelImpl.java:337)
	at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:294)
	at org.apache.tomcat.util.net.NioEndpoint.initServerSocket(NioEndpoint.java:276)
	at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:231)
	at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1332)
	at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1345)
	at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:654)
	at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:75)
	at org.apache.catalina.connector.Connector.initInternal(Connector.java:1009)

This error means that something else is already running on the port that SonarQube is trying to run its web server on. The default is port 9000 (configurable in your conf/sonar.properties file, look for sonar.web.port).

You should check other running processes to see what might be running on that port, or change the port in the previously mentioned configuration file.

Hi, Thanks for the help. It’s working now!