I am trying to run two sonarqube(mysql & postgrsql) instance on same machine. Mysql instance is running fine on port 9500 but postgrsql is getting failed on port 9000. web.log is given below. Please help

2020.07.04 16:05:49 INFO  web[][o.s.p.ProcessEntryPoint] Starting web
2020.07.04 16:05:51 INFO  web[][o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
2020.07.04 16:05:53 INFO  web[][o.e.p.PluginsService] no modules loaded
2020.07.04 16:05:53 INFO  web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.join.ParentJoinPlugin]
2020.07.04 16:05:53 INFO  web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.percolator.PercolatorPlugin]
2020.07.04 16:05:53 INFO  web[][o.e.p.PluginsService] loaded plugin [org.elasticsearch.transport.Netty4Plugin]
2020.07.04 16:05:57 INFO  web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [127.0.0.1:9001]
2020.07.04 16:05:57 INFO  web[][o.s.s.p.LogServerVersion] SonarQube Server / 7.7.0.23042 / 1dcac8b8de36b377a1810cc8f1c4c31744e12729
2020.07.04 16:05:57 INFO  web[][o.sonar.db.Database] Create JDBC data source for jdbc:postgresql://localhost/sonar?currentSchema=my_schema
2020.07.04 16:06:01 INFO  web[][o.s.s.p.ServerFileSystemImpl] SonarQube home: /home/test/sonarqube-7.7
2020.07.04 16:06:01 INFO  web[][o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled
2020.07.04 16:06:02 ERROR web[][o.s.s.p.Platform] Web server startup failed
java.lang.IllegalStateException: Failed to read content of table schema_migrations
        at org.sonar.server.platform.db.migration.history.MigrationHistoryImpl.getLastMigrationNumber(MigrationHistoryImpl.java:72)
        at org.sonar.server.platform.db.migration.version.DatabaseVersion.getStatus(DatabaseVersion.java:44)
        at org.sonar.server.platform.DatabaseServerCompatibility.start(DatabaseServerCompatibility.java:46)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
        at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
        at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
        at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
        at org.picocontainer.behaviors.Stored.start(Stored.java:110)
        at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
        at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
        at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
        at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:90)
        at org.sonar.server.platform.platformlevel.PlatformLevel2.start(PlatformLevel2.java:113)
        at org.sonar.server.platform.Platform.start(Platform.java:211)
        at org.sonar.server.platform.Platform.startLevel2Container(Platform.java:177)
        at org.sonar.server.platform.Platform.init(Platform.java:87)
        at org.sonar.server.platform.web.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:45)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4817)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5283)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1423)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1413)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.postgresql.util.PSQLException: ERROR: relation "schema_migrations" does not exist
  Position: 21
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
        at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
        at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
        at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:307)
        at org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:293)
        at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:270)
        at org.postgresql.jdbc.PgStatement.executeQuery(PgStatement.java:224)
        at org.apache.commons.dbcp2.DelegatingStatement.executeQuery(DelegatingStatement.java:310)
        at org.apache.commons.dbcp2.DelegatingStatement.executeQuery(DelegatingStatement.java:310)
        at org.sonar.server.platform.db.migration.history.MigrationHistoryImpl.selectVersions(MigrationHistoryImpl.java:94)
        at org.sonar.server.platform.db.migration.history.MigrationHistoryImpl.getLastMigrationNumber(MigrationHistoryImpl.java:65)

Hi,

Errors about reading the contents of the schema_migrations table are pretty much always about whether or not you’ve connected to the right schema in your database.

 
HTH,
Ann