Sonarqube-10.4.1.88267 | Analysis failed and give some java exception

I’m using sonarqube version sonarqube-10.4.1.88267 .
It is depoyed as zip, as a window service on the server.
I’m using sonar scanner sonar-scanner-5.0.1.3006-windows .

Hi, I’m getting error while performing analysis. In order make it work I have to delete ~/data/es8 file and after that works for while but then again it gives mein same error. Please advice some permanant resolution of this issue.

ERROR: Error during SonarScanner execution
02:45:20   org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@2fd66ad3-org.sonar.scanner.report.ReportPublisher': 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@2fd66ad3-org.sonar.scanner.report.ActiveRulesPublisher': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActiveRules' defined in org.sonar.scanner.rule.ActiveRulesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.IllegalStateException: Fail to request url: RemoteURL/api/rules/list.protobuf?qprofile=314e3ad8-7bc5-4b5e-8409-4b79bd5778d0&ps=500&p=1
02:45:20     at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
02:45:20     at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
02:45:20     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
02:45:20     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
02:45:20     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
02:45:20     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
02:45:20     at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
02:45:20     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
02:45:20     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
02:45:20     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
02:45:20     at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955)
02:45:20     at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:920)
02:45:20     at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)
02:45:20     at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:222)
02:45:20     at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:202)
02:45:20     at org.sonar.scanner.bootstrap.SpringGlobalContainer.doAfterStart(SpringGlobalContainer.java:138)
02:45:20     at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:223)
02:45:20     at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:202)
02:45:20     at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:71)
02:45:20     at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:65)
02:45:20     at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
02:45:20     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
02:45:20     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
02:45:20     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
02:45:20     at java.base/java.lang.reflect.Method.invoke(Method.java:568)
02:45:20     at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
02:45:20     at jdk.proxy1/jdk.proxy1.$Proxy0.execute(Unknown Source)
02:45:20     at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
02:45:20     at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
02:45:20     at org.sonarsource.scanner.cli.Main.execute(Main.java:126)
02:45:20     at org.sonarsource.scanner.cli.Main.execute(Main.java:81)
02:45:20     at org.sonarsource.scanner.cli.Main.main(Main.java:62)
02:45:20   Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.sonarsource.scanner.api.internal.IsolatedClassloader@2fd66ad3-org.sonar.scanner.report.ActiveRulesPublisher': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActiveRules' defined in org.sonar.scanner.rule.ActiveRulesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.IllegalStateException: Fail to request url: RemoteURL/api/rules/list.protobuf?qprofile=314e3ad8-7bc5-4b5e-8409-4b79bd5778d0&ps=500&p=1
02:45:20     at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800)
02:45:20     at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:229)
02:45:20     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1372)
02:45:20     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1222)
02:45:20     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
02:45:20     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
02:45:20     at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
02:45:20     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
02:45:20     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
02:45:20     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
02:45:20     at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
02:45:20     at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1609)
02:45:20     at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1573)
02:45:20     at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1439)
02:45:20     at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1349)
02:45:20     at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
02:45:20     at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
02:45:20     at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
02:45:20     ... 31 more
02:45:20   Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ActiveRules' defined in org.sonar.scanner.rule.ActiveRulesProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.IllegalStateException: Fail to request url: RemoteURL/api/rules/list.protobuf?qprofile=314e3ad8-7bc5-4b5e-8409-4b79bd5778d0&ps=500&p=1
02:45:20     at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658)
02:45:20     at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638)
02:45:20     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352)
02:45:20     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195)
02:45:20     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)
02:45:20     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)
02:45:20     at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)
02:45:20     at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
02:45:20     at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)
02:45:20     at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
02:45:20     at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)
02:45:20     at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391)
02:45:20     at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311)
02:45:20     at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887)
02:45:20     at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791)
02:45:20     ... 48 more
02:45:20   Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonar.api.batch.rule.internal.DefaultActiveRules]: Factory method 'provide' threw exception; nested exception is java.lang.IllegalStateException: Fail to request url: RemoteURL/api/rules/list.protobuf?qprofile=314e3ad8-7bc5-4b5e-8409-4b79bd5778d0&ps=500&p=1
02:45:20     at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
02:45:20     at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653)
02:45:20     ... 62 more
02:45:20   Caused by: java.lang.IllegalStateException: Fail to request url: RemoteURL/api/rules/list.protobuf?qprofile=314e3ad8-7bc5-4b5e-8409-4b79bd5778d0&ps=500&p=1
02:45:20     at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:213)
02:45:20     at org.sonarqube.ws.client.HttpConnector.executeRequest(HttpConnector.java:128)
02:45:20     at org.sonarqube.ws.client.HttpConnector.call(HttpConnector.java:114)
02:45:20     at org.sonar.scanner.bootstrap.DefaultScannerWsClient.call(DefaultScannerWsClient.java:88)
02:45:20     at org.sonar.scanner.rule.DefaultActiveRulesLoader.load(DefaultActiveRulesLoader.java:62)
02:45:20     at org.sonar.scanner.rule.ActiveRulesProvider.load(ActiveRulesProvider.java:98)
02:45:20     at org.sonar.scanner.rule.ActiveRulesProvider.load(ActiveRulesProvider.java:61)
02:45:20     at org.sonar.scanner.rule.ActiveRulesProvider.provide(ActiveRulesProvider.java:49)
02:45:20     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
02:45:20     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
02:45:20     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
02:45:20     at java.base/java.lang.reflect.Method.invoke(Method.java:568)
02:45:20     at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
02:45:20     ... 63 more
02:45:20   Caused by: java.net.SocketTimeoutException: Read timed out
02:45:20     at java.base/sun.nio.ch.NioSocketImpl.timedRead(NioSocketImpl.java:288)
02:45:20     at java.base/sun.nio.ch.NioSocketImpl.implRead(NioSocketImpl.java:314)
02:45:20     at java.base/sun.nio.ch.NioSocketImpl.read(NioSocketImpl.java:355)
02:45:20     at java.base/sun.nio.ch.NioSocketImpl$1.read(NioSocketImpl.java:808)
02:45:20     at java.base/java.net.Socket$SocketInputStream.read(Socket.java:966)
02:45:20     at okio.InputStreamSource.read(JvmOkio.kt:93)
02:45:20     at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:128)
02:45:20     at okio.RealBufferedSource.indexOf(RealBufferedSource.kt:430)
02:45:20     at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:323)
02:45:20     at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:29)
02:45:20     at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:180)
02:45:20     at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:110)
02:45:20     at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:93)
02:45:20     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
02:45:20     at org.sonarqube.ws.client.OkHttpClientBuilder.addHeaders(OkHttpClientBuilder.java:222)
02:45:20     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
02:45:20     at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
02:45:20     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
02:45:20     at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:95)
02:45:20     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
02:45:20     at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
02:45:20     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
02:45:20     at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:76)
02:45:20     at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:109)
02:45:20     at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:201)
02:45:20     at okhttp3.internal.connection.RealCall.execute(RealCall.kt:154)
02:45:20     at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:211)
02:45:20     ... 75 more
02:45:20   ERROR:
02:45:20   ERROR: Re-run SonarScanner using the -X switch to enable full debug logging.
02:45:20   Process exited with code 1

Hi,

I appreciate you creating a new thread for this separate stacktrace, but I don’t think the answer changes much from the one I gave you in the thread where you originally posted it

 
HTH,
Ann

Hi,

As a followup, you might also check your SonarQube access log to verify that SonarQube is serving those requests in a timely manner. Response time is the last number on the line.

 
HTH,
Ann

Ok. And what if the requests timed out? Can we increase it in the configuration?

What could possibly cause the timeout issue?

Thanks.

Hi,

Is that what your access.log shows is happening? If so, you probably want to make sure the instance has plenty of resources (memory, CPU)

 
Ann