Error during SonarScanner Engine execution: Fail to download plugin [iac]
I encountered an error while running the SonarScanner, which seems to be related to intermittent network issues. The error message indicates a failure to download the plugin [iac]. Below are the details of the error and my environment:
Must-share information:
-
Versions:
- SonarQube Server: 2025.1.0.102418 (Community Build)
- SonarScanner CLI: 7.1.0.4889
- Java: 17.0.14 Ubuntu (64-bit)
- OS: Linux 6.5.0-1018-gcp amd64
-
Deployment:
- SonarQube is deployed using Docker.
-
Objective:
- I am trying to run a SonarScanner analysis on my project.
-
Steps Taken:
- Verified network connectivity
- Checked SonarQube server status
- Ensured correct plugin versions
- Retried the scan multiple times, which eventually succeeded
Error Message:
04:03:47.685 INFO Scanner configuration file: /tmp/tmp.nSKhZwofHI/sonar-scanner-7.1.0.4889/conf/sonar-scanner.properties
04:03:47.691 INFO Project root configuration file: /bitrise/src/sonar-project.properties
04:03:47.711 INFO SonarScanner CLI 7.1.0.4889
04:03:47.713 INFO Java 17.0.14 Ubuntu (64-bit)
04:03:47.714 INFO Linux 6.5.0-1018-gcp amd64
04:03:47.762 INFO User cache: /root/.sonar/cache
04:03:49.410 INFO Communicating with SonarQube Server 2025.1.0.102418
04:03:49.411 INFO JRE provisioning: os[linux], arch[x86_64]
04:05:55.552 INFO Starting SonarScanner Engine...
04:05:55.553 INFO Java 17.0.13 Eclipse Adoptium (64-bit)
04:05:56.547 INFO Load global settings
04:05:57.259 INFO Load global settings (done) | time=712ms
04:05:57.262 INFO Server id: 41330257-AW8hmY3BC_eIUI1FbDK1
04:05:57.271 INFO Loading required plugins
04:05:57.272 INFO Load plugins index
04:05:57.550 INFO Load plugins index (done) | time=279ms
04:05:57.551 INFO Load/download plugins
04:06:07.065 INFO Load/download plugins (done) | time=9515ms
04:06:07.084 ERROR Error during SonarScanner Engine execution
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jdk.internal.loader.ClassLoaders$AppClassLoader@39ea3325-org.sonar.scanner.bootstrap.ScannerPluginRepository': Fail to download plugin [iac] into /root/.sonar/_tmp/fileCache2290908545570810158.tmp
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:608)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:523)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:336)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:289)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:334)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.instantiateSingleton(DefaultListableBeanFactory.java:1122)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingleton(DefaultListableBeanFactory.java:1093)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:1030)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:987)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:627)
at org.sonar.core.platform.SpringComponentContainer.startComponents(SpringComponentContainer.java:225)
at org.sonar.core.platform.SpringComponentContainer.execute(SpringComponentContainer.java:205)
at org.sonar.scanner.bootstrap.ScannerMain.runScannerEngine(ScannerMain.java:151)
at org.sonar.scanner.bootstrap.ScannerMain.run(ScannerMain.java:66)
at org.sonar.scanner.bootstrap.ScannerMain.main(ScannerMain.java:52)
Caused by: java.lang.IllegalStateException: Fail to download plugin [iac] into /root/.sonar/_tmp/fileCache2290908545570810158.tmp
at org.sonar.scanner.bootstrap.PluginFiles.downloadBinaryTo(PluginFiles.java:145)
at org.sonar.scanner.bootstrap.PluginFiles.download(PluginFiles.java:107)
at org.sonar.scanner.bootstrap.PluginFiles.get(PluginFiles.java:89)
at org.sonar.scanner.bootstrap.ScannerPluginInstaller.loadPlugins(ScannerPluginInstaller.java:123)
at org.sonar.scanner.bootstrap.ScannerPluginInstaller.installPlugins(ScannerPluginInstaller.java:102)
at org.sonar.scanner.bootstrap.ScannerPluginInstaller.installRequiredPlugins(ScannerPluginInstaller.java:72)
at org.sonar.scanner.bootstrap.ScannerPluginRepository.start(ScannerPluginRepository.java:76)
at org.sonar.core.platform.StartableBeanPostProcessor.postProcessBeforeInitialization(StartableBeanPostProcessor.java:33)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:423)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601)
... 15 common frames omitted
Caused by: java.net.SocketException: Connection reset
at java.base/sun.nio.ch.NioSocketImpl.implRead(Unknown Source)
at java.base/sun.nio.ch.NioSocketImpl.read(Unknown Source)
at java.base/sun.nio.ch.NioSocketImpl$1.read(Unknown Source)
at java.base/java.net.Socket$SocketInputStream.read(Unknown Source)
at java.base/sun.security.ssl.SSLSocketInputRecord.read(Unknown Source)
at java.base/sun.security.ssl.SSLSocketInputRecord.readHeader(Unknown Source)
at java.base/sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(Unknown Source)
at java.base/sun.security.ssl.SSLSocketImpl.readApplicationRecord(Unknown Source)
at java.base/sun.security.ssl.SSLSocketImpl$AppInputStream.read(Unknown Source)
at okio.InputStreamSource.read(JvmOkio.kt:93)
at okio.AsyncTimeout$source$1.read(AsyncTimeout.kt:128)
at okio.RealBufferedSource.read(RealBufferedSource.kt:192)
at okhttp3.internal.http1.Http1ExchangeCodec$AbstractSource.read(Http1ExchangeCodec.kt:339)
at okhttp3.internal.http1.Http1ExchangeCodec$ChunkedSource.read(Http1ExchangeCodec.kt:420)
at okhttp3.internal.connection.Exchange$ResponseBodySource.read(Exchange.kt:281)
at okio.RealBufferedSource$inputStream$1.read(RealBufferedSource.kt:161)
at java.base/java.io.InputStream.read(Unknown Source)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1486)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1111)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1459)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1089)
at org.apache.commons.io.FileUtils.copyToFile(FileUtils.java:1094)
at org.apache.commons.io.FileUtils.copyInputStreamToFile(FileUtils.java:1002)
at org.sonar.scanner.bootstrap.PluginFiles.downloadBinaryTo(PluginFiles.java:143)
... 25 common frames omitted
04:06:07.101 INFO EXECUTION FAILURE
04:06:07.102 INFO Total time: 2:19.420s
Is there any further ideas what the reason could be? Do others have the same issue? Is there any known workaround for such issue?