Sonarqube Enterprise upgrade postgres db from v12 to v13

Make sure to tell us:

  • What version are you upgrading from?
  • System information (Operating system, Java version, Database provider/version)
  • What’s the issue you’re facing?

We are using POstgres RDS instance for our sonarqube install and we upgraded from v12 to v13 without any issues during the upgrade process. We also upgraded the application layer from 9.9 to 9.9.6 LTA. I can login to the instance but during the scan analyses i see error messages from the pipelines like this:

e[91mERROR: Error during SonarScanner execution
[2024-09-18T08:37:01.853Z] java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.filesystem.ProjectFileIndexer
[2024-09-18T08:37:01.853Z] e[0me[91m	at org.sonar.core.platform.SpringComponentContainer.getComponentByType(SpringComponentContainer.java:139)
[2024-09-18T08:37:01.853Z] 	at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:363)
[2024-09-18T08:37:01.853Z] 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
[2024-09-18T08:37:01.853Z] 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
[2024-09-18T08:37:01.853Z] 	at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:137)
[2024-09-18T08:37:01.853Z] 	at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188)
[2024-09-18T08:37:01.853Z] 	at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167)
[2024-09-18T08:37:01.853Z] 	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
[2024-09-18T08:37:01.853Z] 	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
[2024-09-18T08:37:01.853Z] 	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
[2024-09-18T08:37:01.853Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2024-09-18T08:37:01.853Z] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[2024-09-18T08:37:01.853Z] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[2024-09-18T08:37:01.853Z] 	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
[2024-09-18T08:37:01.853Z] 	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
[2024-09-18T08:37:01.853Z] 	at com.sun.proxy.$Proxy0.execute(Unknown Source)
[2024-09-18T08:37:01.853Z] 	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
[2024-09-18T08:37:01.853Z] 	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
[2024-09-18T08:37:01.853Z] 	at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
[2024-09-18T08:37:01.853Z] 	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
[2024-09-18T08:37:01.853Z] 	at org.sonarsource.scanner.cli.Main.main(Main.java:61)
[2024-09-18T08:37:01.854Z] Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@20140db9-org.sonar.scanner.scan.filesystem.ProjectFileIndexer': Unsatisfied dependency expressed through constructor parameter 7; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@20140db9-org.sonar.scanner.scan.filesystem.FileIndexer': Unsatisfied dependency expressed through constructor parameter 6; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@20140db9-org.sonar.scanner.scan.filesystem.MetadataGenerator': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@20140db9-org.sonar.scanner.scan.filesystem.StatusDetection': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'projectRepositories' defined in org.sonar.scanner.repository.ProjectRepositoriesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.scanner.repository.ProjectRepositories]: Factory method 'projectRepositories' threw exception; nested exception is java.lang.IllegalStateException: Fail to request url: https://sonarqube.allocate-dev.co.uk/batch/project.protobuf?key=employeeaccess-healthroster-client&branch=main
[2024-09-18T08:37:01.854Z] 	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
[2024-09-18T08:37:01.854Z] 	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
[2024-09-18T08:37:01.854Z] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
[2024-09-18T08:37:01.854Z] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
[2024-09-18T08:37:01.854Z] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
[2024-09-18T08:37:01.854Z] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
[2024-09-18T08:37:01.854Z] 	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
[2024-09-18T08:37:01.854Z] e[0me[91m	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
[2024-09-18T08:37:01.854Z] 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
[2024-09-18T08:37:01.854Z] 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233)
[2024-09-18T08:37:01.854Z] 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1284)
[2024-09-18T08:37:01.854Z] 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1245)
[2024-09-18T08:37:01.854Z] e[0me[91m	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveBean(DefaultListableBeanFactory.java:494)
[2024-09-18T08:37:01.854Z] 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:349)
[2024-09-18T08:37:01.854Z] 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:342)
[2024-09-18T08:37:01.854Z] 	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1174)
[2024-09-18T08:37:01.854Z] 	at org.sonar.core.platform.SpringComponentContainer.getComponentByType(SpringComponentContainer.java:137)
[2024-09-18T08:37:01.854Z] 	... 20 more

On the other hand in the access logs on the server i can see 200 codes:

Line 2511: 172.24.0.140 - - [19/Sep/2024:07:55:30 +0000] "GET /favicon.ico HTTP/1.1" 200 5430 "https://sonarqube.allocate-dev.co.uk/batch/project.protobuf?key=employeeaccess-healthroster-client&branch=main" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36" "AZIE2GjdB3d07eEcAFNR"
	Line 2527: 172.24.1.17 - - [19/Sep/2024:07:56:33 +0000] "GET /favicon.ico HTTP/1.1" 200 5430 "https://sonarqube.allocate-dev.co.uk/batch/project.protobuf?key=employeeaccess-healthroster-client&branch=main" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "AZIE2GjdB3d07eEcAFNi"
	Line 2577: 172.24.1.17 - - [19/Sep/2024:07:58:07 +0000] "GET /favicon.ico HTTP/1.1" 200 5430 "https://sonarqube.allocate-dev.co.uk/batch/project.protobuf?key=employeeaccess-healthroster-client&branch=main" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "AZIE2GjdB3d07eEcAFOT"
	Line 2588: 172.24.1.17 - - [19/Sep/2024:07:59:31 +0000] "GET /favicon.ico HTTP/1.1" 200 5430 "https://sonarqube.allocate-dev.co.uk/batch/project.protobuf?key=employeeaccess-healthroster-client&branch=main" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0" "AZIE2GjdB3d07eEcAFOe"

Nothing has been changed in the networking part and i was wondering what might be the root cause of this issue? Many thanks

Hey there.

It’s a longshot, but can you check out this guide? I wonder if you’re facing some kind of timeout that is present on the scanner-side, but would still show 200s on the server side.

Hi Colin,

i did look at the guide and it actually resolved my issue. Thank you very much for your advice.

1 Like