I am running Nexus 3.16.1-02 OSS on Ubuntu 16.04.6 and I am having an issue retrieving files from Maven Central. The system has been in place for some time and was working previously, although I don’t know when it started to have issues.
The issue is not 100% straight forward from what I can tell. I am able to download some files but not others and I haven’t been able to determine yet if it is a size issue or related to the type. I haven’t found an issue with the POM files, the JavaDoc JARs, or the Source JARs; but JAR types are failing at least in my test cases. I validated some other repositories and I am able to retrieve JAR files that are larger than my test cases.
Here is the error message I see in the logs for the failures (sizes of course vary):
2019-05-31 20:53:54,385-0400 WARN [qtp1713836254-217] admin com.google.common.io.Closeables - IOException thrown while closing Closeable.
org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 581529; received: 580861
at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:178)
at org.apache.http.impl.io.ContentLengthInputStream.read(ContentLengthInputStream.java:198)
at org.apache.http.impl.io.ContentLengthInputStream.close(ContentLengthInputStream.java:101)
at org.apache.http.impl.execchain.ResponseEntityProxy.streamClosed(ResponseEntityProxy.java:143)
at org.apache.http.conn.EofSensorInputStream.checkClose(EofSensorInputStream.java:228)
One of my first thoughts was that I am behind a firewall but the following command does work when running on the server:
wget https://repo1.maven.org/maven2/org/sonarsource/scanner/api/sonar-scanner-api/2.10.0.1189/sonar-scanner-api-2.10.0.1189.jar
where the following causes the error to occur after a timeout period (note that the describe indicates there is a read timeout as does the Maven command):
http://my-nexus-server/nexus/repository/public/org/sonarsource/scanner/api/sonar-scanner-api/2.10.0.1189/sonar-scanner-api-2.10.0.1189.jar?describe
and as I said before the following does work:
http://my-nexus-server/nexus/repository/public/org/sonarsource/scanner/api/sonar-scanner-api/2.10.0.1189/sonar-scanner-api-2.10.0.1189-javadoc.jar?describe
Any help would be greatly appreciated!