SonarQube is stopped -- windows

Template for a good bug report, formatted with Markdown:

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension)
  • error observed (wrap logs/code around triple quote ``` for proper formatting)
  • steps to reproduce
  • potential workaround

P.S.: use the #bug:fault sub-category if you’re hitting a specific crash/error , or the #bug:fp sub-category for rules-related behaviour

PS C:\Program Files\sonarqube-developer-9.0.0.45539\sonarqube-9.0.0.45539\bin\windows-x86-64> .\StartSonar.bat
wrapper | → Wrapper Started as Console
wrapper | Launching a JVM…
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 2021.07.26 17:25:08 INFO app[o.s.a.AppFileSystem] Cleaning or creating temp directory C:\Program Files\sonarqube-developer-9.0.0.45539\sonarqube-9.0.0.45539\temp
jvm 1 | 2021.07.26 17:25:08 INFO app[o.s.a.es.EsSettings] Elasticsearch listening on [HTTP: 127.0.0.1:9001, TCP: 127.0.0.1:62446]
jvm 1 | 2021.07.26 17:25:08 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘es’, ipcIndex=1, logFilenamePrefix=es]] from [C:\Program Files\sonarqube-developer-9.0.0.45539\sonarqube-9.0.0.45539\elasticsearch]: C:\Program Files\Java\jdk-11.0.10\bin\java -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djava.io.tmpdir=C:\Program Files\sonarqube-developer-9.0.0.45539\sonarqube-9.0.0.45539\temp -XX:ErrorFile=…/logs/es_hs_err_pid%p.log -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dio.netty.allocator.numDirectArenas=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.locale.providers=COMPAT -Des.enforce.bootstrap.checks=true -Xmx512m -Xms512m -XX:MaxDirectMemorySize=256m -XX:+HeapDumpOnOutOfMemoryError -Delasticsearch -Des.path.home=C:\Program Files\sonarqube-developer-9.0.0.45539\sonarqube-9.0.0.45539\elasticsearch -Des.path.conf=C:\Program Files\sonarqube-developer-9.0.0.45539\sonarqube-9.0.0.45539\temp\conf\es -cp lib/* org.elasticsearch.bootstrap.Elasticsearch
jvm 1 | 2021.07.26 17:25:08 INFO app[o.s.a.SchedulerImpl] Waiting for Elasticsearch to be up and running
jvm 1 | Java HotSpot™ 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
jvm 1 | 2021.07.26 17:25:19 INFO app[o.s.a.SchedulerImpl] Process[es] is up
jvm 1 | 2021.07.26 17:25:19 INFO app[o.s.a.ProcessLauncherImpl] Launch process[[key=‘web’, ipcIndex=2, logFilenamePrefix=web]] from [C:\Program Files\sonarqube-developer-9.0.0.45539\sonarqube-9.0.0.45539]: C:\Program Files\Java\jdk-11.0.10\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djava.io.tmpdir=C:\Program Files\sonarqube-developer-9.0.0.45539\sonarqube-9.0.0.45539\temp -XX:-OmitStackTraceInFastThrow --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Dhttp.nonProxyHosts=localhost|127.*|[::1] -cp ./lib/sonar-application-9.0.0.45539.jar;C:\Program Files\sonarqube-developer-9.0.0.45539\sonarqube-9.0.0.45539\lib\jdbc\postgresql\postgresql-42.2.19.jar org.sonar.server.app.WebServer C:\Program Files\sonarqube-developer-9.0.0.45539\sonarqube-9.0.0.45539\temp\sq-process12175604071102771996properties
jvm 1 | 2021.07.26 17:25:24 INFO app[o.s.a.SchedulerImpl] Process[web] is stopped
jvm 1 | 2021.07.26 17:25:24 INFO app[o.s.a.SchedulerImpl] Process[es] is stopped
jvm 1 | 2021.07.26 17:25:24 INFO app[o.s.a.SchedulerImpl] SonarQube is stopped

Are there any other relevant logs in the files located in [SQ_HOME]/logs/?

yes

2021.07.26 17:30:08 INFO es[o.e.n.Node] version[7.12.1], pid[5824], build[unknown/unknown/3186837139b9c6b6d23c3200870651f10d3343b7/2021-04-20T20:56:39.040728659Z], OS[Windows Server 2019/10.0/amd64], JVM[Oracle Corporation/Java HotSpot™ 64-Bit Server VM/11.0.10/11.0.10+8-LTS-162]
2021.07.26 17:30:08 INFO es[o.e.n.Node] JVM home [C:\Program Files\Java\jdk-11.0.10]
2021.07.26 17:30:08 INFO es[o.e.n.Node] JVM arguments [-XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.io.tmpdir=C:\Program Files\sonarqube-developer-9.0.0.45539\sonarqube-9.0.0.45539\temp, -XX:ErrorFile=…/logs/es_hs_err_pid%p.log, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=COMPAT, -Des.enforce.bootstrap.checks=true, -Xmx512m, -Xms512m, -XX:MaxDirectMemorySize=256m, -XX:+HeapDumpOnOutOfMemoryError, -Delasticsearch, -Des.path.home=C:\Program Files\sonarqube-developer-9.0.0.45539\sonarqube-9.0.0.45539\elasticsearch, -Des.path.conf=C:\Program Files\sonarqube-developer-9.0.0.45539\sonarqube-9.0.0.45539\temp\conf\es]
2021.07.26 17:30:09 INFO es[o.e.p.PluginsService] loaded module [analysis-common]
2021.07.26 17:30:09 INFO es[o.e.p.PluginsService] loaded module [lang-painless]
2021.07.26 17:30:09 INFO es[o.e.p.PluginsService] loaded module [parent-join]
2021.07.26 17:30:09 INFO es[o.e.p.PluginsService] loaded module [percolator]
2021.07.26 17:30:09 INFO es[o.e.p.PluginsService] loaded module [transport-netty4]
2021.07.26 17:30:09 INFO es[o.e.p.PluginsService] no plugins loaded
2021.07.26 17:30:09 INFO es[o.e.e.NodeEnvironment] using [1] data paths, mounts [[(C:)]], net usable_space [73.8gb], net total_space [99.9gb], types [NTFS]
2021.07.26 17:30:09 INFO es[o.e.e.NodeEnvironment] heap size [495.3mb], compressed ordinary object pointers [true]
2021.07.26 17:30:09 INFO es[o.e.n.Node] node name [sonarqube], node ID [HbCrCTkhRwWT_bSkAzGEyw], cluster name [sonarqube], roles [master, remote_cluster_client, data, ingest]
2021.07.26 17:30:14 INFO es[o.e.t.NettyAllocator] creating NettyAllocator with the following configs: [name=unpooled, suggested_max_allocation_size=1mb, factors={es.unsafe.use_unpooled_allocator=null, g1gc_enabled=false, g1gc_region_size=0b, heap_size=495.3mb}]
2021.07.26 17:30:14 INFO es[o.e.d.DiscoveryModule] using discovery type [zen] and seed hosts providers [settings]
2021.07.26 17:30:15 INFO es[o.e.g.DanglingIndicesState] gateway.auto_import_dangling_indices is disabled, dangling indices will not be automatically detected or imported and must be managed manually
2021.07.26 17:30:16 INFO es[o.e.n.Node] initialized
2021.07.26 17:30:16 INFO es[o.e.n.Node] starting …
2021.07.26 17:30:16 INFO es[o.e.t.TransportService] publish_address {127.0.0.1:54384}, bound_addresses {127.0.0.1:54384}
2021.07.26 17:30:16 INFO es[o.e.b.BootstrapChecks] explicitly enforcing bootstrap checks
2021.07.26 17:30:16 INFO es[o.e.c.c.Coordinator] cluster UUID [HWwa-VxXQcqRTOGofHl4zQ]
2021.07.26 17:30:17 INFO es[o.e.c.s.MasterService] elected-as-master ([1] nodes joined)[{sonarqube}{HbCrCTkhRwWT_bSkAzGEyw}{GDKPWXi9SH6rhrC7_0yaBw}{127.0.0.1}{127.0.0.1:54384}{dimr}{rack_id=sonarqube} elect leader, BECOME_MASTER_TASK, FINISH_ELECTION], term: 4, version: 7, delta: master node changed {previous , current [{sonarqube}{HbCrCTkhRwWT_bSkAzGEyw}{GDKPWXi9SH6rhrC7_0yaBw}{127.0.0.1}{127.0.0.1:54384}{dimr}{rack_id=sonarqube}]}
2021.07.26 17:30:17 INFO es[o.e.c.s.ClusterApplierService] master node changed {previous , current [{sonarqube}{HbCrCTkhRwWT_bSkAzGEyw}{GDKPWXi9SH6rhrC7_0yaBw}{127.0.0.1}{127.0.0.1:54384}{dimr}{rack_id=sonarqube}]}, term: 4, version: 7, reason: Publication{term=4, version=7}
2021.07.26 17:30:17 INFO es[o.e.h.AbstractHttpServerTransport] publish_address {127.0.0.1:9001}, bound_addresses {127.0.0.1:9001}
2021.07.26 17:30:17 INFO es[o.e.n.Node] started
2021.07.26 17:30:17 INFO es[o.e.g.GatewayService] recovered [0] indices into cluster_state

i am going to take a license version(3000 euros) for the same, if its not working then i need to waste the license days till it works.

web logs

2021.07.27 05:00:08 INFO web[o.s.c.e.CoreExtensionsLoader] Loaded core extensions: developer-edition, developer-scanner, developer-server, license
2021.07.27 05:00:08 INFO web[o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [http://127.0.0.1:9001]
2021.07.27 05:00:09 INFO web[o.s.s.p.LogServerVersion] SonarQube Server / 9.0.0.45539 / b560c61de287500da666c2bab0d71cfe6bf95e4e
2021.07.27 05:00:09 INFO web[o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://localhost:5432/sonarqube?currentSchema=my_schema
2021.07.27 05:00:11 INFO web[o.s.s.p.ServerFileSystemImpl] SonarQube home: C:\Program Files\sonarqube-developer-9.0.0.45539\sonarqube-9.0.0.45539
2021.07.27 05:00:11 INFO web[o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled
2021.07.27 05:00:11 INFO web[o.s.s.p.d.m.h.MigrationHistoryTableImpl] Creating table schema_migrations
2021.07.27 05:00:11 ERROR web[o.s.s.p.PlatformImpl] Web server startup failed
java.lang.IllegalStateException: Failed to create table schema_migrations
at org.sonar.server.platform.db.migration.history.MigrationHistoryTableImpl.start(MigrationHistoryTableImpl.java:48)
at java.base/java.util.Optional.ifPresent(Optional.java:183)
at org.sonar.server.platform.platformlevel.PlatformLevel2.start(PlatformLevel2.java:105)
at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:213)
at org.sonar.server.platform.PlatformImpl.startLevel2Container(PlatformImpl.java:179)
at org.sonar.server.platform.PlatformImpl.init(PlatformImpl.java:87)
at org.sonar.server.platform.web.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:43)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4705)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5171)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.postgresql.util.PSQLException: ERROR: no schema has been selected to create in
Position: 14
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2553)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2285)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:323)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:481)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:401)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:322)
at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:308)
at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:284)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:279)
at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:194)
at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:194)
at org.sonar.server.platform.db.migration.history.MigrationHistoryTableImpl.execute(MigrationHistoryTableImpl.java:71)
at org.sonar.server.platform.db.migration.history.MigrationHistoryTableImpl.createTable(MigrationHistoryTableImpl.java:59)
at org.sonar.server.platform.db.migration.history.MigrationHistoryTableImpl.start(MigrationHistoryTableImpl.java:45)
… 15 common frames omitted
2021.07.27 05:00:11 INFO web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2021.07.27 05:00:11 INFO web[o.s.p.ProcessEntryPoint] Hard stopping process

Thanks. Looks like there’s a problem with the DB set up.

2021.07.27 05:00:11 INFO web[o.s.s.p.d.m.h.MigrationHistoryTableImpl] Creating table schema_migrations
2021.07.27 05:00:11 ERROR web[o.s.s.p.PlatformImpl] Web server startup failed
java.lang.IllegalStateException: Failed to create table schema_migrations
at org.sonar.server.platform.db.migration.history.MigrationHistoryTableImpl.start(MigrationHistoryTableImpl.java:48)
at java.base/java.util.Optional.ifPresent(Optional.java:183)
at org.sonar.server.platform.platformlevel.PlatformLevel2.start(PlatformLevel2.java:105)
at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:213)
at org.sonar.server.platform.PlatformImpl.startLevel2Container(PlatformImpl.java:179)
at org.sonar.server.platform.PlatformImpl.init(PlatformImpl.java:87)
at org.sonar.server.platform.web.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:43)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4705)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5171)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.postgresql.util.PSQLException: ERROR: no schema has been selected to create in

Please check your JDBC connection string and make sure the DB is correctly set up.

Can you share the DB scripts, postgres db connection is up.

You can check the section “Installing the database” here: Install the Server | SonarQube Docs

There is no need to run any DB scripts to set it up. It looks like you need to specify a schema in your JDBC connection string.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.