Sonar execution fail after postgre SQL DB update

Hi Community,

We upgraded postgre SQL DB on Azure from 12 to 15 and it got failed in execution. Details below -
SonarScanner 4.3.0.2102
Java 11.0.6 AdoptOpenJDK (64-bit)
Linux 5.15.0-1060-azure amd64
SonarQube server 9.9.2.77730
Azure Postgre SQL DB version 12.17

NOTE : SonarQube is deployed via helm/Kubernetes in Azure Kubernetes cluster.

Any suggestion please what could be the reason .Working after rollback to version 12


**11:53:33** INFO: ------------------------------------------------------------------------ 
**11:53:33** INFO: EXECUTION FAILURE 
**11:53:33** INFO: ------------------------------------------------------------------------ 
**11:53:33** INFO: Total time: 58.138s 
**11:53:33** INFO: Final Memory: 22M/100M 
**11:53:33** INFO: ------------------------------------------------------------------------ 
**11:53:33** ERROR: Error during SonarScanner execution 
**11:53:33** java.lang.IllegalStateException: Unable to load component class org.sonar.scanner.scan.filesystem.ProjectFileIndexer 
**11:53:33**    at org.sonar.core.platform.SpringComponentContainer.getComponentByType(SpringComponentContainer.java:139) 
**11:53:33**    at org.sonar.scanner.scan.SpringProjectScanContainer.doAfterStart(SpringProjectScanContainer.java:363) 
**11:53:33**    at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188) 
**11:53:33**    at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167) 
**11:53:33**    at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:137) 
**11:53:33**    at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:188) 
**11:53:33**    at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:167) 
**11:53:33**    at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72) 
**11:53:33**    at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66) 
**11:53:33**    at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46) 
**11:53:33**    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
**11:53:33**    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
**11:53:33**    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
**11:53:33**    at java.base/java.lang.reflect.Method.invoke(Unknown Source) 
**11:53:33**    at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60) 
**11:53:33**    at com.sun.proxy.$Proxy0.execute(Unknown Source) 
**11:53:33**    at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189) 
**11:53:33**    at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138) 
**11:53:33**    at org.sonarsource.scanner.cli.Main.execute(Main.java:112) 
**11:53:33**    at org.sonarsource.scanner.cli.Main.execute(Main.java:75) 
**11:53:33**    at org.sonarsource.scanner.cli.Main.main(Main.java:61) 
**11:53:33** Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@69997e9d-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@69997e9d-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@69997e9d-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@69997e9d-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 org.sonarqube.ws.client.HttpException: Error 504 on ****/batch/project.protobuf?key=SFDX-MOCK-AMS&branch=env/Prod : <html> 
**11:53:33** <head><title>504 Gateway Time-out</title></head> 
**11:53:33** <body> 
**11:53:33** <center><h1>504 Gateway Time-out</h1></center> 
**11:53:33** <hr><center>Microsoft-Azure-Application-Gateway/v2</center> 
**11:53:33** </body> 
**11:53:33** </html>

**11:53:33**    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) 
**11:53:33**    at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229) 
**11:53:33**    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372) 
**11:53:33**    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222) 
**11:53:33**    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) 
**11:53:33**    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) 
**11:53:33**    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) 
**11:53:33**    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) 
**11:53:33**    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) 
**11:53:33**    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:233) 
**11:53:33**    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1284) 
**11:53:33**    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveNamedBean(DefaultListableBeanFactory.java:1245) 
**11:53:33**    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveBean(DefaultListableBeanFactory.java:494) 
**11:53:33**    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:349) 
**11:53:33**    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:342) 
**11:53:33**    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1174) 
**11:53:33**    at org.sonar.core.platform.SpringComponentContainer.getComponentByType(SpringComponentContainer.java:137) 
**11:53:33** ... 20 more 
**11:53:33** Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@69997e9d-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@69997e9d-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@69997e9d-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 org.sonarqube.ws.client.HttpException: Error 504 on ****/batch/project.protobuf?key=SFDX-MOCK-AMS&branch=env/Prod 

Can anyone suggest here please

Hi,

What do your server logs say?

 
Ann

Didn’t captured any server logs. Immediately rolled back as environment was down. Any suggestions

Hi,

Without any indication - from your logs - of what the underlying problem was, it’s difficult to make recommendations.

Maybe you could share the full analysis log?

 
Ann