-
-
Save ThabetAmer/b818a262c71467c7403fd75bc526b8f9 to your computer and use it in GitHub Desktop.
# | |
# Based on https://hub.docker.com/_/sonarqube | |
# | |
version: "3.7" | |
services: | |
sonarqube: | |
container_name: sonarqube | |
image: sonarqube:7.9.2-community | |
ports: | |
- "9000:9000" | |
environment: | |
- SONARQUBE_JDBC_URL=jdbc:postgresql://db:5432/sonar | |
- SONARQUBE_JDBC_USERNAME=sonar | |
- SONARQUBE_JDBC_PASSWORD=sonar | |
networks: | |
- sonarnet | |
volumes: | |
- sonarqube_conf:/opt/sonarqube/conf | |
- sonarqube_data:/opt/sonarqube/data | |
- sonarqube_logs:/opt/sonarqube/logs | |
- sonarqube_extensions:/opt/sonarqube/extensions | |
- sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins | |
db: | |
container_name: sonardb | |
image: postgres | |
networks: | |
- sonarnet | |
environment: | |
- POSTGRES_USER=sonar | |
- POSTGRES_PASSWORD=sonar | |
volumes: | |
- postgresql:/var/lib/postgresql | |
- postgresql_data:/var/lib/postgresql/data | |
sonarscanner: | |
container_name: sonarscanner | |
image: newtmitch/sonar-scanner | |
networks: | |
- sonarnet | |
volumes: | |
- ./:/usr/src | |
networks: | |
sonarnet: | |
volumes: | |
sonarqube_conf: | |
sonarqube_data: | |
sonarqube_logs: | |
sonarqube_extensions: | |
sonarqube_bundled-plugins: | |
postgresql: | |
postgresql_data: |
sonar-project.properties | |
# must be unique in a given SonarQube instance | |
sonar.projectKey=sample1 | |
# --- optional properties --- | |
# defaults to project key | |
#sonar.projectName=My project | |
# defaults to 'not provided' | |
#sonar.projectVersion=1.0 | |
# Path is relative to the sonar-project.properties file. Defaults to . | |
sonar.sources=. | |
# Encoding of the source code. Default is default system encoding | |
sonar.sourceEncoding=UTF-8 |
#!/bin/bash | |
# per https://hub.docker.com/_/sonarqube | |
# to be executed before launching the app | |
sysctl -w vm.max_map_count=262144 | |
sysctl -w fs.file-max=65536 | |
ulimit -n 65536 | |
ulimit -u 4096 |
I tried to run your full script but displaying several errors. Do you know what it can be?
I've tried everything and I can't solve it.
Thanks,
Attaching to sonarqube, sonarscanner, sonardb
sonarqube | tail: cannot open './logs/es.log' for reading: No such file or directory
sonardb |
sonardb | PostgreSQL Database directory appears to contain a database; Skipping initialization
sonardb |
sonardb | 2021-12-17 22:50:26.360 UTC [1] LOG: starting PostgreSQL 14.1 (Debian 14.1-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
sonardb | 2021-12-17 22:50:26.360 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
sonardb | 2021-12-17 22:50:26.361 UTC [1] LOG: listening on IPv6 address "::", port 5432
sonardb | 2021-12-17 22:50:26.363 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
sonarscanner | INFO: Scanner configuration file: /usr/lib/sonar-scanner/conf/sonar-scanner.properties
sonarscanner | INFO: Project root configuration file: /usr/src/sonar-project.properties
sonardb | 2021-12-17 22:50:26.368 UTC [26] LOG: database system was shut down at 2021-12-17 22:50:04 UTC
sonardb | 2021-12-17 22:50:26.373 UTC [1] LOG: database system is ready to accept connections
sonarscanner | INFO: SonarScanner 4.5.0.2216
sonarscanner | INFO: Java 12-ea Oracle Corporation (64-bit)
sonarscanner | INFO: Linux 5.11.0-43-generic amd64
sonarscanner | INFO: User cache: /root/.sonar/cache
sonarscanner | ERROR: SonarQube server [http://sonarqube:9000] can not be reached
sonarscanner | INFO: ------------------------------------------------------------------------
sonarscanner | INFO: EXECUTION FAILURE
sonarscanner | INFO: ------------------------------------------------------------------------
sonarscanner | INFO: Total time: 0.310s
sonarscanner | INFO: Final Memory: 3M/20M
sonarscanner | INFO: ------------------------------------------------------------------------
sonarscanner | ERROR: Error during SonarScanner execution
sonarscanner | org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarScanner analysis
sonarscanner | at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
sonarscanner | at java.base/java.security.AccessController.doPrivileged(AccessController.java:310)
sonarscanner | at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
sonarscanner | at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70)
sonarscanner | at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:185)
sonarscanner | at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:123)
sonarscanner | at org.sonarsource.scanner.cli.Main.execute(Main.java:73)
sonarscanner | at org.sonarsource.scanner.cli.Main.main(Main.java:61)
sonarscanner | Caused by: java.lang.IllegalStateException: Fail to get bootstrap index from server
sonarscanner | at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:42)
sonarscanner | at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:58)
sonarscanner | at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53)
sonarscanner | at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)
sonarscanner | ... 7 more
sonarscanner | Caused by: java.net.ConnectException: Failed to connect to sonarqube/192.168.64.4:9000
sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connectSocket(RealConnection.java:265)
sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connect(RealConnection.java:183)
sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224)
sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108)
sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88)
sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.Transmitter.newExchange(Transmitter.java:169)
sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)
sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.getResponseWithInterceptorChain(RealCall.java:221)
sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.execute(RealCall.java:81)
sonarscanner | at org.sonarsource.scanner.api.internal.ServerConnection.callUrl(ServerConnection.java:114)
sonarscanner | at org.sonarsource.scanner.api.internal.ServerConnection.downloadString(ServerConnection.java:99)
sonarscanner | at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:39)
sonarscanner | ... 10 more
sonarscanner | Caused by: java.net.ConnectException: Connection refused (Connection refused)
sonarscanner | at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
sonarscanner | at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
sonarscanner | at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
sonarscanner | at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
sonarscanner | at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
sonarscanner | at java.base/java.net.Socket.connect(Socket.java:591)
sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.platform.Platform.connectSocket(Platform.java:130)
sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connectSocket(RealConnection.java:263)
sonarscanner | ... 31 more
sonarscanner | ERROR:
sonarscanner | ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
sonarqube | 2021.12.17 22:50:26 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp
sonarqube | 2021.12.17 22:50:26 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001
sonarqube | 2021.12.17 22:50:26 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch
sonarqube | 2021.12.17 22:50:26 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
sonarscanner exited with code 1
sonarqube | OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
sonarqube | 2021.12.17 22:50:27 INFO app[][o.e.p.PluginsService] no modules loaded
sonarqube | 2021.12.17 22:50:27 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
sonarqube | tail: './logs/es.log' has appeared; following new file
sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/opt/sonarqube/data (/dev/nvme0n1p2)]], net usable_space [87.4gb], net total_space [233.2gb], types [ext4]
sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.e.NodeEnvironment] heap size [494.9mb], compressed ordinary object pointers [true]
sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.n.Node] node name [sonarqube], node ID [0RqgRKXiTVilU97y3zLRmg]
sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.n.Node] version[6.8.0], pid[28], build[default/tar/65b6179/2019-05-15T20:06:13.172855Z], OS[Linux/5.11.0-43-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/11.0.6/11.0.6+10]
sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.n.Node] JVM arguments [-XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -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, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/opt/sonarqube/temp, -XX:ErrorFile=../logs/es_hs_err_pid%p.log, -Des.enforce.bootstrap.checks=true, -Xms512m, -Xmx512m, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/opt/sonarqube/elasticsearch, -Des.path.conf=/opt/sonarqube/temp/conf/es, -Des.distribution.flavor=default, -Des.distribution.type=tar]
sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.p.PluginsService] loaded module [analysis-common]
sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.p.PluginsService] loaded module [lang-painless]
sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.p.PluginsService] loaded module [mapper-extras]
sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.p.PluginsService] loaded module [parent-join]
sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.p.PluginsService] loaded module [percolator]
sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.p.PluginsService] loaded module [reindex]
sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.p.PluginsService] loaded module [repository-url]
sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.p.PluginsService] loaded module [transport-netty4]
sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.p.PluginsService] no plugins loaded
sonarqube | 2021.12.17 22:50:30 WARN es[][o.e.d.c.s.Settings] [http.enabled] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version.
sonarqube | 2021.12.17 22:50:30 INFO es[][o.e.d.DiscoveryModule] using discovery type [zen] and host providers [settings]
sonarqube | 2021.12.17 22:50:31 INFO es[][o.e.n.Node] initialized
sonarqube | 2021.12.17 22:50:31 INFO es[][o.e.n.Node] starting ...
sonarqube | 2021.12.17 22:50:31 INFO es[][o.e.t.TransportService] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
sonarqube | 2021.12.17 22:50:31 INFO es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
sonarqube | 2021.12.17 22:50:34 INFO app[][o.s.a.SchedulerImpl] Process[es] is up
sonarqube | 2021.12.17 22:50:34 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonarqube]: /usr/local/openjdk-11/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/temp --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 -Djava.security.egd=file:/dev/./urandom -Dhttp.nonProxyHosts=localhost|127.|[::1] -cp ./lib/common/:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.2.5.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process15828633026674114808properties
sonarqube | 2021.12.17 22:50:34 INFO web[][o.s.p.ProcessEntryPoint] Starting web
sonarqube | 2021.12.17 22:50:35 INFO web[][o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
sonarqube | 2021.12.17 22:50:34 INFO es[][o.e.c.s.MasterService] zen-disco-elected-as-master ([0] nodes joined), reason: new_master {sonarqube}{0RqgRKXiTVilU97y3zLRmg}{jyjZ3WayRUqSUFtFYfpp9w}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}
sonarqube | 2021.12.17 22:50:34 INFO es[][o.e.c.s.ClusterApplierService] new_master {sonarqube}{0RqgRKXiTVilU97y3zLRmg}{jyjZ3WayRUqSUFtFYfpp9w}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}, reason: apply cluster state (from master [master {sonarqube}{0RqgRKXiTVilU97y3zLRmg}{jyjZ3WayRUqSUFtFYfpp9w}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)]])
sonarqube | 2021.12.17 22:50:34 INFO es[][o.e.n.Node] started
sonarqube | 2021.12.17 22:50:34 INFO es[][o.e.g.GatewayService] recovered [0] indices into cluster_state
sonarqube | 2021.12.17 22:50:35 INFO web[][o.e.p.PluginsService] no modules loaded
sonarqube | 2021.12.17 22:50:35 INFO web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.join.ParentJoinPlugin]
sonarqube | 2021.12.17 22:50:35 INFO web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.percolator.PercolatorPlugin]
sonarqube | 2021.12.17 22:50:35 INFO web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
sonarqube | 2021.12.17 22:50:36 INFO web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [127.0.0.1:9001]
sonarqube | 2021.12.17 22:50:36 INFO web[][o.s.s.p.LogServerVersion] SonarQube Server / 7.9.2.30863 / cd30425aa0b4e62c39b57c81d64be16e365f6d83
sonarqube | 2021.12.17 22:50:36 INFO web[][o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://db:5432/sonar
sonardb | 2021-12-17 22:50:36.718 UTC [33] FATAL: database "sonar" does not exist
sonarqube | 2021.12.17 22:50:36 ERROR web[][o.s.s.p.Platform] Web server startup failed
sonarqube | java.lang.IllegalStateException: Fail to connect to database
sonarqube | at org.sonar.db.DefaultDatabase.start(DefaultDatabase.java:90)
sonarqube | at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40)
sonarqube | at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
sonarqube | at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
sonarqube | at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
sonarqube | at org.picocontainer.behaviors.Stored.start(Stored.java:110)
sonarqube | at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
sonarqube | at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
sonarqube | at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
sonarqube | at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
sonarqube | at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:90)
sonarqube | at org.sonar.server.platform.platformlevel.PlatformLevel1.start(PlatformLevel1.java:160)
sonarqube | at org.sonar.server.platform.Platform.start(Platform.java:211)
sonarqube | at org.sonar.server.platform.Platform.startLevel1Container(Platform.java:170)
sonarqube | at org.sonar.server.platform.Platform.init(Platform.java:86)
sonarqube | at org.sonar.server.platform.web.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:43)
sonarqube | at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4817)
sonarqube | at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5283)
sonarqube | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
sonarqube | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1423)
sonarqube | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1413)
sonarqube | at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
sonarqube | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
sonarqube | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
sonarqube | at java.base/java.lang.Thread.run(Unknown Source)
sonarqube | Caused by: java.lang.IllegalStateException: Can not connect to database. Please check connectivity and settings (see the properties prefixed by 'sonar.jdbc.').
sonarqube | at org.sonar.db.DefaultDatabase.checkConnection(DefaultDatabase.java:134)
sonarqube | at org.sonar.db.DefaultDatabase.start(DefaultDatabase.java:87)
sonarqube | ... 24 common frames omitted
sonarqube | Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory (FATAL: database "sonar" does not exist)
sonarqube | at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2385)
sonarqube | at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2110)
sonarqube | at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1563)
sonarqube | at org.sonar.db.profiling.NullConnectionInterceptor.getConnection(NullConnectionInterceptor.java:31)
sonarqube | at org.sonar.db.profiling.ProfiledDataSource.getConnection(ProfiledDataSource.java:317)
sonarqube | at org.sonar.db.DefaultDatabase.checkConnection(DefaultDatabase.java:131)
sonarqube | ... 25 common frames omitted
sonarqube | Caused by: org.postgresql.util.PSQLException: FATAL: database "sonar" does not exist
sonarqube | at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
sonarqube | at org.postgresql.core.v3.QueryExecutorImpl.readStartupMessages(QueryExecutorImpl.java:2559)
sonarqube | at org.postgresql.core.v3.QueryExecutorImpl.(QueryExecutorImpl.java:133)
sonarqube | at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:250)
sonarqube | at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
sonarqube | at org.postgresql.jdbc.PgConnection.(PgConnection.java:195)
sonarqube | at org.postgresql.Driver.makeConnection(Driver.java:454)
sonarqube | at org.postgresql.Driver.connect(Driver.java:256)
sonarqube | at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:53)
sonarqube | at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:291)
sonarqube | at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2395)
sonarqube | at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2381)
sonarqube | ... 30 common frames omitted
sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][[timer]]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sonarqube | [email protected]/java.lang.Thread.sleep(Native Method)
sonarqube | app//org.elasticsearch.threadpool.ThreadPool$CachedTimeThread.run(ThreadPool.java:574)
sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][scheduler][T#1]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sonarqube | [email protected]/jdk.internal.misc.Unsafe.park(Native Method)
sonarqube | [email protected]/java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
sonarqube | [email protected]/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown Source)
sonarqube | [email protected]/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
sonarqube | [email protected]/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source)
sonarqube | [email protected]/java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
sonarqube | [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
sonarqube | [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
sonarqube | [email protected]/java.lang.Thread.run(Unknown Source)
sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#1]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method)
sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source)
sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765)
sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413)
sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
sonarqube | [email protected]/java.lang.Thread.run(Unknown Source)
sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][generic][T#1]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sonarqube | [email protected]/jdk.internal.misc.Unsafe.park(Native Method)
sonarqube | [email protected]/java.util.concurrent.locks.LockSupport.park(Unknown Source)
sonarqube | [email protected]/java.util.concurrent.LinkedTransferQueue.awaitMatch(Unknown Source)
sonarqube | [email protected]/java.util.concurrent.LinkedTransferQueue.xfer(Unknown Source)
sonarqube | [email protected]/java.util.concurrent.LinkedTransferQueue.take(Unknown Source)
sonarqube | [email protected]/java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
sonarqube | [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
sonarqube | [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
sonarqube | [email protected]/java.lang.Thread.run(Unknown Source)
sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#2]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method)
sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source)
sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765)
sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413)
sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
sonarqube | [email protected]/java.lang.Thread.run(Unknown Source)
sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#3]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method)
sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source)
sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765)
sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413)
sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
sonarqube | [email protected]/java.lang.Thread.run(Unknown Source)
sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#4]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method)
sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source)
sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765)
sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413)
sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
sonarqube | [email protected]/java.lang.Thread.run(Unknown Source)
sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#5]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method)
sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source)
sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765)
sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413)
sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
sonarqube | [email protected]/java.lang.Thread.run(Unknown Source)
sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#6]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method)
sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source)
sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765)
sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413)
sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
sonarqube | [email protected]/java.lang.Thread.run(Unknown Source)
sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#7]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method)
sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source)
sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765)
sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413)
sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
sonarqube | [email protected]/java.lang.Thread.run(Unknown Source)
sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#8]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method)
sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source)
sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765)
sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413)
sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
sonarqube | [email protected]/java.lang.Thread.run(Unknown Source)
sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#9]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method)
sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source)
sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765)
sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413)
sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
sonarqube | [email protected]/java.lang.Thread.run(Unknown Source)
sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#10]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method)
sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source)
sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765)
sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413)
sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
sonarqube | [email protected]/java.lang.Thread.run(Unknown Source)
sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#11]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method)
sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source)
sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765)
sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413)
sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
sonarqube | [email protected]/java.lang.Thread.run(Unknown Source)
sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#12]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method)
sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source)
sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765)
sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413)
sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
sonarqube | [email protected]/java.lang.Thread.run(Unknown Source)
sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#13]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method)
sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source)
sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765)
sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413)
sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
sonarqube | [email protected]/java.lang.Thread.run(Unknown Source)
sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#14]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method)
sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source)
sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765)
sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413)
sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909)
sonarqube | [email protected]/java.lang.Thread.run(Unknown Source)
sonarqube | 2021.12.17 22:50:36 INFO web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
sonarqube | 2021.12.17 22:50:36 INFO web[][o.s.p.ProcessEntryPoint] Hard stopping process
sonarqube | 2021.12.17 22:50:37 INFO app[][o.s.a.SchedulerImpl] Process[web] is stopped
sonarqube | 2021.12.17 22:50:37 INFO es[][o.e.n.Node] stopping ...
sonarqube | 2021.12.17 22:50:37 INFO es[][o.e.n.Node] stopped
sonarqube | 2021.12.17 22:50:37 INFO es[][o.e.n.Node] closing ...
sonarqube | 2021.12.17 22:50:37 INFO es[][o.e.n.Node] closed
sonarqube | 2021.12.17 22:50:37 INFO app[][o.s.a.SchedulerImpl] Process[es] is stopped
sonarqube | 2021.12.17 22:50:37 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 143
sonarqube | 2021.12.17 22:50:37 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped
sonarqube exited with code 0
I tried to run your full script but displaying several errors. Do you know what it can be?
I've tried everything and I can't solve it.
Thanks,
Attaching to sonarqube, sonarscanner, sonardb sonarqube | tail: cannot open './logs/es.log' for reading: No such file or directory sonardb | sonardb | PostgreSQL Database directory appears to contain a database; Skipping initialization sonardb | sonardb | 2021-12-17 22:50:26.360 UTC [1] LOG: starting PostgreSQL 14.1 (Debian 14.1-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit sonardb | 2021-12-17 22:50:26.360 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 sonardb | 2021-12-17 22:50:26.361 UTC [1] LOG: listening on IPv6 address "::", port 5432 sonardb | 2021-12-17 22:50:26.363 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" sonarscanner | INFO: Scanner configuration file: /usr/lib/sonar-scanner/conf/sonar-scanner.properties sonarscanner | INFO: Project root configuration file: /usr/src/sonar-project.properties sonardb | 2021-12-17 22:50:26.368 UTC [26] LOG: database system was shut down at 2021-12-17 22:50:04 UTC sonardb | 2021-12-17 22:50:26.373 UTC [1] LOG: database system is ready to accept connections sonarscanner | INFO: SonarScanner 4.5.0.2216 sonarscanner | INFO: Java 12-ea Oracle Corporation (64-bit) sonarscanner | INFO: Linux 5.11.0-43-generic amd64 sonarscanner | INFO: User cache: /root/.sonar/cache sonarscanner | ERROR: SonarQube server [http://sonarqube:9000] can not be reached sonarscanner | INFO: ------------------------------------------------------------------------ sonarscanner | INFO: EXECUTION FAILURE sonarscanner | INFO: ------------------------------------------------------------------------ sonarscanner | INFO: Total time: 0.310s sonarscanner | INFO: Final Memory: 3M/20M sonarscanner | INFO: ------------------------------------------------------------------------ sonarscanner | ERROR: Error during SonarScanner execution sonarscanner | org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarScanner analysis sonarscanner | at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85) sonarscanner | at java.base/java.security.AccessController.doPrivileged(AccessController.java:310) sonarscanner | at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74) sonarscanner | at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70) sonarscanner | at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:185) sonarscanner | at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:123) sonarscanner | at org.sonarsource.scanner.cli.Main.execute(Main.java:73) sonarscanner | at org.sonarsource.scanner.cli.Main.main(Main.java:61) sonarscanner | Caused by: java.lang.IllegalStateException: Fail to get bootstrap index from server sonarscanner | at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:42) sonarscanner | at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:58) sonarscanner | at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53) sonarscanner | at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76) sonarscanner | ... 7 more sonarscanner | Caused by: java.net.ConnectException: Failed to connect to sonarqube/192.168.64.4:9000 sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connectSocket(RealConnection.java:265) sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connect(RealConnection.java:183) sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224) sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108) sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88) sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.Transmitter.newExchange(Transmitter.java:169) sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41) sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94) sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88) sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.getResponseWithInterceptorChain(RealCall.java:221) sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.RealCall.execute(RealCall.java:81) sonarscanner | at org.sonarsource.scanner.api.internal.ServerConnection.callUrl(ServerConnection.java:114) sonarscanner | at org.sonarsource.scanner.api.internal.ServerConnection.downloadString(ServerConnection.java:99) sonarscanner | at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:39) sonarscanner | ... 10 more sonarscanner | Caused by: java.net.ConnectException: Connection refused (Connection refused) sonarscanner | at java.base/java.net.PlainSocketImpl.socketConnect(Native Method) sonarscanner | at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399) sonarscanner | at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242) sonarscanner | at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224) sonarscanner | at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403) sonarscanner | at java.base/java.net.Socket.connect(Socket.java:591) sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.platform.Platform.connectSocket(Platform.java:130) sonarscanner | at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.RealConnection.connectSocket(RealConnection.java:263) sonarscanner | ... 31 more sonarscanner | ERROR: sonarscanner | ERROR: Re-run SonarScanner using the -X switch to enable full debug logging. sonarqube | 2021.12.17 22:50:26 INFO app[][o.s.a.AppFileSystem] Cleaning or creating temp directory /opt/sonarqube/temp sonarqube | 2021.12.17 22:50:26 INFO app[][o.s.a.es.EsSettings] Elasticsearch listening on /127.0.0.1:9001 sonarqube | 2021.12.17 22:50:26 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='es', ipcIndex=1, logFilenamePrefix=es]] from [/opt/sonarqube/elasticsearch]: /opt/sonarqube/elasticsearch/bin/elasticsearch sonarqube | 2021.12.17 22:50:26 INFO app[][o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running sonarscanner exited with code 1 sonarqube | OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release. sonarqube | 2021.12.17 22:50:27 INFO app[][o.e.p.PluginsService] no modules loaded sonarqube | 2021.12.17 22:50:27 INFO app[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin] sonarqube | tail: './logs/es.log' has appeared; following new file sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.e.NodeEnvironment] using [1] data paths, mounts [[/opt/sonarqube/data (/dev/nvme0n1p2)]], net usable_space [87.4gb], net total_space [233.2gb], types [ext4] sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.e.NodeEnvironment] heap size [494.9mb], compressed ordinary object pointers [true] sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.n.Node] node name [sonarqube], node ID [0RqgRKXiTVilU97y3zLRmg] sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.n.Node] version[6.8.0], pid[28], build[default/tar/65b6179/2019-05-15T20:06:13.172855Z], OS[Linux/5.11.0-43-generic/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/11.0.6/11.0.6+10] sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.n.Node] JVM arguments [-XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -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, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=/opt/sonarqube/temp, -XX:ErrorFile=../logs/es_hs_err_pid%p.log, -Des.enforce.bootstrap.checks=true, -Xms512m, -Xmx512m, -XX:+HeapDumpOnOutOfMemoryError, -Des.path.home=/opt/sonarqube/elasticsearch, -Des.path.conf=/opt/sonarqube/temp/conf/es, -Des.distribution.flavor=default, -Des.distribution.type=tar] sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.p.PluginsService] loaded module [analysis-common] sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.p.PluginsService] loaded module [lang-painless] sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.p.PluginsService] loaded module [mapper-extras] sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.p.PluginsService] loaded module [parent-join] sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.p.PluginsService] loaded module [percolator] sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.p.PluginsService] loaded module [reindex] sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.p.PluginsService] loaded module [repository-url] sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.p.PluginsService] loaded module [transport-netty4] sonarqube | 2021.12.17 22:50:28 INFO es[][o.e.p.PluginsService] no plugins loaded sonarqube | 2021.12.17 22:50:30 WARN es[][o.e.d.c.s.Settings] [http.enabled] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version. sonarqube | 2021.12.17 22:50:30 INFO es[][o.e.d.DiscoveryModule] using discovery type [zen] and host providers [settings] sonarqube | 2021.12.17 22:50:31 INFO es[][o.e.n.Node] initialized sonarqube | 2021.12.17 22:50:31 INFO es[][o.e.n.Node] starting ... sonarqube | 2021.12.17 22:50:31 INFO es[][o.e.t.TransportService] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001} sonarqube | 2021.12.17 22:50:31 INFO es[][o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks sonarqube | 2021.12.17 22:50:34 INFO app[][o.s.a.SchedulerImpl] Process[es] is up sonarqube | 2021.12.17 22:50:34 INFO app[][o.s.a.ProcessLauncherImpl] Launch process[[key='web', ipcIndex=2, logFilenamePrefix=web]] from [/opt/sonarqube]: /usr/local/openjdk-11/bin/java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/opt/sonarqube/temp --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 -Djava.security.egd=file:/dev/./urandom -Dhttp.nonProxyHosts=localhost|127.|[::1] -cp ./lib/common/:/opt/sonarqube/lib/jdbc/postgresql/postgresql-42.2.5.jar org.sonar.server.app.WebServer /opt/sonarqube/temp/sq-process15828633026674114808properties sonarqube | 2021.12.17 22:50:34 INFO web[][o.s.p.ProcessEntryPoint] Starting web sonarqube | 2021.12.17 22:50:35 INFO web[][o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read sonarqube | 2021.12.17 22:50:34 INFO es[][o.e.c.s.MasterService] zen-disco-elected-as-master ([0] nodes joined), reason: new_master {sonarqube}{0RqgRKXiTVilU97y3zLRmg}{jyjZ3WayRUqSUFtFYfpp9w}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube} sonarqube | 2021.12.17 22:50:34 INFO es[][o.e.c.s.ClusterApplierService] new_master {sonarqube}{0RqgRKXiTVilU97y3zLRmg}{jyjZ3WayRUqSUFtFYfpp9w}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube}, reason: apply cluster state (from master [master {sonarqube}{0RqgRKXiTVilU97y3zLRmg}{jyjZ3WayRUqSUFtFYfpp9w}{127.0.0.1}{127.0.0.1:9001}{rack_id=sonarqube} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)]]) sonarqube | 2021.12.17 22:50:34 INFO es[][o.e.n.Node] started sonarqube | 2021.12.17 22:50:34 INFO es[][o.e.g.GatewayService] recovered [0] indices into cluster_state sonarqube | 2021.12.17 22:50:35 INFO web[][o.e.p.PluginsService] no modules loaded sonarqube | 2021.12.17 22:50:35 INFO web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.join.ParentJoinPlugin] sonarqube | 2021.12.17 22:50:35 INFO web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.percolator.PercolatorPlugin] sonarqube | 2021.12.17 22:50:35 INFO web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin] sonarqube | 2021.12.17 22:50:36 INFO web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [127.0.0.1:9001] sonarqube | 2021.12.17 22:50:36 INFO web[][o.s.s.p.LogServerVersion] SonarQube Server / 7.9.2.30863 / cd30425aa0b4e62c39b57c81d64be16e365f6d83 sonarqube | 2021.12.17 22:50:36 INFO web[][o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://db:5432/sonar sonardb | 2021-12-17 22:50:36.718 UTC [33] FATAL: database "sonar" does not exist sonarqube | 2021.12.17 22:50:36 ERROR web[][o.s.s.p.Platform] Web server startup failed sonarqube | java.lang.IllegalStateException: Fail to connect to database sonarqube | at org.sonar.db.DefaultDatabase.start(DefaultDatabase.java:90) sonarqube | at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(StartableCloseableSafeLifecyleStrategy.java:40) sonarqube | at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) sonarqube | at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169) sonarqube | at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132) sonarqube | at org.picocontainer.behaviors.Stored.start(Stored.java:110) sonarqube | at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016) sonarqube | at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009) sonarqube | at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767) sonarqube | at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135) sonarqube | at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:90) sonarqube | at org.sonar.server.platform.platformlevel.PlatformLevel1.start(PlatformLevel1.java:160) sonarqube | at org.sonar.server.platform.Platform.start(Platform.java:211) sonarqube | at org.sonar.server.platform.Platform.startLevel1Container(Platform.java:170) sonarqube | at org.sonar.server.platform.Platform.init(Platform.java:86) sonarqube | at org.sonar.server.platform.web.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:43) sonarqube | at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4817) sonarqube | at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5283) sonarqube | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) sonarqube | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1423) sonarqube | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1413) sonarqube | at java.base/java.util.concurrent.FutureTask.run(Unknown Source) sonarqube | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) sonarqube | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) sonarqube | at java.base/java.lang.Thread.run(Unknown Source) sonarqube | Caused by: java.lang.IllegalStateException: Can not connect to database. Please check connectivity and settings (see the properties prefixed by 'sonar.jdbc.'). sonarqube | at org.sonar.db.DefaultDatabase.checkConnection(DefaultDatabase.java:134) sonarqube | at org.sonar.db.DefaultDatabase.start(DefaultDatabase.java:87) sonarqube | ... 24 common frames omitted sonarqube | Caused by: java.sql.SQLException: Cannot create PoolableConnectionFactory (FATAL: database "sonar" does not exist) sonarqube | at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2385) sonarqube | at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2110) sonarqube | at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1563) sonarqube | at org.sonar.db.profiling.NullConnectionInterceptor.getConnection(NullConnectionInterceptor.java:31) sonarqube | at org.sonar.db.profiling.ProfiledDataSource.getConnection(ProfiledDataSource.java:317) sonarqube | at org.sonar.db.DefaultDatabase.checkConnection(DefaultDatabase.java:131) sonarqube | ... 25 common frames omitted sonarqube | Caused by: org.postgresql.util.PSQLException: FATAL: database "sonar" does not exist sonarqube | at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440) sonarqube | at org.postgresql.core.v3.QueryExecutorImpl.readStartupMessages(QueryExecutorImpl.java:2559) sonarqube | at org.postgresql.core.v3.QueryExecutorImpl.(QueryExecutorImpl.java:133) sonarqube | at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:250) sonarqube | at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49) sonarqube | at org.postgresql.jdbc.PgConnection.(PgConnection.java:195) sonarqube | at org.postgresql.Driver.makeConnection(Driver.java:454) sonarqube | at org.postgresql.Driver.connect(Driver.java:256) sonarqube | at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:53) sonarqube | at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:291) sonarqube | at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2395) sonarqube | at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2381) sonarqube | ... 30 common frames omitted sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][[timer]]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sonarqube | [email protected]/java.lang.Thread.sleep(Native Method) sonarqube | app//org.elasticsearch.threadpool.ThreadPool$CachedTimeThread.run(ThreadPool.java:574) sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][scheduler][T#1]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sonarqube | [email protected]/jdk.internal.misc.Unsafe.park(Native Method) sonarqube | [email protected]/java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source) sonarqube | [email protected]/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown Source) sonarqube | [email protected]/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source) sonarqube | [email protected]/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(Unknown Source) sonarqube | [email protected]/java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source) sonarqube | [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) sonarqube | [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) sonarqube | [email protected]/java.lang.Thread.run(Unknown Source) sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#1]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method) sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source) sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62) sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765) sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413) sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909) sonarqube | [email protected]/java.lang.Thread.run(Unknown Source) sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][generic][T#1]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sonarqube | [email protected]/jdk.internal.misc.Unsafe.park(Native Method) sonarqube | [email protected]/java.util.concurrent.locks.LockSupport.park(Unknown Source) sonarqube | [email protected]/java.util.concurrent.LinkedTransferQueue.awaitMatch(Unknown Source) sonarqube | [email protected]/java.util.concurrent.LinkedTransferQueue.xfer(Unknown Source) sonarqube | [email protected]/java.util.concurrent.LinkedTransferQueue.take(Unknown Source) sonarqube | [email protected]/java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source) sonarqube | [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) sonarqube | [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) sonarqube | [email protected]/java.lang.Thread.run(Unknown Source) sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#2]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method) sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source) sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62) sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765) sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413) sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909) sonarqube | [email protected]/java.lang.Thread.run(Unknown Source) sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#3]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method) sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source) sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62) sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765) sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413) sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909) sonarqube | [email protected]/java.lang.Thread.run(Unknown Source) sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#4]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method) sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source) sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62) sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765) sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413) sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909) sonarqube | [email protected]/java.lang.Thread.run(Unknown Source) sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#5]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method) sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source) sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62) sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765) sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413) sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909) sonarqube | [email protected]/java.lang.Thread.run(Unknown Source) sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#6]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method) sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source) sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62) sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765) sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413) sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909) sonarqube | [email protected]/java.lang.Thread.run(Unknown Source) sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#7]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method) sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source) sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62) sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765) sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413) sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909) sonarqube | [email protected]/java.lang.Thread.run(Unknown Source) sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#8]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method) sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source) sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62) sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765) sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413) sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909) sonarqube | [email protected]/java.lang.Thread.run(Unknown Source) sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#9]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method) sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source) sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62) sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765) sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413) sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909) sonarqube | [email protected]/java.lang.Thread.run(Unknown Source) sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#10]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method) sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source) sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62) sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765) sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413) sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909) sonarqube | [email protected]/java.lang.Thread.run(Unknown Source) sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#11]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method) sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source) sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62) sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765) sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413) sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909) sonarqube | [email protected]/java.lang.Thread.run(Unknown Source) sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#12]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method) sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source) sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62) sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765) sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413) sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909) sonarqube | [email protected]/java.lang.Thread.run(Unknown Source) sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#13]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method) sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source) sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62) sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765) sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413) sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909) sonarqube | [email protected]/java.lang.Thread.run(Unknown Source) sonarqube | 2021.12.17 22:50:36 WARN web[][o.a.c.l.WebappClassLoaderBase] The web application [ROOT] appears to have started a thread named [elasticsearch[client][transport_worker][T#14]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: sonarqube | [email protected]/sun.nio.ch.EPoll.wait(Native Method) sonarqube | [email protected]/sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source) sonarqube | [email protected]/sun.nio.ch.SelectorImpl.select(Unknown Source) sonarqube | app//io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62) sonarqube | app//io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:765) sonarqube | app//io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:413) sonarqube | app//io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:909) sonarqube | [email protected]/java.lang.Thread.run(Unknown Source) sonarqube | 2021.12.17 22:50:36 INFO web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000 sonarqube | 2021.12.17 22:50:36 INFO web[][o.s.p.ProcessEntryPoint] Hard stopping process sonarqube | 2021.12.17 22:50:37 INFO app[][o.s.a.SchedulerImpl] Process[web] is stopped sonarqube | 2021.12.17 22:50:37 INFO es[][o.e.n.Node] stopping ... sonarqube | 2021.12.17 22:50:37 INFO es[][o.e.n.Node] stopped sonarqube | 2021.12.17 22:50:37 INFO es[][o.e.n.Node] closing ... sonarqube | 2021.12.17 22:50:37 INFO es[][o.e.n.Node] closed sonarqube | 2021.12.17 22:50:37 INFO app[][o.s.a.SchedulerImpl] Process[es] is stopped sonarqube | 2021.12.17 22:50:37 WARN app[][o.s.a.p.AbstractManagedProcess] Process exited with exit value [es]: 143 sonarqube | 2021.12.17 22:50:37 INFO app[][o.s.a.SchedulerImpl] SonarQube is stopped sonarqube exited with code 0
@lidymonteiro Hey Lidy, i think you're trying to reach the sonarqube server too soon, or your sonarqube container went down for some reason!
sonarscanner | ERROR: SonarQube server [http://sonarqube:9000] can not be reached
To get more info about what happened to your sonarqube instance, get the container logs by running this command:
docker logs {your-sonarqube-container-name}
Hi, I borrowed some of your settings
Is it possible to add this docker-compose file in a dev container and access sonar scanner from the remote container in vscode ?
I tried some like this:
version: '3.8'
services:
app:
container_name: dev
image: mcr.microsoft.com/devcontainers/java:8
volumes:
- ../..:/workspaces:cached
command: sleep infinity
network_mode: service:sonarqube
sonarqube:
image: sonarqube:lts-community
ports:
- "9000:9000"
networks:
- sonarnet
environment:
- SONARQUBE_JDBC_URL=jdbc:postgresql://db:5432/sonar
- SONARQUBE_JDBC_USERNAME=sonar
- SONARQUBE_JDBC_PASSWORD=sonar
volumes:
- sonarqube_conf:/opt/sonarqube/conf
- sonarqube_data:/opt/sonarqube/data
- sonarqube_extensions:/opt/sonarqube/extensions
- sonarqube_bundled-plugins:/opt/sonarqube/lib/bundled-plugins
sonarscanner:
platform: linux/amd64
image: sonarsource/sonar-scanner-cli
volumes:
- ../..:/workspaces:cached
command: sleep infinity
networks:
- sonarnet
db:
image: postgres
networks:
- sonarnet
environment:
- POSTGRES_USER=sonar
- POSTGRES_PASSWORD=sonar
volumes:
- postgresql:/var/lib/postgresql
- postgresql_data:/var/lib/postgresql/data
networks:
sonarnet:
driver: bridge
volumes:
sonarqube_conf:
sonarqube_data:
sonarqube_extensions:
sonarqube_bundled-plugins:
postgresql:
postgresql_data:
and in my .devcontainer file:
{
"name": "Testing SAST tools for Java",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/java:1": {},
"ghcr.io/devcontainers-contrib/features/maven-sdkman:2": {},
"ghcr.io/devcontainers-contrib/features/snyk-cli:1": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
9000
],
"customizations": {
"vscode": {
"extensions": [
"GitHub.copilot",
"vscjava.vscode-gradle",
]
}
},
"hostRequirements": {
"cpus": 4,
"memory": "4gb"
}
}
When I "Reopen In container" on my vscode I'd like to execute something like this:
docker run \
--network=host \
--rm -v "$(pwd):/usr/src" \
sonarsource/sonar-scanner-cli \
-Dsonar.projectKey=my-project \
-Dsonar.projectName=my-project \
-Dsonar.language=java \
-Dsonar.java.binaries=target/classes \
-Dsonar.sources=src/main/java \
-Dsonar.host.url=http://localhost:9000 \
-Dsonar.login=$JAVA_SONARQUBE_TOKEN
but inside devcontainer I can't view the sonar scanner images
thanks you !