Must-share information (formatted with Markdown):
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
- what are you trying to achieve
- what have you tried so far to achieve this
Hi Team,
I am not able to start the sonarqube service and it keeps on failing:
Below are the complete logs
code block Web.log
Blockquote
2021.09.19 12:32:56 INFO web[o.s.p.ProcessEntryPoint] Starting web
2021.09.19 12:32:57 ERROR web[o.a.c.c.StandardService] Failed to initialize connector [Connector[HTTP/1.1-9000]]
org.apache.catalina.LifecycleException: Protocol handler initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:1077)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:557)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:850)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:173)
at org.apache.catalina.startup.Tomcat.start(Tomcat.java:440)
at org.sonar.server.app.EmbeddedTomcat.start(EmbeddedTomcat.java:72)
at org.sonar.server.app.WebServer.start(WebServer.java:53)
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:102)
Caused by: java.net.BindException: Cannot assign requested address
at java.base/sun.nio.ch.Net.bind0(Native Method)
at java.base/sun.nio.ch.Net.bind(Net.java:455)
at java.base/sun.nio.ch.Net.bind(Net.java:447)
at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:227)
at java.base/sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:80)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:222)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1147)
at org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:222)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:599)
at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:80)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:1074)
… 12 common frames omitted
code block es.log
Blockquote
2021.09.19 12:32:49 INFO es[o.e.n.Node] version[7.12.1], pid[43133], build[default/tar/3186837139b9c6b6d23c3200870651f10d3343b7/2021-04-20T20:56:39.040728659Z], OS[Linux/5.11.0-1017-aws/amd64], JVM[Ubuntu/OpenJDK 64-Bit Server VM/11.0.11/11.0.11+9-Ubuntu-0ubuntu2.20.04]
2021.09.19 12:32:49 INFO es[o.e.n.Node] JVM home [/usr/lib/jvm/java-11-openjdk-amd64]
2021.09.19 12:32:49 INFO es[o.e.n.Node] JVM arguments [-XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.io.tmpdir=/opt/sonarqube-9.0.1.46107/temp, -XX:ErrorFile=…/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, -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, -Djava.locale.providers=COMPAT, -Des.enforce.bootstrap.checks=true, -Xmx512m, -Xms512m, -XX:MaxDirectMemorySize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/opt/sonarqube-9.0.1.46107/elasticsearch, -Des.path.conf=/opt/sonarqube-9.0.1.46107/temp/conf/es, -Des.distribution.flavor=default, -Des.distribution.type=tar, -Des.bundled_jdk=false]
2021.09.19 12:32:50 INFO es[o.e.p.PluginsService] loaded module [analysis-common]
2021.09.19 12:32:50 INFO es[o.e.p.PluginsService] loaded module [lang-painless]
2021.09.19 12:32:50 INFO es[o.e.p.PluginsService] loaded module [parent-join]
2021.09.19 12:32:50 INFO es[o.e.p.PluginsService] loaded module [percolator]
2021.09.19 12:32:50 INFO es[o.e.p.PluginsService] loaded module [transport-netty4]
2021.09.19 12:32:50 INFO es[o.e.p.PluginsService] no plugins loaded
2021.09.19 12:32:50 INFO es[o.e.e.NodeEnvironment] using [1] data paths, mounts [[/ (/dev/root)]], net usable_space [23.7gb], net total_space [29gb], types [ext4]
2021.09.19 12:32:50 INFO es[o.e.e.NodeEnvironment] heap size [495.3mb], compressed ordinary object pointers [true]
2021.09.19 12:32:50 INFO es[o.e.n.Node] node name [sonarqube], node ID [AqCQUqBLQRKIwVx93y8zBg], cluster name [sonarqube], roles [master, remote_cluster_client, data, ingest]
2021.09.19 12:32:53 INFO es[o.e.t.NettyAllocator] creating NettyAllocator with the following configs: [name=unpooled, suggested_max_allocation_size=1mb, factors={es.unsafe.use_unpooled_allocator=null, g1gc_enabled=false, g1gc_region_size=0b, heap_size=495.3mb}]
2021.09.19 12:32:53 INFO es[o.e.d.DiscoveryModule] using discovery type [zen] and seed hosts providers [settings]
2021.09.19 12:32:54 INFO es[o.e.g.DanglingIndicesState] gateway.auto_import_dangling_indices is disabled, dangling indices will not be automatically detected or imported and must be managed manually
2021.09.19 12:32:54 INFO es[o.e.n.Node] initialized
2021.09.19 12:32:54 INFO es[o.e.n.Node] starting …
2021.09.19 12:32:54 INFO es[o.e.t.TransportService] publish_address {127.0.0.1:36097}, bound_addresses {127.0.0.1:36097}
2021.09.19 12:32:54 INFO es[o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
2021.09.19 12:32:54 INFO es[o.e.c.c.Coordinator] setting initial configuration to VotingConfiguration{AqCQUqBLQRKIwVx93y8zBg}
2021.09.19 12:32:55 INFO es[o.e.c.s.MasterService] elected-as-master ([1] nodes joined)[{sonarqube}{AqCQUqBLQRKIwVx93y8zBg}{IlezE-p9SUeJ2436YBitEQ}{127.0.0.1}{127.0.0.1:36097}{dimr}{rack_id=sonarqube} elect leader, BECOME_MASTER_TASK, FINISH_ELECTION], term: 1, version: 1, delta: master node changed {previous , current [{sonarqube}{AqCQUqBLQRKIwVx93y8zBg}{IlezE-p9SUeJ2436YBitEQ}{127.0.0.1}{127.0.0.1:36097}{dimr}{rack_id=sonarqube}]}
2021.09.19 12:32:55 INFO es[o.e.c.c.CoordinationState] cluster UUID set to [tqrDXd06RSaFuvIeva2WqQ]
2021.09.19 12:32:55 INFO es[o.e.c.s.ClusterApplierService] master node changed {previous , current [{sonarqube}{AqCQUqBLQRKIwVx93y8zBg}{IlezE-p9SUeJ2436YBitEQ}{127.0.0.1}{127.0.0.1:36097}{dimr}{rack_id=sonarqube}]}, term: 1, version: 1, reason: Publication{term=1, version=1}
2021.09.19 12:32:55 INFO es[o.e.h.AbstractHttpServerTransport] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2021.09.19 12:32:55 INFO es[o.e.n.Node] started
2021.09.19 12:32:55 INFO es[o.e.g.GatewayService] recovered [0] indices into cluster_state
2021.09.19 12:32:57 INFO es[o.e.n.Node] stopping …
2021.09.19 12:32:57 INFO es[o.e.n.Node] stopped
2021.09.19 12:32:57 INFO es[o.e.n.Node] closing …
2021.09.19 12:32:57 INFO es[o.e.n.Node] closed
code block Sonar.log
Blockquote
→ Wrapper Started as Daemon
Launching a JVM…
Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
2021.09.19 12:32:46 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube-9.0.1.46107/temp
2021.09.19 12:32:46 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:36097]
2021.09.19 12:32:46 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘es’, ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube-9.0.1.46107/elasticsearch]: /opt/sonarqube-9.0.1.46107/elasticsearch/bin/elasticsearch
2021.09.19 12:32:46 INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
warning: no-jdk distributions that do not bundle a JDK are deprecated and will be removed in a future release
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
2021.09.19 12:32:55 INFO app[o.s.a.SchedulerImpl] Process[es] is up
2021.09.19 12:32:55 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘web’, ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonarqube-9.0.1.46107]: /usr/lib/jvm/java-11-openjdk-amd64/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube-9.0.1.46107/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 -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-9.0.1.46107.jar:/opt/sonarqube-9.0.1.46107/lib/jdbc/postgresql/postgresql-42.2.19.jar org.sonar.server.app.WebServer /opt/sonarqube-9.0.1.46107/temp/sq-process9668664780730072200properties
2021.09.19 12:32:57 INFO app[o.s.a.SchedulerImpl] Process[web] is stopped
2021.09.19 12:32:57 WARN app[o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 143
2021.09.19 12:32:57 INFO app[o.s.a.SchedulerImpl] Process[es] is stopped
2021.09.19 12:32:57 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped
← Wrapper Stopped