Sonarqube 9.6 upgrade to Sonarqube 9.9 Fails

We are upgrading from Sonarqube version 9.6 to Sonarqube version 9.9.
We upgraded to the correct version of SQL Server jdbc driver 11.2.2.0
Java was upgraded to version 17.0.6
SQL Server Version: 13.0.6419.1
Server Operating System: Windows Server 2019 Standard

When running setup after upgrading the database, the server will not start. The portion of the web.log indicates the following error occurred:

2023.03.23 20:25:56 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile kubernetes/Sonar way
2023.03.23 20:25:56 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile css/Sonar way
2023.03.23 20:25:56 WARN  web[][o.s.c.a.AnnotationConfigApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@659e0bfd-org.sonar.server.qualityprofile.RegisterQualityProfiles': Initialization of bean failed; nested exception is org.apache.ibatis.exceptions.PersistenceException: \r\n### Error updating database.  Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'push_events'.\r\n### The error may exist in org.sonar.db.pushevent.PushEventMapper\r\n### The error may involve org.sonar.db.pushevent.PushEventMapper.insert-Inline\r\n### The error occurred while setting parameters\r\n### SQL: INSERT INTO push_events (     uuid,     name,     project_uuid,     language,     payload,     created_at     )     VALUES (     ?,     ?,     ?,     ?,     ?,     ?     )\r\n### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'push_events'.
2023.03.23 20:25:56 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@659e0bfd-org.sonar.server.qualityprofile.RegisterQualityProfiles': Initialization of bean failed; nested exception is org.apache.ibatis.exceptions.PersistenceException: 
### Error updating database.  Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'push_events'.
### The error may exist in org.sonar.db.pushevent.PushEventMapper
### The error may involve org.sonar.db.pushevent.PushEventMapper.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO push_events (     uuid,     name,     project_uuid,     language,     payload,     created_at     )     VALUES (     ?,     ?,     ?,     ?,     ?,     ?     )
### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'push_events'.
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:628)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:187)
	at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:80)
	at org.sonar.server.platform.platformlevel.PlatformLevelStartup.access$001(PlatformLevelStartup.java:55)
	at org.sonar.server.platform.platformlevel.PlatformLevelStartup$1.doPrivileged(PlatformLevelStartup.java:127)
	at org.sonar.server.user.DoPrivileged.execute(DoPrivileged.java:45)
	at org.sonar.server.platform.platformlevel.PlatformLevelStartup.start(PlatformLevelStartup.java:124)
	at org.sonar.server.platform.PlatformImpl.executeStartupTasks(PlatformImpl.java:183)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:344)
	at org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:107)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:328)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.apache.ibatis.exceptions.PersistenceException: 
### Error updating database.  Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'push_events'.
### The error may exist in org.sonar.db.pushevent.PushEventMapper
### The error may involve org.sonar.db.pushevent.PushEventMapper.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO push_events (     uuid,     name,     project_uuid,     language,     payload,     created_at     )     VALUES (     ?,     ?,     ?,     ?,     ?,     ?     )
### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'push_events'.
	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:196)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:181)
	at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:62)
	at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145)
	at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86)
	at jdk.proxy2/jdk.proxy2.$Proxy83.insert(Unknown Source)
	at org.sonar.db.pushevent.PushEventDao.insert(PushEventDao.java:50)
	at org.sonar.server.pushapi.qualityprofile.QualityProfileChangeEventServiceImpl.persistPushEvent(QualityProfileChangeEventServiceImpl.java:223)
	at org.sonar.server.pushapi.qualityprofile.QualityProfileChangeEventServiceImpl.distributeRuleChangeEvent(QualityProfileChangeEventServiceImpl.java:210)
	at org.sonar.server.qualityprofile.builtin.BuiltInQProfileUpdateImpl.update(BuiltInQProfileUpdateImpl.java:85)
	at org.sonar.server.qualityprofile.RegisterQualityProfiles.update(RegisterQualityProfiles.java:147)
	at org.sonar.server.qualityprofile.RegisterQualityProfiles.lambda$start$1(RegisterQualityProfiles.java:105)
	at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:422)
	at org.sonar.server.qualityprofile.RegisterQualityProfiles.start(RegisterQualityProfiles.java:100)
	at org.sonar.core.platform.StartableBeanPostProcessor.postProcessBeforeInitialization(StartableBeanPostProcessor.java:33)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620)
	... 19 common frames omitted
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'push_events'.
	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:265)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1676)
	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:620)
	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:540)
	at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7627)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:3916)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:268)
	at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:242)
	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.execute(SQLServerPreparedStatement.java:518)
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
	at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47)
	at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)
	at org.apache.ibatis.executor.ReuseExecutor.doUpdate(ReuseExecutor.java:52)
	at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
	at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:194)
	... 36 common frames omitted
2023.03.23 20:25:56 INFO  web[][o.s.p.ProcessEntryPoint] Hard stopping process
2023.03.23 20:25:56 INFO  web[][o.s.s.n.NotificationDaemon] Notification service stopped
2023.03.23 20:25:56 INFO  web[][c.z.h.HikariDataSource] HikariPool-1 - Shutdown initiated...
2023.03.23 20:25:56 INFO  web[][c.z.h.HikariDataSource] HikariPool-1 - Shutdown completed.

Hi @antony.taylor,

  • Is your table push_events present in your database in your 9.6 schema before the upgrade?
  • Did you get any warning/errors in the logs when upgrading from 9.6 to 9.9? If so, could you share them with us?
  • Could you also run select * from schema_migrations and share the result with us, please.

Cheers,

  1. Yes, the table “push_events” was present in the 9.6 database.
  2. See the enclosed log snippet:
2023.03.23 20:20:44 INFO  web[][o.s.p.ProcessEntryPoint] Starting Web Server
2023.03.23 20:20:47 INFO  web[][o.s.s.p.LogServerVersion] SonarQube Server / 9.9.0.65466 / ce743843018827cb30c05735e7971523de34bb48
2023.03.23 20:20:47 INFO  web[][o.sonar.db.Database] Create JDBC data source for jdbc:sqlserver://SQL16P;databaseName=Sonar;integratedSecurity=true;encrypt=false;
2023.03.23 20:20:47 INFO  web[][c.z.h.HikariDataSource] HikariPool-1 - Starting...
2023.03.23 20:20:47 INFO  web[][c.z.h.p.HikariPool] HikariPool-1 - Added connection ConnectionID:1 ClientConnectionId: 6c6ca1a1-98a7-43b6-9950-846eca4656d1
2023.03.23 20:20:47 INFO  web[][c.z.h.HikariDataSource] HikariPool-1 - Start completed.
2023.03.23 20:20:49 INFO  web[][o.s.s.p.ServerFileSystemImpl] SonarQube home: C:\SonarQube
2023.03.23 20:20:49 INFO  web[][o.s.s.u.SystemPasscodeImpl] System authentication by passcode is disabled
2023.03.23 20:20:49 INFO  web[][o.s.c.e.CoreExtensionsLoader] Loaded core extensions: developer-edition, developer-scanner, developer-server, license, monitoring
2023.03.23 20:20:49 WARN  web[][o.s.s.p.DatabaseServerCompatibility] The database must be manually upgraded. Please backup the database and browse /setup. For more information: https://docs.sonarqube.org/latest/setup/upgrading
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy ABAP Code Quality and Security / 3.11.0.4030 / efe73c1da897a69d2545e79710bec0909326dcdb
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy C# Code Quality and Security / 8.51.0.59060 / e14c642f118958f22fd08841dc42f9aae480366a
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy CFamily Code Quality and Security / 6.41.0.60884 / 6efcc8197e558ca2a78cada46494e8afe8c821ff
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Configuration detection fot Code Quality and Security / 1.2.0.267 / 4f37ba9ffb37a96d5883e52ad392ed32c5c6eaab
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Dataflow Bug Detection / 1.10.0.3046 / 0
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Dataflow Bug Detection Rules for Java / 1.10.0.3046 / 0
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Dataflow Bug Detection Rules for Python / 1.10.0.3046 / 0
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Flex Code Quality and Security / 2.8.0.3166 / 01f66bdddc678966c81a9064ed139156a6a89c97
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Go Code Quality and Security / 1.11.0.3905 / e1f28bc000e04ca01881e84218d01d464a17a36f
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy HTML Code Quality and Security / 3.7.1.3306 / d720acc6860c6d8b69ec4d17570a398a1e216da1
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy IaC Code Quality and Security / 1.11.0.2847 / 6892bd3a7320b3c110717acfdb18c4c7451069fd
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy JaCoCo / 1.3.0.1538 / 74a7798c7cea687c72ed9df40c93eb7ea2a58c49
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Java Code Quality and Security / 7.16.0.30901 / 4b1436558dfd5fc00c8d9aae8bb0364ba122c73e
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy JavaScript/TypeScript/CSS Code Quality and Security / 9.13.0.20537 / 68ff7657415044b86033814795ed95fc1f1558f1
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Kotlin Code Quality and Security / 2.12.0.1956 / a6df1ae252bd62d63f8673c28f87ad14258a7904
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy PHP Code Quality and Security / 3.27.1.9352 / 3ddc5a03e1a7e3729d41e7c1a30a37d5715958c7
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy PL/SQL Code Quality and Security / 3.8.0.4948 / ab46f4c11644e5c9b17f0a5a1612d4b7362e04f3
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Python Code Quality and Security / 3.24.0.10784 / 30aa413d983f6c37b4298eba00555c3050009b52
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Ruby Code Quality and Security / 1.11.0.3905 / e1f28bc000e04ca01881e84218d01d464a17a36f
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Scala Code Quality and Security / 1.11.0.3905 / e1f28bc000e04ca01881e84218d01d464a17a36f
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Swift Code Quality and Security / 4.8.0.5759 / 3d5b95aaf19a398736a7f5eec314c3c05f7193d2
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy T-SQL Code Quality and Security / 1.7.0.5449 / 110c82f888b1f40e1c2a0d3165fcffd413af36a5
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Text Code Quality and Security / 2.0.1.611 / 53bfe3a68ae3886520d6a5c1c21dfdb564821ea1
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy VB.NET Code Quality and Security / 8.51.0.59060 / e14c642f118958f22fd08841dc42f9aae480366a
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Vulnerability Analysis / 9.9.0.19083 / 6139a53ee01a475a60f6e2944fff40f3fc00dbe1
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Vulnerability Rules for C# / 9.9.0.19083 / 6139a53ee01a475a60f6e2944fff40f3fc00dbe1
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Vulnerability Rules for JS / 9.9.0.19083 / 6139a53ee01a475a60f6e2944fff40f3fc00dbe1
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Vulnerability Rules for Java / 9.9.0.19083 / 6139a53ee01a475a60f6e2944fff40f3fc00dbe1
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Vulnerability Rules for PHP / 9.9.0.19083 / 6139a53ee01a475a60f6e2944fff40f3fc00dbe1
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy Vulnerability Rules for Python / 9.9.0.19083 / 6139a53ee01a475a60f6e2944fff40f3fc00dbe1
2023.03.23 20:20:50 INFO  web[][o.s.s.p.ServerPluginManager] Deploy XML Code Quality and Security / 2.7.0.3820 / 656bccc1910d50c8984536bd2dfd917066b858e6
2023.03.23 20:20:55 INFO  web[][o.s.s.p.d.m.c.MssqlCharsetHandler] Verify that database collation is case-sensitive and accent-sensitive
2023.03.23 20:20:56 INFO  web[][o.s.s.e.EsClientProvider] Connected to local Elasticsearch: [http://127.0.0.1:9001]
2023.03.23 20:20:57 WARN  web[][o.s.a.s.w.WebService$Action] Description is not set on action api/monitoring/metrics
2023.03.23 20:20:57 WARN  web[][o.s.a.s.w.WebService$Action] Since is not set on action api/monitoring/metrics
2023.03.23 20:20:57 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/monitoring/metrics
2023.03.23 20:20:57 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/system/liveness
2023.03.23 20:20:57 INFO  web[][o.s.s.p.Platform] Database needs to be migrated. Please refer to https://docs.sonarqube.org/latest/setup/upgrading
2023.03.23 20:20:57 INFO  web[][o.s.s.p.w.MasterServletFilter] Initializing servlet filter org.sonar.server.platform.web.WebServiceFilter@62735b13 [pattern=UrlPattern{inclusions=[/api/system/migrate_db.*, ...], exclusions=[/api/components/update_key, ...]}]
2023.03.23 20:20:57 INFO  web[][o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
2023.03.23 20:21:05 INFO  web[][o.s.s.p.d.m.DatabaseMigrationImpl] Starting DB Migration and container restart
2023.03.23 20:21:05 INFO  web[][DbMigrations] Executing DB migrations...
2023.03.23 20:21:05 INFO  web[][DbMigrations] #6600 'Add column 'webhook_secret' to 'alm_settings''...
2023.03.23 20:21:06 INFO  web[][DbMigrations] #6600 'Add column 'webhook_secret' to 'alm_settings'': success | time=282ms
2023.03.23 20:21:06 INFO  web[][DbMigrations] #6601 'Drop non unique index on 'uuid' in 'components''...
2023.03.23 20:21:06 INFO  web[][DbMigrations] #6601 'Drop non unique index on 'uuid' in 'components'': success | time=110ms
2023.03.23 20:21:06 INFO  web[][DbMigrations] #6602 'Add unique index on 'uuid' in 'components''...
2023.03.23 20:21:06 INFO  web[][DbMigrations] #6602 'Add unique index on 'uuid' in 'components'': success | time=62ms
2023.03.23 20:21:06 INFO  web[][DbMigrations] #6603 'Drop index for 'project_uuid' in 'components''...
2023.03.23 20:21:06 INFO  web[][DbMigrations] #6603 'Drop index for 'project_uuid' in 'components'': success | time=16ms
2023.03.23 20:21:06 INFO  web[][DbMigrations] #6604 'Rename column 'project_uuid' to 'branch_uuid' in 'components''...
2023.03.23 20:21:06 INFO  web[][DbMigrations] #6604 'Rename column 'project_uuid' to 'branch_uuid' in 'components'': success | time=172ms
2023.03.23 20:21:06 INFO  web[][DbMigrations] #6605 'Create index for 'branch_uuid' in 'components''...
2023.03.23 20:21:06 INFO  web[][DbMigrations] #6605 'Create index for 'branch_uuid' in 'components'': success | time=31ms
2023.03.23 20:21:06 INFO  web[][DbMigrations] #6606 'Drop index for 'kee' in 'components''...
2023.03.23 20:21:06 INFO  web[][DbMigrations] #6606 'Drop index for 'kee' in 'components'': success | time=31ms
2023.03.23 20:21:06 INFO  web[][DbMigrations] #6607 'Fix copy component UUID'...
2023.03.23 20:21:06 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 0 rows processed (0 items/sec)
2023.03.23 20:21:06 INFO  web[][DbMigrations] #6607 'Fix copy component UUID': success | time=16ms
2023.03.23 20:21:06 INFO  web[][DbMigrations] #6608 'Remove branch information from 'kee' in 'components''...
2023.03.23 20:21:06 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 554 rows processed (9 items/sec)
2023.03.23 20:21:06 INFO  web[][DbMigrations] #6608 'Remove branch information from 'kee' in 'components'': success | time=252ms
2023.03.23 20:21:06 INFO  web[][DbMigrations] #6609 'Add unique index on 'kee','branch_uuid' in 'components''...
2023.03.23 20:21:06 INFO  web[][DbMigrations] #6609 'Add unique index on 'kee','branch_uuid' in 'components'': success | time=46ms
2023.03.23 20:21:06 INFO  web[][DbMigrations] #6700 'Move live measure variations to values'...
2023.03.23 20:21:07 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 12853 rows processed (214 items/sec)
2023.03.23 20:21:07 INFO  web[][DbMigrations] #6700 'Move live measure variations to values': success | time=613ms
2023.03.23 20:21:07 INFO  web[][DbMigrations] #6701 'Drop live measure variation column'...
2023.03.23 20:21:07 INFO  web[][DbMigrations] #6701 'Drop live measure variation column': success | time=78ms
2023.03.23 20:21:07 INFO  web[][DbMigrations] #6702 'Move project measure variations to values'...
2023.03.23 20:21:07 INFO  web[][o.s.s.p.d.m.s.MassUpdate] 346 rows processed (5 items/sec)
2023.03.23 20:21:07 INFO  web[][DbMigrations] #6702 'Move project measure variations to values': success | time=94ms
2023.03.23 20:21:07 INFO  web[][DbMigrations] #6703 'Drop project measure variation column'...
2023.03.23 20:21:07 INFO  web[][DbMigrations] #6703 'Drop project measure variation column': success | time=79ms
2023.03.23 20:21:07 INFO  web[][DbMigrations] #6704 'Update sonar-users group description'...
2023.03.23 20:21:07 INFO  web[][DbMigrations] #6704 'Update sonar-users group description': success | time=0ms
2023.03.23 20:21:07 INFO  web[][DbMigrations] #6705 'Add message_formattings column to issue table'...
2023.03.23 20:21:07 INFO  web[][DbMigrations] #6705 'Add message_formattings column to issue table': success | time=32ms
2023.03.23 20:21:07 INFO  web[][DbMigrations] #6706 'Create scim_users table'...
2023.03.23 20:21:07 INFO  web[][DbMigrations] #6706 'Create scim_users table': success | time=47ms
2023.03.23 20:21:07 INFO  web[][DbMigrations] #6707 'Create unique index on scim_users.user_uuid'...
2023.03.23 20:21:07 INFO  web[][DbMigrations] #6707 'Create unique index on scim_users.user_uuid': success | time=15ms
2023.03.23 20:21:07 INFO  web[][DbMigrations] #6800 'Add node_name column to ce_activity table'...
2023.03.23 20:21:07 INFO  web[][DbMigrations] #6800 'Add node_name column to ce_activity table': success | time=32ms
2023.03.23 20:21:07 INFO  web[][DbMigrations] #6801 'Delete all analysis cache'...
2023.03.23 20:21:07 INFO  web[][DbMigrations] #6801 'Delete all analysis cache': success | time=0ms
2023.03.23 20:21:07 INFO  web[][DbMigrations] #6802 'Change user_uuid field size to 255 for audit table'...
2023.03.23 20:21:07 INFO  web[][DbMigrations] #6802 'Change user_uuid field size to 255 for audit table': success | time=141ms
2023.03.23 20:21:07 INFO  web[][DbMigrations] Executed DB migrations: success | time=2149ms
2023.03.23 20:21:07 WARN  web[][o.s.a.s.w.WebService$Action] Description is not set on action api/monitoring/metrics
2023.03.23 20:21:07 WARN  web[][o.s.a.s.w.WebService$Action] Since is not set on action api/monitoring/metrics
2023.03.23 20:21:07 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/monitoring/metrics
2023.03.23 20:21:07 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/system/liveness
2023.03.23 20:21:07 INFO  web[][o.s.s.p.d.m.DatabaseMigrationImpl] DB Migration and container restart: success | time=2195ms
2023.03.23 20:21:08 INFO  web[][o.s.s.p.DetectPluginChange] Detect plugin changes
2023.03.23 20:21:13 INFO  web[][o.s.s.e.IndexCreator] Create index [metadatas]
2023.03.23 20:21:15 INFO  web[][o.s.s.e.IndexCreator] Create type metadatas/metadata
2023.03.23 20:21:15 INFO  web[][o.s.s.e.IndexCreator] Create index [components]
2023.03.23 20:21:17 INFO  web[][o.s.s.e.IndexCreator] Create type components/auth
2023.03.23 20:21:17 INFO  web[][o.s.s.e.IndexCreator] Create index [projectmeasures]
2023.03.23 20:21:19 INFO  web[][o.s.s.e.IndexCreator] Create type projectmeasures/auth
2023.03.23 20:21:19 INFO  web[][o.s.s.e.IndexCreator] Create index [rules]
2023.03.23 20:21:21 INFO  web[][o.s.s.e.IndexCreator] Create type rules/rule
2023.03.23 20:21:21 INFO  web[][o.s.s.e.IndexCreator] Create index [issues]
2023.03.23 20:21:25 INFO  web[][o.s.s.e.IndexCreator] Create type issues/auth
2023.03.23 20:21:25 INFO  web[][o.s.s.e.IndexCreator] Create index [users]
2023.03.23 20:21:26 INFO  web[][o.s.s.e.IndexCreator] Create type users/user
2023.03.23 20:21:26 INFO  web[][o.s.s.e.IndexCreator] Create index [views]
2023.03.23 20:21:27 INFO  web[][o.s.s.e.IndexCreator] Create type views/view
2023.03.23 20:21:27 INFO  web[][o.s.s.s.LogServerId] Server ID: 085FF426-AX2CFJOClwPNYZveakZN
2023.03.23 20:21:27 WARN  web[][o.s.s.a.LogOAuthWarning] For security reasons, OAuth authentication should use HTTPS. You should set the property 'Administration > Configuration > Server base URL' to a HTTPS URL.
2023.03.23 20:21:27 INFO  web[][o.s.s.p.UpdateCenterClient] Update center: https://update.sonarsource.org/update-center.properties (no proxy)
2023.03.23 20:21:30 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action saml/validation_init
2023.03.23 20:21:30 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/system/liveness
2023.03.23 20:21:30 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/plugins/download
2023.03.23 20:21:30 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/analysis_cache/get
2023.03.23 20:21:30 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/alm_integrations/check_pat
2023.03.23 20:21:30 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/push/sonarlint_events
2023.03.23 20:21:30 WARN  web[][o.s.a.s.w.WebService$Action] The response example is not set on action api/support/info
2023.03.23 20:21:30 INFO  web[][o.s.s.a.p.ExpiredSessionsCleaner] Purge of expired session tokens has removed 0 elements
2023.03.23 20:21:30 INFO  web[][o.s.s.a.p.ExpiredSessionsCleaner] Purge of expired SAML message ids has removed 0 elements
2023.03.23 20:21:30 INFO  web[][o.s.s.n.NotificationDaemon] Notification service started (delay 60 sec.)
2023.03.23 20:21:30 INFO  web[][o.s.s.t.TelemetryDaemon] Sharing of SonarQube statistics is enabled.
2023.03.23 20:21:30 INFO  web[][o.s.s.s.GeneratePluginIndex] Generate scanner plugin index
2023.03.23 20:21:30 INFO  web[][o.s.s.s.RegisterMetrics] Register metrics
2023.03.23 20:21:30 INFO  web[][o.s.s.r.RegisterRules] Register rules
2023.03.23 20:21:41 INFO  web[][o.s.s.r.RegisterRules] Disable rule common-kubernetes:InsufficientLineCoverage
2023.03.23 20:21:41 INFO  web[][o.s.s.r.RegisterRules] Disable rule common-kubernetes:SkippedUnitTests
2023.03.23 20:21:41 INFO  web[][o.s.s.r.RegisterRules] Disable rule common-kubernetes:InsufficientBranchCoverage
2023.03.23 20:21:41 INFO  web[][o.s.s.r.RegisterRules] Disable rule external_detekt:LibraryEntitiesShouldNotBePublic
2023.03.23 20:21:41 INFO  web[][o.s.s.r.RegisterRules] Disable rule external_detekt:ForbiddenPublicDataClass
2023.03.23 20:21:41 INFO  web[][o.s.s.r.RegisterRules] Disable rule external_detekt:LibraryCodeMustSpecifyReturnType
2023.03.23 20:21:41 INFO  web[][o.s.s.r.RegisterRules] Disable rule external_detekt:ComplexMethod
2023.03.23 20:21:41 INFO  web[][o.s.s.r.RegisterRules] Disable rule external_android-lint:UnpackedNativeCode
2023.03.23 20:21:41 INFO  web[][o.s.s.r.RegisterRules] Disable rule common-kubernetes:InsufficientCommentDensity
2023.03.23 20:21:41 INFO  web[][o.s.s.r.RegisterRules] Disable rule common-kubernetes:FailedUnitTests
2023.03.23 20:21:41 INFO  web[][o.s.s.r.RegisterRules] Disable rule common-kubernetes:DuplicatedBlocks
2023.03.23 20:21:41 INFO  web[][o.s.s.r.RegisterRules] Disable rule external_ktlint:trailing-comma
2023.03.23 20:21:46 INFO  web[][o.s.s.q.b.BuiltInQProfileRepositoryImpl] Load quality profiles
2023.03.23 20:21:46 INFO  web[][o.s.s.q.RegisterQualityProfiles] Register quality profiles
2023.03.23 20:21:46 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile kubernetes/Sonar way
2023.03.23 20:21:46 INFO  web[][o.s.s.q.RegisterQualityProfiles] Update profile css/Sonar way
2023.03.23 20:21:46 WARN  web[][o.s.c.a.AnnotationConfigApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@659e0bfd-org.sonar.server.qualityprofile.RegisterQualityProfiles': Initialization of bean failed; nested exception is org.apache.ibatis.exceptions.PersistenceException: \r\n### Error updating database.  Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'push_events'.\r\n### The error may exist in org.sonar.db.pushevent.PushEventMapper\r\n### The error may involve org.sonar.db.pushevent.PushEventMapper.insert-Inline\r\n### The error occurred while setting parameters\r\n### SQL: INSERT INTO push_events (     uuid,     name,     project_uuid,     language,     payload,     created_at     )     VALUES (     ?,     ?,     ?,     ?,     ?,     ?     )\r\n### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'push_events'.
2023.03.23 20:21:46 ERROR web[][o.s.s.p.Platform] Background initialization failed. Stopping SonarQube
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@659e0bfd-org.sonar.server.qualityprofile.RegisterQualityProfiles': Initialization of bean failed; nested exception is org.apache.ibatis.exceptions.PersistenceException: 
### Error updating database.  Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'push_events'.
### The error may exist in org.sonar.db.pushevent.PushEventMapper
### The error may involve org.sonar.db.pushevent.PushEventMapper.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO push_events (     uuid,     name,     project_uuid,     language,     payload,     created_at     )     VALUES (     ?,     ?,     ?,     ?,     ?,     ?     )
### Cause: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'push_events'.
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:628)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:187)
	at org.sonar.server.platform.platformlevel.PlatformLevel.start(PlatformLevel.java:80)
	at org.sonar.server.platform.platformlevel.PlatformLevelStartup.access$001(PlatformLevelStartup.java:55)
	at org.sonar.server.platform.platformlevel.PlatformLevelStartup$1.doPrivileged(PlatformLevelStartup.java:127)
	at org.sonar.server.user.DoPrivileged.execute(DoPrivileged.java:45)
	at org.sonar.server.platform.platformlevel.PlatformLevelStartup.start(PlatformLevelStartup.java:124)
	at org.sonar.server.platform.PlatformImpl.executeStartupTasks(PlatformImpl.java:183)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:344)
	at org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:107)
	at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:328)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.apache.ibatis.exceptions.PersistenceException:
  1. schema_migrations result:
> version
> 1
> 2
> 5001
> 5002
> 5003
> 5004
> 5005
> 5006
> 5007
> 5008
> 5009
> 5010
> 5011
> 5012
> 6001
> 6002
> 6003
> 6004
> 6005
> 6006
> 6007
> 6008
> 6009
> 6010
> 6011
> 6012
> 6013
> 6014
> 6015
> 6016
> 6017
> 6018
> 6019
> 6101
> 6102
> 6103
> 6104
> 6105
> 6106
> 6107
> 6108
> 6109
> 6110
> 6111
> 6112
> 6113
> 6114
> 6201
> 6202
> 6203
> 6204
> 6205
> 6206
> 6301
> 6302
> 6303
> 6304
> 6305
> 6306
> 6401
> 6402
> 6403
> 6404
> 6405
> 6406
> 6407
> 6408
> 6409
> 6410
> 6411
> 6412
> 6413
> 6414
> 6415
> 6416
> 6417
> 6418
> 6500
> 6501
> 6502
> 6503
> 6504
> 6505
> 6506
> 6507
> 6508
> 6509
> 6510
> 6511
> 6512
> 6513
> 6514

May I ask you to:

  • Check that SonarQube connects to the right database.
  • Check tat you are using the right user in the database.
  • Check that that user has the right privileges on the push_events table.
  • Check that SonarQube connects to the right database.
  • Yes, SonarQube is connecting to the correct database.
  • Check tat you are using the right user in the database.
  • Yes, We are using the correct user in the database.
  • Check that that user has the right privileges on the push_events table.
  • There was no push_events table after we upgraded from 9.4 to 9.6.

There was no push_events table after we upgraded from 9.4 to 9.6.

But, you mentioned that the table push_events was present in the 9.6 database here.

May I ask you to clarify?

I’m not sure what the database schema should be for the * Developer Edition

  • Version 9.6.1 (build 59531). Can you tell me if there should be a push_events table in the database? Or, if it was deprecated, what version was it removed? I’m trying to determine if there was an issue with the previous upgrade we performed, and it was masked for some reason. There is currently no push_events table in the database.

So, I install 9.6 to a different server, and upgraded to version 9.9. I found the following true of the update:

  1. During the upgrade, the following table was removed;
    * rules_metadata
  2. During the upgrade, the following tables were added:
    * push_events
    * rule_desc_sections
    * scim_users

Next step: Troubleshoot the upgrade to see if there is a data issue.

For the version 9.6.1, The push_events table should be there and it hasn’t been deprecated.

The problem seems to have come when you upgraded to the version 9.6 as it is in this upgrade that the push_events table was created here.

Do you still have a backup from a version before 9.6?
(To perform the upgrade and check why the table hasn’t been created)