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

JTable multiselect loses selection when table data changes
I have two class, How to find the Number of subclass using selenium
Example of using ssl with org.apache.http.impl.bootstrap.HttpServer from Apache HttpCore 4.4.3
How to unit test graph nodes with mockito?
How to access the methods in this class in Java
JavaRx on ErrorReturn return the different type
Why does Java have an empty statement? [duplicate]
Min/Max Date/DateTime in JodaTime
Eclipse add library containing class with $ sign
How to get a ByteBuffer that will work with LWJGL?
My Compiler can't read certain classes
Constructor variables [closed]
How to keep indentation hierarchies in fluent method chains on automatic formatting
Eclipse external null annotation for java.lang.Object#getClass()
The value of length when replacing space with %20
Transaction and catch block

Categories

HOME
arduino-uno
google-chrome-extension
openmp
mockito
iot
grep
jira
tizen-web-app
jxls
win32gui
google-project-tango
angular-ui-bootstrap
azure-media-services
pheatmap
adfs
gitpitch
modelica
visual-studio-cordova
decimal
aurigma
jqwidget
nhibernate-envers
emulator
mustache.php
zurb-foundation-6
php-openssl
claims-based-identity
bootstrap-duallistbox
fluentvalidation
elasticsearch-ruby
r-raster
directx-10
bosh
data-manipulation
airconsole
phpfreechat
form-data
mixture-model
twitch
az-application-insights
graphenedb
flickr-api
promela
python-webbrowser
celery-task
powercli
imanage
query-performance
topbeat
slicknav
file-writing
pcf
skype4py
rhino-servicebus
xpath-1.0
wapiti
collapse
dukescript
deis
javax.mail
formatjs
facebook-graph-api-v2.4
camanjs
google-style-guide
cctv
rdtsc
rdl
responsive-slides
access-rights
cdc
dataservice
eclipse-memory-analyzer
kyotocabinet
unc
chuck
libstdc++
trusted
bluepill
broken-links
javaspaces
enter
eclipse-templates
gnustep
appendto
sudzc
firefox4
adrotator
project-hosting
ugc

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App