SonarQube service is getting stopped as soon as it starts

Hi Team,

I am trying to setup fresh SonarQube on Kubernetes platform and getting some errors.
SonarQube version being used: 7.9.4
DB used: AWS RDS (PostgreSQL- Engine Version: 12.5)

As per pod logs, I am getting below error after creating fresh PostgreSQL DB :slight_smile:

2021.05.06 07:01:14 ERROR web[][o.s.s.p.Platform] Web server startup failed: Current version is too old. Please upgrade to Long Term Support version firstly.

Google searches suggest that this error would appear when you try to upgrade sonar versions. But I am trying to set fresh setup, not any upgrades.
However, I came across below article that suggests that table named “schema_migrations” shouldn’t contain any data.
As I checked on DB, I was getting some data for this table.
Hence I deleted everything from this table.

SONAR=> SELECT * FROM schema_migrations;


























(23 rows)


SONAR=> DELETE FROM schema_migrations;


SONAR=> SELECT * FROM schema_migrations;



(0 rows)

I deleted the pod and created new pod again and I am getting errors as below:

2021.05.06 08:20:52 ERROR web[][DbMigrations] #1 'Create initial schema': failure | time=271ms
2021.05.06 08:20:52 ERROR web[][DbMigrations] Executed DB migrations: failure | time=272ms
2021.05.06 08:20:52 ERROR web[][o.s.s.p.Platform] Web server startup failed
 org.sonar.server.platform.db.migration.step.MigrationStepExecutionException: Execution of migration step #1 'Create initial schema' failed

    at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(

    at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(

    at java.base/java.lang.Iterable.forEach(Unknown Source)

    at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(

    at org.sonar.server.platform.db.migration.engine.MigrationEngineImpl.execute(

    at org.sonar.server.platform.db.migration.AutoDbMigration.start(

    at org.sonar.core.platform.StartableCloseableSafeLifecyleStrategy.start(

    at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(

    at org.picocontainer.behaviors.AbstractBehavior.start(

    at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(

    at org.picocontainer.behaviors.Stored.start(

    at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(

    at org.picocontainer.DefaultPicoContainer.startAdapters(

    at org.picocontainer.DefaultPicoContainer.start(

    at org.sonar.core.platform.ComponentContainer.startComponents(

    at org.sonar.server.platform.platformlevel.PlatformLevel.start(

    at org.sonar.server.platform.Platform.start(

    at org.sonar.server.platform.Platform.startSafeModeContainer(

    at org.sonar.server.platform.Platform.doStart(

    at org.sonar.server.platform.Platform.doStart(

    at org.sonar.server.platform.web.PlatformServletContextListener.contextInitialized(

    at org.apache.catalina.core.StandardContext.listenerStart(

    at org.apache.catalina.core.StandardContext.startInternal(

    at org.apache.catalina.util.LifecycleBase.start(

    at org.apache.catalina.core.ContainerBase$

    at org.apache.catalina.core.ContainerBase$

    at java.base/ Source)

    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

    at java.base/java.util.concurrent.ThreadPoolExecutor$ Source)

    at java.base/ Source)

Caused by: java.lang.IllegalStateException: Fail to execute CREATE TABLE active_dashboards (id SERIAL NOT NULL,dashboard_id INTEGER NOT NULL,user_id INTEGER NULL,order_index INTEGER NULL, CONSTRAINT pk_active_dashboards PRIMARY KEY (id))

    at org.sonar.server.platform.db.migration.step.DdlChange$Context.execute(

    at org.sonar.server.platform.db.migration.step.DdlChange$Context.execute(

    at org.sonar.server.platform.db.migration.step.DdlChange$Context.execute(

    at org.sonar.server.platform.db.migration.version.v56.CreateInitialSchema.createActiveDashboards(

    at org.sonar.server.platform.db.migration.version.v56.CreateInitialSchema.execute(

    at org.sonar.server.platform.db.migration.step.DdlChange.execute(

    at org.sonar.server.platform.db.migration.step.MigrationStepsExecutorImpl.execute(

    ... 29 common frames omitted

    Caused by: org.postgresql.util.PSQLException: ERROR: relation "active_dashboards" already exists

    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(

    at org.postgresql.core.v3.QueryExecutorImpl.processResults(

    at org.postgresql.core.v3.QueryExecutorImpl.execute(

    at org.postgresql.jdbc.PgStatement.executeInternal(

    at org.postgresql.jdbc.PgStatement.execute(

    at org.postgresql.jdbc.PgStatement.executeWithFlags(

    at org.postgresql.jdbc.PgStatement.executeCachedSql(

    at org.postgresql.jdbc.PgStatement.executeWithFlags(

    at org.postgresql.jdbc.PgStatement.execute(

    at org.apache.commons.dbcp2.DelegatingStatement.execute(

    at org.apache.commons.dbcp2.DelegatingStatement.execute(

    at org.sonar.server.platform.db.migration.step.DdlChange$Context.execute(

    ... 35 common frames omitted

Can anyone please help me to resolve the issue ?

Vaibhav Jariwala

Hi Vaibhav,

If you truly want a brand new instance, then start with an empty schema. SonarQube will take it from there.


Hi @ganncamp ,
Thanks for sparing time and responding to my query.

I have deleted all schemas and ensured DB is empty and then started pod again.
I am still getting the same error as below:

2021.05.07 05:01:00 ERROR web[][o.s.s.p.Platform] Web server startup failed: Current version is too old. Please upgrade to Long Term Support version firstly.

I’m not sure if the error you are seeing refers to the version of the SonarQube server. However, version 7.9.4 is an LTS version from July '20; the latest 7.9 LTS version is 7.9.6 from March '21. The most recent LTS version is 8.9 which was released just this week.
Any specific reason why you are using 7.9.4 instead of 7.9.6 or 8.9? What happens if you use one of those versions (preferrably 8.9)?


I have tried to setup stack using latest sonarqube version: 8.9:community
I am still getting the same error as below:

2021.05.07 11:34:07 INFO  web[][o.s.s.p.LogServerVersion] SonarQube Server / / 681d1975f698b70fc4e981593f7bed298ff2f60d
2021.05.07 11:34:07 INFO  web[][o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://
2021.05.07 11:34:10 INFO  web[][o.s.s.p.ServerFileSystemImpl] SonarQube home: /opt/sonarqube
2021.05.07 11:34:10 INFO  web[][o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled
2021.05.07 11:34:12 ERROR web[][o.s.s.p.PlatformImpl] Web server startup failed: Current version is too old. Please upgrade to Long Term Support version firstly.

I am using AWS RDS PostgreSQL with engine version: 11.1 as it is compatible with sonarqube 8.9 version.


That error indicates that you’re connecting to a SonarQube schema which is from a version of SonarQube older than 7.9. You are not connecting to a blank/empty schema, which is required to start up a brand new instance.


I have used brand new RDS instance only. Actually, tried twice by creating new RDS and used the same.
I am still getting error.

Even I cross verified that nothing was resent in DB after RDS created.
No tables were there.
I created stack and observed many tables got created during sonarqube installation.
Not sure, why I am getting the LTS error when I am using new RDS every time.