Background initialization failed. Stopping SonarQube

Hi,

Can some one help on this urgently. i am USING Spnar version sonarqube-8.8.0.42792 facing two issues

  1. Background initialization error - even after clearing the Data/ES7 FOLDER this is not working
  2. Connection time out - the Sonarqube is pointing custom pool site of IIS instead of local host:9000
    need urgently to get this set
2021.04.28 12:12:03 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
org.sonar.server.es.ElasticsearchException: Fail to execute es requestES indices exists request on indices 'metadatas'
	at org.sonar.server.es.EsClient.execute(EsClient.java:278)
	at org.sonar.server.es.EsClient.indexExists(EsClient.java:177)
	at org.sonar.server.es.IndexCreator.start(IndexCreator.java:85)
	at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
	at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
	at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
	at org.picocontainer.behaviors.Stored.start(Stored.java:110)
	at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
	at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
	at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:90)
	at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:578)
	at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:213)
	at org.sonar.server.platform.PlatformImpl.startLevel34Containers(PlatformImpl.java:187)
	at org.sonar.server.platform.PlatformImpl.access$500(PlatformImpl.java:46)
	at org.sonar.server.platform.PlatformImpl$1.lambda$doRun$0(PlatformImpl.java:120)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:370)
	at org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:120)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:354)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.net.ConnectException: Timeout connecting to [columbus-demo.live/184.168.131.241:9001]

Thanks,
Lalitha S

Hi Lalith,

Welcome to the community!

It looks like your Elasticsearch process isn’t responding to connection attempts. What’s in that server log?

 
Ann

I am getting the same error. here is my web.log file:

2021.05.23 15:38:59 INFO  web[][o.s.p.ProcessEntryPoint] Starting web
2021.05.23 15:38:59 INFO  web[][o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2021.05.23 15:38:59 INFO  web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [http://spack.itdev.com:9001]
2021.05.23 15:38:59 INFO  web[][o.s.s.p.LogServerVersion] SonarQube Server / 8.9.0.43852 / 681d1975f698b70fc4e981593f7bed298ff2f60d
2021.05.23 15:38:59 INFO  web[][o.sonar.db.Database] Create JDBC data source for jdbc:sqlserver://localhost;databaseName=sonar;integratedSecurity=true
2021.05.23 15:39:00 INFO  web[][o.s.s.p.ServerFileSystemImpl] SonarQube home: D:\SoftwarePackages\ApplicationSecurityTestingTools\sonarQube\sonarqube-8.9.0.43852
2021.05.23 15:39:00 INFO  web[][o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled
2021.05.23 15:39:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin C# Code Quality and Security / 8.22.0.31243 / e3cee7838d992e31dcdd90cf4f7406bb20535e8e
2021.05.23 15:39:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin CSS Code Quality and Security / 1.4.2.2002 / faa7d4f1407df67df7ada53caf677ab783721173
2021.05.23 15:39:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Flex Code Quality and Security / 2.6.1.2564 / bb723840701bda72510b7a47742811d20daad331
2021.05.23 15:39:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Go Code Quality and Security / 1.8.3.2219 / d6ad7a5a47fc4785d2e80918fb7424be46e38a7f
2021.05.23 15:39:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin HTML Code Quality and Security / 3.4.0.2754 / 38f7ff864ae15152c9f1efc3014594f7e7ca7b6e
2021.05.23 15:39:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin JaCoCo / 1.1.1.1157 / 83478572b9f23efac29de15e30c7758bbb0c0e47
2021.05.23 15:39:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Java Code Quality and Security / 6.15.1.26025 / 1b1e96715bfa9f6a4ae24e95cc5b91f0edce609f
2021.05.23 15:39:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin JavaScript/TypeScript Code Quality and Security / 7.4.2.15501 / 288a72ff137745d1d1054c704a03c2344ada0ea3
2021.05.23 15:39:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Kotlin Code Quality and Security / 1.8.3.2219 / d6ad7a5a47fc4785d2e80918fb7424be46e38a7f
2021.05.23 15:39:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin PHP Code Quality and Security / 3.17.0.7439 / 44c7760147080c157fa0ff579772f92d3c8e1ebf
2021.05.23 15:39:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Python Code Quality and Security / 3.4.1.8066 / 22139ec73fb2f32044f66477ea52734415683668
2021.05.23 15:39:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Ruby Code Quality and Security / 1.8.3.2219 / d6ad7a5a47fc4785d2e80918fb7424be46e38a7f
2021.05.23 15:39:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin Scala Code Quality and Security / 1.8.3.2219 / d6ad7a5a47fc4785d2e80918fb7424be46e38a7f
2021.05.23 15:39:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin VB.NET Code Quality and Security / 8.22.0.31243 / e3cee7838d992e31dcdd90cf4f7406bb20535e8e
2021.05.23 15:39:00 INFO  web[][o.s.s.p.ServerPluginManager] Deploy plugin XML Code Quality and Security / 2.2.0.2973 / 16002945f0725643a7b42f090572795dd8b72a0f
2021.05.23 15:39:01 INFO  web[][o.s.s.p.d.m.c.MssqlCharsetHandler] Verify that database collation is case-sensitive and accent-sensitive
2021.05.23 15:39:01 WARN  web[][o.a.c.u.SessionIdGeneratorBase] Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [141] milliseconds.
2021.05.23 15:39:01 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.platform.web.WebServiceFilter@5ce64f5 [pattern=UrlPattern{inclusions=[/api/system/migrate_db.*, ...], exclusions=[/api/components/update_key, ...]}]
2021.05.23 15:39:01 INFO  web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2021.05.23 15:39:02 INFO  web[][o.s.s.p.UpdateCenterClient] Update center: https://update.sonarsource.org/update-center.properties (no proxy)
2021.05.23 15:39:04 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
org.sonar.server.es.ElasticsearchException: Fail to execute es requestES indices exists request on indices 'metadatas'
	at org.sonar.server.es.EsClient.execute(EsClient.java:313)
	at org.sonar.server.es.EsClient.indexExists(EsClient.java:188)
	at org.sonar.server.es.IndexCreator.start(IndexCreator.java:85)
	at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
	at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
	at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
	at org.picocontainer.behaviors.Stored.start(Stored.java:110)
	at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
	at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
	at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:90)
	at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:581)
	at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:213)
	at org.sonar.server.platform.PlatformImpl.startLevel34Containers(PlatformImpl.java:187)
	at org.sonar.server.platform.PlatformImpl.access$500(PlatformImpl.java:46)
	at org.sonar.server.platform.PlatformImpl$1.lambda$doRun$0(PlatformImpl.java:120)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:370)
	at org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:120)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:354)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.net.ConnectException: Connection refused: no further information
	at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:880)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:283)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:270)
	at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1654)
	at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1639)
	at org.elasticsearch.client.IndicesClient.exists(IndicesClient.java:963)
	at org.sonar.server.es.EsClient.lambda$indexExists$20(EsClient.java:188)
	at org.sonar.server.es.EsClient.execute(EsClient.java:311)
	... 21 common frames omitted
Caused by: java.net.ConnectException: Connection refused: no further information
	at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:779)
	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:174)
	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:148)
	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:351)
	at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:221)
	at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64)
	... 1 common frames omitted
2021.05.23 15:39:05 INFO  web[][o.s.p.ProcessEntryPoint] Hard stopping process

Ok in my case I found that the local Elasticsearch was connected to a different machine name that was there by mistake in my hosts file.
when I commented that entry and refreshed my DNS the Elasticsearch worked. and I was able to launch the SonarQube Site.

2 Likes

Hi everyone,
I have the same error when I upgrade my Sonar Version.
My current version is : Developer Edition Version 8.9 (build 43852). With this version I dont get this exception.
But when I upgrade to version 8.9.1.44547 and start the service I get pretty much the same error like @mgoutah

From another thread SonarQube fails to start I took the advice to delete data/es7 and restart. But since the exception in that case wasn’t exactly the same as my exception, it didn’t help.

Here is my log:

2021.06.30 10:30:02 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
org.sonar.server.es.ElasticsearchException: Fail to execute es requestES create index 'metadatas'
	at org.sonar.server.es.EsClient.execute(EsClient.java:313)
	at org.sonar.server.es.EsClient.create(EsClient.java:193)
	at org.sonar.server.es.IndexCreator.createIndex(IndexCreator.java:149)
	at org.sonar.server.es.IndexCreator.start(IndexCreator.java:89)
	at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
	at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
	at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
	at org.picocontainer.behaviors.Stored.start(Stored.java:110)
	at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
	at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
	at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:90)
	at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:581)
	at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:213)
	at org.sonar.server.platform.PlatformImpl.startLevel34Containers(PlatformImpl.java:187)
	at org.sonar.server.platform.PlatformImpl.access$500(PlatformImpl.java:46)
	at org.sonar.server.platform.PlatformImpl$1.lambda$doRun$0(PlatformImpl.java:120)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:370)
	at org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:120)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:354)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.net.SocketTimeoutException: 60.000 milliseconds timeout on connection http-outgoing-0 [ACTIVE]
	at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:865)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:283)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:270)
	at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1654)
	at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1639)
	at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1606)
	at org.elasticsearch.client.IndicesClient.create(IndicesClient.java:134)
	at org.sonar.server.es.EsClient.lambda$create$22(EsClient.java:193)
	at org.sonar.server.es.EsClient.execute(EsClient.java:311)
	... 22 common frames omitted
Caused by: java.net.SocketTimeoutException: 60.000 milliseconds timeout on connection http-outgoing-0 [ACTIVE]
	at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.timeout(HttpAsyncRequestExecutor.java:387)
	at org.apache.http.impl.nio.client.InternalIODispatch.onTimeout(InternalIODispatch.java:92)
	at org.apache.http.impl.nio.client.InternalIODispatch.onTimeout(InternalIODispatch.java:39)
	at org.apache.http.impl.nio.reactor.AbstractIODispatch.timeout(AbstractIODispatch.java:175)
	at org.apache.http.impl.nio.reactor.BaseIOReactor.sessionTimedOut(BaseIOReactor.java:261)
	at org.apache.http.impl.nio.reactor.AbstractIOReactor.timeoutCheck(AbstractIOReactor.java:502)
	at org.apache.http.impl.nio.reactor.BaseIOReactor.validate(BaseIOReactor.java:211)
	at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:280)
	at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:591)
	... 1 common frames omitted
2021.06.30 10:30:03 INFO  web[][o.s.p.ProcessEntryPoint] Hard stopping process
2021.06.30 10:30:17 WARN  web[][o.s.p.ProcessEntryPoint$HardStopperThread] Can not stop in 1000ms

Usually the upgrade goes pretty smoothly but in this case I can’t rund SonarQube.
My ugrade routine is:

  1. Stop old SonarQube Service
  2. Delete SonarQube Service
  3. Recreate SonarQube Service with path to my new sonar_home, including updatet sonar.properties and wrapper.conf
  4. run bin/windows-x86-64/StartNTService as admin

@mgoutah What exactly did you do ?
@ganncamp Is there anything that I can do further to eliminate this exception ? Do you need more info/logs ?

Thanks for any help in advance
Cheers
Claudius

Hi Claudius,

What do your server logs say? Specifically, since the error in web.log is about executing an ES request… what does the Elasticsearch log say?

 
Ann

Hello @ganncamp,

my ES Log for this part goes like this:

2021.06.30 10:26:45 INFO  es[][o.e.n.Node] version[7.12.1], pid[2996], build[unknown/unknown/3186837139b9c6b6d23c3200870651f10d3343b7/2021-04-20T20:56:39.040728659Z], OS[Windows Server 2016/10.0/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/11/11+28]
2021.06.30 10:26:45 INFO  es[][o.e.n.Node] JVM home [C:\Program Files (x86)\Java]
2021.06.30 10:26:45 INFO  es[][o.e.n.Node] JVM arguments [-XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.io.tmpdir=D:\sonarqube-8.9.1.44547\ElasticSearch_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, -Delasticsearch, -Des.path.home=D:\sonarqube-8.9.1.44547\elasticsearch, -Des.path.conf=D:\sonarqube-8.9.1.44547\ElasticSearch_temp\conf\es]
2021.06.30 10:26:46 INFO  es[][o.e.p.PluginsService] loaded module [analysis-common]
2021.06.30 10:26:46 INFO  es[][o.e.p.PluginsService] loaded module [lang-painless]
2021.06.30 10:26:46 INFO  es[][o.e.p.PluginsService] loaded module [parent-join]
2021.06.30 10:26:46 INFO  es[][o.e.p.PluginsService] loaded module [percolator]
2021.06.30 10:26:46 INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]
2021.06.30 10:26:46 INFO  es[][o.e.p.PluginsService] no plugins loaded
2021.06.30 10:26:46 INFO  es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[Volume (D:)]], net usable_space [76.4gb], net total_space [79.9gb], types [NTFS]
2021.06.30 10:26:46 INFO  es[][o.e.e.NodeEnvironment] heap size [495.3mb], compressed ordinary object pointers [true]
2021.06.30 10:26:46 INFO  es[][o.e.n.Node] node name [sonarqube], node ID [HpZ6-hcDRBGllNzEPf_z6w], cluster name [sonarqube], roles [master, remote_cluster_client, data, ingest]
2021.06.30 10:26:50 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.06.30 10:26:50 INFO  es[][o.e.d.DiscoveryModule] using discovery type [zen] and seed hosts providers [settings]
2021.06.30 10:26:52 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.06.30 10:26:52 INFO  es[][o.e.n.Node] initialized
2021.06.30 10:26:52 INFO  es[][o.e.n.Node] starting ...
2021.06.30 10:26:53 INFO  es[][o.e.t.TransportService] publish_address {127.0.0.1:53458}, bound_addresses {127.0.0.1:53458}
2021.06.30 10:26:53 INFO  es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
2021.06.30 10:26:53 INFO  es[][o.e.c.c.Coordinator] setting initial configuration to VotingConfiguration{HpZ6-hcDRBGllNzEPf_z6w}
2021.06.30 10:26:53 INFO  es[][o.e.c.s.MasterService] elected-as-master ([1] nodes joined)[{sonarqube}{HpZ6-hcDRBGllNzEPf_z6w}{jVfPXW_IRQ63aWamPbEmVw}{127.0.0.1}{127.0.0.1:53458}{dimr}{rack_id=sonarqube} elect leader, _BECOME_MASTER_TASK_, _FINISH_ELECTION_], term: 1, version: 1, delta: master node changed {previous [], current [{sonarqube}{HpZ6-hcDRBGllNzEPf_z6w}{jVfPXW_IRQ63aWamPbEmVw}{127.0.0.1}{127.0.0.1:53458}{dimr}{rack_id=sonarqube}]}
2021.06.30 10:26:53 INFO  es[][o.e.c.c.CoordinationState] cluster UUID set to [SrgbfO-PR_KzNIN_uzh0OA]
2021.06.30 10:26:53 INFO  es[][o.e.c.s.ClusterApplierService] master node changed {previous [], current [{sonarqube}{HpZ6-hcDRBGllNzEPf_z6w}{jVfPXW_IRQ63aWamPbEmVw}{127.0.0.1}{127.0.0.1:53458}{dimr}{rack_id=sonarqube}]}, term: 1, version: 1, reason: Publication{term=1, version=1}
2021.06.30 10:26:53 INFO  es[][o.e.h.AbstractHttpServerTransport] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2021.06.30 10:26:53 INFO  es[][o.e.n.Node] started
2021.06.30 10:26:53 INFO  es[][o.e.g.GatewayService] recovered [0] indices into cluster_state
2021.06.30 10:29:11 WARN  es[][o.e.h.AbstractHttpServerTransport] handling request [null][PUT][/metadatas?master_timeout=30s&timeout=30s][Netty4HttpChannel{localAddress=/127.0.0.1:9001, remoteAddress=/127.0.0.1:53496}] took [8746ms] which is above the warn threshold of [5000ms]
2021.06.30 10:29:27 INFO  es[][o.e.c.m.MetadataCreateIndexService] [metadatas] creating index, cause [api], templates [], shards [1]/[0]
2021.06.30 10:29:53 WARN  es[][o.e.g.PersistedClusterStateService] writing cluster state took [10829ms] which is above the warn threshold of [10s]; wrote global metadata [false] and metadata for [1] indices and skipped [0] unchanged indices
2021.06.30 10:29:53 INFO  es[][o.e.c.c.C.CoordinatorPublication] after [16.5s] publication of cluster state version [3] is still waiting for {sonarqube}{HpZ6-hcDRBGllNzEPf_z6w}{jVfPXW_IRQ63aWamPbEmVw}{127.0.0.1}{127.0.0.1:53458}{dimr}{rack_id=sonarqube} [SENT_PUBLISH_REQUEST]
2021.06.30 10:30:39 INFO  es[][o.e.c.r.a.AllocationService] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[metadatas][0]]]).

Is there anything that in here that rings a bell for you ? The only thing I see suspicious are the 2 Warnings at the end…maybe…

Hi Claudius,

Those es.log warnings happened at 10:29:11 & 10:29:53. The error in web.log happened at 10:30:02, so they’re likely unrelated. However, I see that your es node wasn’t green until 10:30:39, so I guess the fact that the indexation request was sent before that is a problem. Could you include some of what happened before the error?

 
Ann

Hello @ganncamp,

I think I solved the problem, my server is now running with the new version :slight_smile:
But for the sake of information I would like to walk you throw what I have done and how it effect the service.

(1) First I simply restartet the service (without changing anything to recreate the scenario).
Then I got following error on web.log:

2021.07.01 09:04:46 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
java.lang.NullPointerException: null
	at org.sonar.server.es.metadata.MetadataIndexImpl.getMetadata(MetadataIndexImpl.java:98)
	at org.sonar.server.es.metadata.MetadataIndexImpl.getInitialized(MetadataIndexImpl.java:62)
	at org.sonar.server.es.IndexerStartupTask.lambda$getUninitializedTypes$0(IndexerStartupTask.java:99)
	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176)
	at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
	at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
	at org.sonar.server.es.IndexerStartupTask.getUninitializedTypes(IndexerStartupTask.java:100)
	at org.sonar.server.es.IndexerStartupTask.indexUninitializedTypes(IndexerStartupTask.java:62)
	at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
	at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
	at org.sonar.server.es.IndexerStartupTask.execute(IndexerStartupTask.java:53)
	at java.base/java.util.Optional.ifPresent(Optional.java:183)
	at org.sonar.server.platform.platformlevel.PlatformLevelStartup$1.doPrivileged(PlatformLevelStartup.java:88)
	at org.sonar.server.user.DoPrivileged.execute(DoPrivileged.java:45)
	at org.sonar.server.platform.platformlevel.PlatformLevelStartup.start(PlatformLevelStartup.java:84)
	at org.sonar.server.platform.PlatformImpl.executeStartupTasks(PlatformImpl.java:198)
	at org.sonar.server.platform.PlatformImpl.access$400(PlatformImpl.java:46)
	at org.sonar.server.platform.PlatformImpl$1.lambda$doRun$1(PlatformImpl.java:122)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:370)
	at org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:122)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:354)
	at java.base/java.lang.Thread.run(Thread.java:834)

( but no error or warning on es.log)
→ Service stopped, SonarQube Server was offline

(2) Then I deleted data/es7 and startet the service
After that I got the following error on web.log:

2021.07.01 09:18:35 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
org.sonar.server.es.ElasticsearchException: Fail to execute es requestES create index 'metadatas'
	at org.sonar.server.es.EsClient.execute(EsClient.java:313)
	at org.sonar.server.es.EsClient.create(EsClient.java:193)
	at org.sonar.server.es.IndexCreator.createIndex(IndexCreator.java:149)
	at org.sonar.server.es.IndexCreator.start(IndexCreator.java:89)
	at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
	at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
	at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
	at org.picocontainer.behaviors.Stored.start(Stored.java:110)
	at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
	at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
	at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:90)
	at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:581)
	at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:213)
	at org.sonar.server.platform.PlatformImpl.startLevel34Containers(PlatformImpl.java:187)
	at org.sonar.server.platform.PlatformImpl.access$500(PlatformImpl.java:46)
	at org.sonar.server.platform.PlatformImpl$1.lambda$doRun$0(PlatformImpl.java:120)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:370)
	at org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:120)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:354)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.net.SocketTimeoutException: 60.000 milliseconds timeout on connection http-outgoing-0 [ACTIVE]
	at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:865)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:283)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:270)
	at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1654)
	at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1639)
	at org.elasticsearch.client.RestHighLevelClient.performRequestAndParseEntity(RestHighLevelClient.java:1606)
	at org.elasticsearch.client.IndicesClient.create(IndicesClient.java:134)
	at org.sonar.server.es.EsClient.lambda$create$22(EsClient.java:193)
	at org.sonar.server.es.EsClient.execute(EsClient.java:311)
	... 22 common frames omitted
Caused by: java.net.SocketTimeoutException: 60.000 milliseconds timeout on connection http-outgoing-0 [ACTIVE]
	at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.timeout(HttpAsyncRequestExecutor.java:387)
	at org.apache.http.impl.nio.client.InternalIODispatch.onTimeout(InternalIODispatch.java:92)
	at org.apache.http.impl.nio.client.InternalIODispatch.onTimeout(InternalIODispatch.java:39)
	at org.apache.http.impl.nio.reactor.AbstractIODispatch.timeout(AbstractIODispatch.java:175)
	at org.apache.http.impl.nio.reactor.BaseIOReactor.sessionTimedOut(BaseIOReactor.java:261)
	at org.apache.http.impl.nio.reactor.AbstractIOReactor.timeoutCheck(AbstractIOReactor.java:502)
	at org.apache.http.impl.nio.reactor.BaseIOReactor.validate(BaseIOReactor.java:211)
	at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:280)
	at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:104)
	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:591)
	... 1 common frames omitted

and in es.log

2021.07.01 09:17:23 WARN  es[][o.e.c.InternalClusterInfoService] failed to retrieve stats for node [j6ip9-84QIettM9MaQBSkA]: [sonarqube][127.0.0.1:57435][cluster:monitor/nodes/stats[n]] request_id [11] timed out after [15229ms]
2021.07.01 09:17:23 WARN  es[][o.e.t.TransportService] Received response for a request that has timed out, sent [15.2s/15229ms] ago, timed out [0s/0ms] ago, action [cluster:monitor/nodes/stats[n]], node [{sonarqube}{j6ip9-84QIettM9MaQBSkA}{KBc-Cso2Qg6Z8IsQkqObVg}{127.0.0.1}{127.0.0.1:57435}{dimr}{rack_id=sonarqube}], id [11]
2021.07.01 09:17:35 WARN  es[][o.e.h.AbstractHttpServerTransport] handling request [null][HEAD][/metadatas?ignore_throttled=false&ignore_unavailable=false&expand_wildcards=open%2Cclosed&allow_no_indices=false][Netty4HttpChannel{localAddress=/127.0.0.1:9001, remoteAddress=/127.0.0.1:57469}] took [10652ms] which is above the warn threshold of [5000ms]
2021.07.01 09:18:20 INFO  es[][o.e.c.m.MetadataCreateIndexService] [metadatas] creating index, cause [api], templates [], shards [1]/[0]
2021.07.01 09:18:20 WARN  es[][o.e.c.s.MasterService] took [24.9s], which is over [10s], to compute cluster state update for [create-index [metadatas], cause [api]]

→ Service stopped, SonarQube Server was offline

(3) Simply Start service again
I get in web.log:

2021.07.01 09:30:25 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
org.sonar.server.es.ElasticsearchException: Fail to execute es requestES index request for key 'dbVendor' on index 'metadatas' on type 'metadata'
	at org.sonar.server.es.EsClient.execute(EsClient.java:313)
	at org.sonar.server.es.EsClient.index(EsClient.java:174)
	at org.sonar.server.es.metadata.MetadataIndexImpl.setMetadata(MetadataIndexImpl.java:104)
	at org.sonar.server.es.metadata.MetadataIndexImpl.setDbMetadata(MetadataIndexImpl.java:90)
	at org.sonar.server.es.metadata.EsDbCompatibilityImpl.markAsCompatible(EsDbCompatibilityImpl.java:44)
	at org.sonar.server.es.IndexCreator.checkDbCompatibility(IndexCreator.java:212)
	at org.sonar.server.es.IndexCreator.start(IndexCreator.java:94)
	at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
	at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
	at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
	at org.picocontainer.behaviors.Stored.start(Stored.java:110)
	at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
	at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
	at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:90)
	at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:581)
	at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:213)
	at org.sonar.server.platform.PlatformImpl.startLevel34Containers(PlatformImpl.java:187)
	at org.sonar.server.platform.PlatformImpl.access$500(PlatformImpl.java:46)
	at org.sonar.server.platform.PlatformImpl$1.lambda$doRun$0(PlatformImpl.java:120)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:370)
	at org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:120)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:354)
	at java.base/java.lang.Thread.run(Thread.java:834)

and in es.log

2021.07.01 09:28:10 WARN  es[][o.e.c.InternalClusterInfoService] failed to retrieve shard stats from node [j6ip9-84QIettM9MaQBSkA]: [sonarqube][127.0.0.1:57515][indices:monitor/stats[n]] request_id [16] timed out after [29630ms]
2021.07.01 09:28:33 WARN  es[][o.e.t.TransportService] Received response for a request that has timed out, sent [1.2m/77034ms] ago, timed out [47.4s/47404ms] ago, action [indices:monitor/stats[n]], node [{sonarqube}{j6ip9-84QIettM9MaQBSkA}{9YAOf7wcScCWipwn6e4aTA}{127.0.0.1}{127.0.0.1:57515}{dimr}{rack_id=sonarqube}], id [16]
2021.07.01 09:28:57 WARN  es[][o.e.h.AbstractHttpServerTransport] handling request [null][HEAD][/metadatas?ignore_throttled=false&ignore_unavailable=false&expand_wildcards=open%2Cclosed&allow_no_indices=false][Netty4HttpChannel{localAddress=/127.0.0.1:9001, remoteAddress=/127.0.0.1:57553}] took [8396ms] which is above the warn threshold of [5000ms]
2021.07.01 09:30:32 INFO  es[][o.e.c.m.MetadataMappingService] [metadatas/4OP9xdhQR96fRZfcEAvjRg] create_mapping [metadata]

→ Service stopped, SonarQube Server was offline

(4) Again deleting data/es7 and start service
Now, everything worked fine. Service started correctly and I see the logs I want to see :slight_smile:

Summary:
So after restarting the service multiple times, with deleting the data/es7 folder twice, I got several different exceptions most likely in the same area (ES).
From the outside, it seems like some sort of hickup :slight_smile: but now its working.

I hope, I didn’t overwhelm you with log information, but maybe you got something out of it. You definitly got the deeper understanding here. And if you can comprehend what exaclty happened here, I would be happy to know about it.

P.S.: Great Webinar on the cognitive complexity theme yesterday. I’m excited to show this to my colleagues.

Cheers
Claudius

Hi Claudius,

Thanks for the followup (and the kind words! :blush:). I’ve flagged this thread for more expert attention. It sounds like some kind of race condition that maybe the developers need to look into.

 
Ann

Hi Ann,

thank you, that might be good idea.
I had to restart the server again and ran into the exception again. So it seems to be an error that occurs sporadically.
Maybe your developers can reproduce it.

Greetings
Claudius

Hi everyone,

I have the same error when I upgrade my SonarQube from Version 8.4.2 (build 36762) to 8.9.1 ( build 44547). Enterprise Edition. Can some one help on this

At first I got the jdbc driver error, after I solved the jdbc error, I started the service successfully, updated the database, after updating the database, the service crashed and doesn’t come up anymore. Clearing the data / es7 folder does not help.

My web.log:

2021.07.08 12:30:31 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
org.sonar.server.es.ElasticsearchException: Fail to execute es requestES indices exists request on indices 'metadatas'
	at org.sonar.server.es.EsClient.execute(EsClient.java:313)
	at org.sonar.server.es.EsClient.indexExists(EsClient.java:188)
	at org.sonar.server.es.IndexCreator.start(IndexCreator.java:85)
	at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
	at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
	at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
	at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
	at org.picocontainer.behaviors.Stored.start(Stored.java:110)
	at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
	at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
	at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:90)
	at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:581)
	at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:213)
	at org.sonar.server.platform.PlatformImpl.startLevel34Containers(PlatformImpl.java:187)
	at org.sonar.server.platform.PlatformImpl.access$500(PlatformImpl.java:46)
	at org.sonar.server.platform.PlatformImpl$1.lambda$doRun$0(PlatformImpl.java:120)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:370)
	at org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:120)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:354)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.net.ConnectException: Connection refused: no further information
	at org.elasticsearch.client.RestClient.extractAndWrapCause(RestClient.java:880)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:283)
	at org.elasticsearch.client.RestClient.performRequest(RestClient.java:270)
	at org.elasticsearch.client.RestHighLevelClient.internalPerformRequest(RestHighLevelClient.java:1654)
	at org.elasticsearch.client.RestHighLevelClient.performRequest(RestHighLevelClient.java:1639)
	at org.elasticsearch.client.IndicesClient.exists(IndicesClient.java:963)
	at org.sonar.server.es.EsClient.lambda$indexExists$20(EsClient.java:188)
	at org.sonar.server.es.EsClient.execute(EsClient.java:311)
	... 21 common frames omitted
Caused by: java.net.ConnectException: Connection refused: no further information
	at java.base/sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:779)
	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:174)
	at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:148)
	at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:351)
	at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:221)
	at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64)
	... 1 common frames omitted
2021.07.08 12:30:32 INFO  web[][o.s.p.ProcessEntryPoint] Hard stopping process

My es.log:

2021.07.08 12:30:06 INFO  es[][o.e.n.Node] version[7.12.1], pid[13540], build[unknown/unknown/3186837139b9c6b6d23c3200870651f10d3343b7/2021-04-20T20:56:39.040728659Z], OS[Windows Server 2012 R2/6.3/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/11.0.11.0.1/11.0.11.0.1+1-LTS-5]
2021.07.08 12:30:06 INFO  es[][o.e.n.Node] JVM home [C:\Program Files\Java\jdk-11.0.11.0.1]
2021.07.08 12:30:06 INFO  es[][o.e.n.Node] JVM arguments [-XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.io.tmpdir=C:\SonarQubeEnterprise\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, -Xmx2G, -Xms2G, -XX:+HeapDumpOnOutOfMemoryError, -Delasticsearch, -Des.path.home=C:\SonarQubeEnterprise\elasticsearch, -Des.path.conf=C:\SonarQubeEnterprise\temp\conf\es]
2021.07.08 12:30:08 INFO  es[][o.e.p.PluginsService] loaded module [analysis-common]
2021.07.08 12:30:08 INFO  es[][o.e.p.PluginsService] loaded module [lang-painless]
2021.07.08 12:30:08 INFO  es[][o.e.p.PluginsService] loaded module [parent-join]
2021.07.08 12:30:08 INFO  es[][o.e.p.PluginsService] loaded module [percolator]
2021.07.08 12:30:08 INFO  es[][o.e.p.PluginsService] loaded module [transport-netty4]
2021.07.08 12:30:08 INFO  es[][o.e.p.PluginsService] no plugins loaded
2021.07.08 12:30:08 INFO  es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[System (C:)]], net usable_space [47.1gb], net total_space [199.6gb], types [NTFS]
2021.07.08 12:30:08 INFO  es[][o.e.e.NodeEnvironment] heap size [1.9gb], compressed ordinary object pointers [true]
2021.07.08 12:30:08 INFO  es[][o.e.n.Node] node name [sonarqube], node ID [jNJQOQJ7RdGVchZ80BL50A], cluster name [sonarqube], roles [master, remote_cluster_client, data, ingest]
2021.07.08 12:30:12 INFO  es[][o.e.t.NettyAllocator] creating NettyAllocator with the following configs: [name=elasticsearch_configured, chunk_size=1mb, suggested_max_allocation_size=1mb, factors={es.unsafe.use_netty_default_chunk_and_page_size=false, g1gc_enabled=false, g1gc_region_size=0b}]
2021.07.08 12:30:13 INFO  es[][o.e.d.DiscoveryModule] using discovery type [zen] and seed hosts providers [settings]
2021.07.08 12:30:13 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.07.08 12:30:13 INFO  es[][o.e.n.Node] initialized
2021.07.08 12:30:13 INFO  es[][o.e.n.Node] starting ...
2021.07.08 12:30:13 INFO  es[][o.e.t.TransportService] publish_address {127.0.0.1:63716}, bound_addresses {127.0.0.1:63716}
2021.07.08 12:30:14 INFO  es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
2021.07.08 12:30:14 INFO  es[][o.e.c.c.Coordinator] setting initial configuration to VotingConfiguration{jNJQOQJ7RdGVchZ80BL50A}
2021.07.08 12:30:14 INFO  es[][o.e.c.s.MasterService] elected-as-master ([1] nodes joined)[{sonarqube}{jNJQOQJ7RdGVchZ80BL50A}{xclus3WcS6q2-UwDxb9ymA}{127.0.0.1}{127.0.0.1:63716}{dimr}{rack_id=sonarqube} elect leader, _BECOME_MASTER_TASK_, _FINISH_ELECTION_], term: 1, version: 1, delta: master node changed {previous [], current [{sonarqube}{jNJQOQJ7RdGVchZ80BL50A}{xclus3WcS6q2-UwDxb9ymA}{127.0.0.1}{127.0.0.1:63716}{dimr}{rack_id=sonarqube}]}
2021.07.08 12:30:14 INFO  es[][o.e.c.c.CoordinationState] cluster UUID set to [xgY5xUxnRKCbBSxh1VfRtQ]
2021.07.08 12:30:14 INFO  es[][o.e.c.s.ClusterApplierService] master node changed {previous [], current [{sonarqube}{jNJQOQJ7RdGVchZ80BL50A}{xclus3WcS6q2-UwDxb9ymA}{127.0.0.1}{127.0.0.1:63716}{dimr}{rack_id=sonarqube}]}, term: 1, version: 1, reason: Publication{term=1, version=1}
2021.07.08 12:30:14 INFO  es[][o.e.h.AbstractHttpServerTransport] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2021.07.08 12:30:14 INFO  es[][o.e.n.Node] started
2021.07.08 12:30:14 INFO  es[][o.e.g.GatewayService] recovered [0] indices into cluster_state

Hi Oleg,

You have a connection refused error in the web.log. From SonarQube 8.6 upward, we have updated communication to ElasticSearch from TCP to HTTP. It’s worth checking if your have any network rule or firewall rule configured in your environment.

2 Likes

A post was split to a new topic: SonarQube 9.9 doesn’t start with Java 19

I increased the memory to 3GB and the problem was resolved; It seems that deleting the data/es8 folder is also useful

I have written a blog about this, and this is the link: https://blog.csdn.net/Deng_Xian_Sheng/article/details/130622234?spm=1001.2014.3001.5502 It contains some detailed information, logs, etc

That’s all for now

1 Like