But sometimes the connection is OK and i got this now, but the container keep restarting :
>
> 2021.08.26 08:06:01 DEBUG app[][o.a.h.i.n.c.MainClientExec] [exchange: 208] start execution
> 2021.08.26 08:06:01 DEBUG app[][o.a.h.c.p.RequestAddCookies] CookieSpec selected: default
> 2021.08.26 08:06:01 DEBUG app[][o.a.h.c.p.RequestAuthCache] Re-using cached 'basic' auth scheme for http://127.0.0.1:9001
> 2021.08.26 08:06:01 DEBUG es[][o.e.c.c.PublicationTransportHandler] received full cluster state version [16] with size [253]
> 2021.08.26 08:06:01 DEBUG app[][o.a.h.c.p.RequestAuthCache] No credentials for preemptive authentication
> 2021.08.26 08:06:01 DEBUG app[][o.a.h.i.n.c.InternalHttpAsyncClient] [exchange: 208] Request connection for {}->http://127.0.0.1:9001
> 2021.08.26 08:06:01 DEBUG app[][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection request: [route: {}->http://127.0.0.1:9001][total kept alive: 0; route allocated: 0 of 10; total allocated: 0 of 30]
> 2021.08.26 08:06:01 DEBUG app[][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection leased: [id: http-outgoing-0][route: {}->http://127.0.0.1:9001][total kept alive: 0; route allocated: 1 of 10; total allocated: 0 of 30]
> 2021.08.26 08:06:01 DEBUG app[][o.a.h.i.n.c.InternalHttpAsyncClient] [exchange: 208] Connection allocated: CPoolProxy{http-outgoing-0 [ACTIVE]}
> 2021.08.26 08:06:01 DEBUG es[][o.e.g.PersistedClusterStateService] writing cluster state took [0ms]; wrote global metadata [false] and metadata for [0] indices and skipped [0] unchanged indices
> 2021.08.26 08:06:01 DEBUG app[][o.a.h.i.n.c.ManagedNHttpClientConnectionImpl] http-outgoing-0 127.0.0.1:43522<->127.0.0.1:9001[ACTIVE][r:]: Set attribute http.nio.exchange-handler
> 2021.08.26 08:06:01 DEBUG app[][o.a.h.i.n.c.ManagedNHttpClientConnectionImpl] http-outgoing-0 127.0.0.1:43522<->127.0.0.1:9001[ACTIVE][rw:]: Event set [w]
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.ManagedNHttpClientConnectionImpl] http-outgoing-0 127.0.0.1:43522<->127.0.0.1:9001[ACTIVE][rw:]: Set timeout 0
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.InternalIODispatch] http-outgoing-0 [ACTIVE]: Connected
> 2021.08.26 08:06:01 DEBUG es[][o.e.c.c.ElectionSchedulerFactory] scheduleNextElection{gracePeriod=500ms, thisAttempt=1, maxDelayMillis=200, delayMillis=697, ElectionScheduler{attempt=2, ElectionSchedulerFactory{initialTimeout=100ms, backoffTime=100ms, maxTimeout=10s}}} not starting election
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.ManagedNHttpClientConnectionImpl] http-outgoing-0 127.0.0.1:43522<->127.0.0.1:9001[ACTIVE][rw:]: Set attribute http.nio.http-exchange-state
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.InternalHttpAsyncClient] [exchange: 208] Start connection routing
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.InternalHttpAsyncClient] [exchange: 208] route completed
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.MainClientExec] [exchange: 208] Connection route established
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.MainClientExec] [exchange: 208] Attempt 1 to execute request
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.MainClientExec] [exchange: 208] Target auth state: UNCHALLENGED
> 2021.08.26 08:06:02 DEBUG es[][o.e.c.s.ClusterApplierService] processing [Publication{term=8, version=16}]: execute
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.MainClientExec] [exchange: 208] Proxy auth state: UNCHALLENGED
> 2021.08.26 08:06:02 DEBUG es[][o.e.c.s.ClusterApplierService] cluster state updated, version [16], source [Publication{term=8, version=16}]
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.ManagedNHttpClientConnectionImpl] http-outgoing-0 127.0.0.1:43522<->127.0.0.1:9001[ACTIVE][rw:]: Set timeout 30000
> 2021.08.26 08:06:02 DEBUG app[][o.a.http.headers] http-outgoing-0 >> GET /_cluster/health?master_timeout=30s&level=cluster&timeout=30s&wait_for_status=yellow HTTP/1.1
> 2021.08.26 08:06:02 DEBUG app[][o.a.http.headers] http-outgoing-0 >> Content-Length: 0
> 2021.08.26 08:06:02 DEBUG app[][o.a.http.headers] http-outgoing-0 >> Host: 127.0.0.1:9001
> 2021.08.26 08:06:02 DEBUG app[][o.a.http.headers] http-outgoing-0 >> Connection: Keep-Alive
> 2021.08.26 08:06:02 DEBUG app[][o.a.http.headers] http-outgoing-0 >> User-Agent: elasticsearch-java/7.12.1-SNAPSHOT (Java/11.0.11)
> 2021.08.26 08:06:02 DEBUG app[][o.a.http.headers] http-outgoing-0 >> X-Elastic-Client-Meta: es=7.12.1-SNAPSHOT,jv=11,t=7.12.1-SNAPSHOT,hc=4.1.4,kt=1.4
> 2021.08.26 08:06:02 DEBUG es[][o.e.c.s.ClusterApplierService] applying settings from cluster state with version 16
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.ManagedNHttpClientConnectionImpl] http-outgoing-0 127.0.0.1:43522<->127.0.0.1:9001[ACTIVE][rw:]: Event set [w]
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.MainClientExec] [exchange: 208] Request completed
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.ManagedNHttpClientConnectionImpl] http-outgoing-0 127.0.0.1:43522<->127.0.0.1:9001[ACTIVE][rw:w]: 312 bytes written
> 2021.08.26 08:06:02 DEBUG app[][org.apache.http.wire] http-outgoing-0 >> "GET /_cluster/health?master_timeout=30s&level=cluster&timeout=30s&wait_for_status=yellow HTTP/1.1[\r][\n]"
> 2021.08.26 08:06:02 DEBUG app[][org.apache.http.wire] http-outgoing-0 >> "Content-Length: 0[\r][\n]"
> 2021.08.26 08:06:02 DEBUG app[][org.apache.http.wire] http-outgoing-0 >> "Host: 127.0.0.1:9001[\r][\n]"
> 2021.08.26 08:06:02 DEBUG app[][org.apache.http.wire] http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
> 2021.08.26 08:06:02 DEBUG app[][org.apache.http.wire] http-outgoing-0 >> "User-Agent: elasticsearch-java/7.12.1-SNAPSHOT (Java/11.0.11)[\r][\n]"
> 2021.08.26 08:06:02 DEBUG app[][org.apache.http.wire] http-outgoing-0 >> "X-Elastic-Client-Meta: es=7.12.1-SNAPSHOT,jv=11,t=7.12.1-SNAPSHOT,hc=4.1.4,kt=1.4[\r][\n]"
> 2021.08.26 08:06:02 DEBUG app[][org.apache.http.wire] http-outgoing-0 >> "[\r][\n]"
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.InternalIODispatch] http-outgoing-0 [ACTIVE] Request ready
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.ManagedNHttpClientConnectionImpl] http-outgoing-0 127.0.0.1:43522<->127.0.0.1:9001[ACTIVE][r:w]: Event cleared [w]
> 2021.08.26 08:06:02 DEBUG es[][o.e.c.s.ClusterApplierService] apply cluster state with version 16
> 2021.08.26 08:06:02 DEBUG es[][o.e.c.s.ClusterApplierService] set locally applied cluster state to version 16
> 2021.08.26 08:06:02 DEBUG es[][o.e.c.s.ClusterApplierService] processing [Publication{term=8, version=16}]: took [0s] done applying updated cluster state (version: 16, uuid: 0__63SdHScSp1kC8dHC70w)
> 2021.08.26 08:06:02 DEBUG es[][o.e.c.c.C.CoordinatorPublication] publication ended successfully: Publication{term=8, version=16}
> 2021.08.26 08:06:02 INFO es[][o.e.g.GatewayService] recovered [0] indices into cluster_state
> 2021.08.26 08:06:02 DEBUG es[][o.e.c.s.MasterService] took [0s] to notify listeners on successful publication of cluster state (version: 16, uuid: 0__63SdHScSp1kC8dHC70w) for [local-gateway-elected-state]
> 2021.08.26 08:06:02 DEBUG es[][i.n.b.AbstractByteBuf] -Dio.netty.buffer.checkAccessible: true
> 2021.08.26 08:06:02 DEBUG es[][i.n.b.AbstractByteBuf] -Dio.netty.buffer.checkBounds: true
> 2021.08.26 08:06:02 DEBUG es[][i.n.u.ResourceLeakDetectorFactory] Loaded default ResourceLeakDetector: io.netty.util.ResourceLeakDetector@6cbca52e
> 2021.08.26 08:06:02 DEBUG es[][i.n.u.Recycler] -Dio.netty.recycler.maxCapacityPerThread: disabled
> 2021.08.26 08:06:02 DEBUG es[][i.n.u.Recycler] -Dio.netty.recycler.maxSharedCapacityFactor: disabled
> 2021.08.26 08:06:02 DEBUG es[][i.n.u.Recycler] -Dio.netty.recycler.linkCapacity: disabled
> 2021.08.26 08:06:02 DEBUG es[][i.n.u.Recycler] -Dio.netty.recycler.ratio: disabled
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.ManagedNHttpClientConnectionImpl] http-outgoing-0 127.0.0.1:43522<->127.0.0.1:9001[ACTIVE][r:r]: 472 bytes read
> 2021.08.26 08:06:02 DEBUG app[][org.apache.http.wire] http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
> 2021.08.26 08:06:02 DEBUG app[][org.apache.http.wire] http-outgoing-0 << "content-type: application/json; charset=UTF-8[\r][\n]"
> 2021.08.26 08:06:02 DEBUG app[][org.apache.http.wire] http-outgoing-0 << "content-length: 385[\r][\n]"
> 2021.08.26 08:06:02 DEBUG app[][org.apache.http.wire] http-outgoing-0 << "[\r][\n]"
> 2021.08.26 08:06:02 DEBUG app[][org.apache.http.wire] http-outgoing-0 << "{"cluster_name":"sonarqube","status":"green","timed_out":false,"number_of_nodes":1,"number_of_data_nodes":1,"active_primary_shards":0,"active_shards":0,"relocating_shards":0,"initializing_shards":0,"unassigned_shards":0,"delayed_unassigned_shards":0,"number_of_pending_tasks":0,"number_of_in_flight_fetch":0,"task_max_waiting_in_queue_millis":0,"active_shards_percent_as_number":100.0}"
> 2021.08.26 08:06:02 DEBUG app[][o.a.http.headers] http-outgoing-0 << HTTP/1.1 200 OK
> 2021.08.26 08:06:02 DEBUG app[][o.a.http.headers] http-outgoing-0 << content-type: application/json; charset=UTF-8
> 2021.08.26 08:06:02 DEBUG app[][o.a.http.headers] http-outgoing-0 << content-length: 385
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.InternalIODispatch] http-outgoing-0 [ACTIVE(385)] Response received
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.MainClientExec] [exchange: 208] Response received HTTP/1.1 200 OK
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.InternalIODispatch] http-outgoing-0 [ACTIVE(385)] Input ready
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.MainClientExec] [exchange: 208] Consume content
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.InternalHttpAsyncClient] [exchange: 208] Connection can be kept alive indefinitely
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.MainClientExec] [exchange: 208] Response processed
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.InternalHttpAsyncClient] [exchange: 208] releasing connection
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.ManagedNHttpClientConnectionImpl] http-outgoing-0 127.0.0.1:43522<->127.0.0.1:9001[ACTIVE][r:r]: Remove attribute http.nio.exchange-handler
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Releasing connection: [id: http-outgoing-0][route: {}->http://127.0.0.1:9001][total kept alive: 0; route allocated: 1 of 10; total allocated: 1 of 30]
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection [id: http-outgoing-0][route: {}->http://127.0.0.1:9001] can be kept alive indefinitely
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.ManagedNHttpClientConnectionImpl] http-outgoing-0 127.0.0.1:43522<->127.0.0.1:9001[ACTIVE][r:r]: Set timeout 0
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection released: [id: http-outgoing-0][route: {}->http://127.0.0.1:9001][total kept alive: 1; route allocated: 1 of 10; total allocated: 1 of 30]
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.InternalIODispatch] http-outgoing-0 [ACTIVE] [content length: 385; pos: 385; completed: true]
> 2021.08.26 08:06:02 DEBUG app[][o.e.c.RestClient] request [GET http://127.0.0.1:9001/_cluster/health?master_timeout=30s&level=cluster&timeout=30s&wait_for_status=yellow] returned [HTTP/1.1 200 OK]
> 2021.08.26 08:06:02 DEBUG app[][o.e.c.RestClient] removed [[host=http://127.0.0.1:9001]] from blacklist
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection manager is shutting down
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.ManagedNHttpClientConnectionImpl] http-outgoing-0 127.0.0.1:43522<->127.0.0.1:9001[ACTIVE][r:r]: Close
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.InternalIODispatch] http-outgoing-0 [CLOSED]: Disconnected
> 2021.08.26 08:06:02 DEBUG app[][o.a.h.i.n.c.PoolingNHttpClientConnectionManager] Connection manager shut down
> 2021.08.26 08:06:02 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
> 2021.08.26 08:06:02 DEBUG app[][o.s.a.p.ManagedProcessLifecycle] EventWatcher[es] tryToMoveTo es from STARTED to STARTING => false
> 2021.08.26 08:06:02 DEBUG app[][o.s.a.p.ManagedProcessLifecycle] EventWatcher[es] tryToMoveTo web from INIT to STARTING => true
> 2021.08.26 08:06:02 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonarqube]: /opt/java/openjdk/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/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 -Xmx1G -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-8.9.1.44547.jar:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.2.19.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process5413975547699738413properties
> 2021.08.26 08:06:02 DEBUG app[][o.s.a.p.ManagedProcessLifecycle] EventWatcher[es] tryToMoveTo web from STARTING to STARTED => true
> 2021.08.26 08:06:02 DEBUG es[][o.e.m.j.JvmGcMonitorService] [gc][2] overhead, spent [116ms] collecting in the last [1s]
> 2021.08.26 08:06:03 INFO web[][o.s.p.ProcessEntryPoint] Starting web
> 2021.08.26 08:06:04 INFO web[][o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
> 2021.08.26 08:06:06 INFO web[][o.s.c.e.CoreExtensionsLoader] Loaded core extensions: enterprise-edition, ce-workers, developer-scanner, developer-server, governance, license, securityreport
> 2021.08.26 08:06:06 DEBUG web[][o.s.c.e.CoreExtensionsInstaller] Installed core extension: enterprise-edition
> 2021.08.26 08:06:06 DEBUG web[][o.s.c.e.CoreExtensionsInstaller] Installed core extension: ce-workers
> 2021.08.26 08:06:06 DEBUG web[][o.s.c.e.CoreExtensionsInstaller] Installed core extension: developer-scanner
> 2021.08.26 08:06:06 DEBUG web[][o.s.c.e.CoreExtensionsInstaller] Installed core extension: developer-server
> 2021.08.26 08:06:06 DEBUG web[][o.s.c.e.CoreExtensionsInstaller] Installed core extension: governance
> 2021.08.26 08:06:06 DEBUG web[][o.s.c.e.CoreExtensionsInstaller] Installed core extension: license
> 2021.08.26 08:06:06 DEBUG web[][o.s.c.e.CoreExtensionsInstaller] Installed core extension: securityreport
> 2021.08.26 08:06:06 INFO web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [http://localhost:9001]