java


SonarQube “Unexpected end of stream”


This problem has been going on for a while. It used to intermittent earlier but now it is consistently failing. The scan fails because of this.
org.sonarsource.scanner.maven:sonar-maven-plugin:3.1.1:sonar plugin fails with error
[DEBUG] GET 200 http://sonarqubehost/deploy/plugins/findbugs/sonar-findbugs-plugin-3.4.3.jar | time=137ms
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.1.1:sonar (default-cli) on project cm-ui-frontend: Fail to download sonar-findbugs-plugin-3.4.3.jar to /root/.sonar/cache/_tmp/fileCache7348481126430635122.tmp: unexpected end of stream -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.1.1:sonar (default-cli) on project cm-ui-frontend: Fail to download sonar-findbugs-plugin-3.4.3.jar to /root/.sonar/cache/_tmp/fileCache7348481126430635122.tmp
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Fail to download sonar-findbugs-plugin-3.4.3.jar to /root/.sonar/cache/_tmp/fileCache7348481126430635122.tmp
at org.sonarsource.scanner.maven.bootstrap.ExceptionHandling.handle(ExceptionHandling.java:36)
at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute(ScannerBootstrapper.java:81)
at org.sonarsource.scanner.maven.SonarQubeMojo.execute(SonarQubeMojo.java:117)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: java.lang.IllegalStateException: Fail to download sonar-findbugs-plugin-3.4.3.jar to /root/.sonar/cache/_tmp/fileCache7348481126430635122.tmp
at org.sonar.home.cache.FileCache.download(FileCache.java:98)
at org.sonar.home.cache.FileCache.get(FileCache.java:82)
at org.sonar.batch.bootstrap.BatchPluginInstaller.download(BatchPluginInstaller.java:103)
at org.sonar.batch.bootstrap.BatchPluginInstaller.loadPlugins(BatchPluginInstaller.java:80)
at org.sonar.batch.bootstrap.BatchPluginInstaller.installRemotes(BatchPluginInstaller.java:70)
at org.sonar.batch.bootstrap.BatchPluginRepository.start(BatchPluginRepository.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110)
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89)
at org.sonar.core.platform.ComponentContainer$1.start(ComponentContainer.java:320)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84)
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169)
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132)
at org.picocontainer.behaviors.Stored.start(Stored.java:110)
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1016)
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1009)
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:767)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:141)
at org.sonar.batch.bootstrapper.Batch.start(Batch.java:103)
at org.sonar.batch.bootstrapper.Batch.start(Batch.java:92)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.start(BatchIsolatedLauncher.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy23.start(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:223)
at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:159)
at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute(ScannerBootstrapper.java:60)
... 23 more
Caused by: java.net.ProtocolException: unexpected end of stream
at com.squareup.okhttp.internal.http.HttpConnection$ChunkedSource.read(HttpConnection.java:467)
at okio.RealBufferedSource.read(RealBufferedSource.java:50)
at okio.RealBufferedSource.exhausted(RealBufferedSource.java:60)
at okio.InflaterSource.refill(InflaterSource.java:101)
at okio.InflaterSource.read(InflaterSource.java:62)
at okio.GzipSource.read(GzipSource.java:80)
at okio.RealBufferedSource$1.read(RealBufferedSource.java:371)
at java.io.InputStream.read(InputStream.java:101)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1792)
at org.apache.commons.io.IOUtils.copyLarge(IOUtils.java:1769)
at org.apache.commons.io.IOUtils.copy(IOUtils.java:1744)
at org.apache.commons.io.FileUtils.copyInputStreamToFile(FileUtils.java:1512)
at org.sonar.batch.bootstrap.BatchPluginInstaller$FileDownloader.download(BatchPluginInstaller.java:160)
at org.sonar.home.cache.FileCache.download(FileCache.java:96)
... 55 more
Additional information
sonarqube server version : 5.6
sonar maven plugin : 3.1.1
It is running on a Gitlab CI runner (docker in a docker)
Some times I get similar error for other jars like
Fail to download sonar-scanner-engine-shaded-5.6.jar
This seems to work fine though
curl -v -o a.jar http://sonarqubehost/deploy/plugins/findbugs/sonar-findbugs-plugin-3.4.3.jar
Any idea on what could be causing this?
Caused by: java.lang.IllegalStateException: Fail to download sonar-findbugs-plugin-3.4.3.jar to /root/.sonar/cache/_tmp/fileCache7348481126430635122.tmp
During analysis, plugins are pulled from the SonarQube server to the analysis machine. Your analysis machine is having an increasingly hard time doing that pull. Check the network between the two machines.

Related Links

Eclipse acts as if compiler <1.5 was selected, though 1.7 is set
can't make geometric shapes to move in Java
How do i split a string of jsonObjects into an array
Symbols not copied correctly while getting the page source
Spring Security OAuth2 correct Authorization Manager
Data Generation - Java
Methods returning incorrect values
How to set unsigned integer in Android for byte[] length
Runtime error when aws lambda trying to access dynamoDB - ClassNotFoundException
Swing Jframe using 2 jframes
Designing Orchestrator In Java using disruptor and Executors
Graphics.drawImage leaves BufferedImage empty
First expression in patter design
RollingFileAppender properties not found (WARN No such property [rollingPolicy]) - jboss eap 6
Why does a public method in a thread not resolve in onCreate?
module.xml org.jboss.Log4j.logmanager in Jboss 6.3 EAP?

Categories

HOME
urbancode
reflection
layout
iot
objectgears
amazon-ecs
youtube-api-v3
jxls
umd
webpack-2
windows-server
ios-charts
directx
webrequest
gitpitch
google-translate
adobe-analytics
here-api
numeral.js
google-apps-marketplace
windows-phone-7
fortumo
samoa
contextmenu
google-cloud-speech
opencover
claims-based-identity
facet
internet-explorer-9
info.plist
phpfox
minitab
msys2
gsmcomm
directx-10
galsim
xquery-3.0
functor
grails-3.1
usbserial
framemaker
revolution-slider
hue
user-controls
android-mediaprojection
arena-simulation
btrace
apache-fop
react-scripts
csound
pearson
linode
hittest
account-kit
blacklist
messenger
angular-cache
measures
storekit
make-install
dataview
rhino-servicebus
freedesktop.org
separator
jms2
sdhc
django-unittest
wordml
purge
emailrelay
sankey-diagram
sortedlist
angular-local-storage
sonarqube5.1.2
gadt
google-style-guide
castle
kgdb
hyprlinkr
terminal-services
gnu-smalltalk
page-layout
dotnetnuke-5
html4
chronoforms
limejs
cassini-dev
specification-pattern
dmoz
nsnetservice
dice
jspinclude
dbproviderfactories
windows-phone-7.1.1
netbeans-6.9
transactionscope
adk
mod-auth
propagation
visitor-statistic
w3wp.exe
wise
dentrix
forums
brewmp
wsdl.exe
document-conversion

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App