Skip to content
This repository has been archived by the owner on Jun 24, 2024. It is now read-only.

java.net.SocketException: Unexpected end of file from server on publish #20

Closed
LeifW opened this issue Apr 19, 2022 · 4 comments
Closed

Comments

@LeifW
Copy link

LeifW commented Apr 19, 2022

I run codeArtifactPublish (using version 0.2.4), and I get:

[info] Uploading com/thatdot/quine-core_2.12/0.1.0-SNAPSHOT/quine-core_2.12-0.1.0-SNAPSHOT.pom
[info] Uploading com/thatdot/quine-core_2.12/0.1.0-SNAPSHOT/quine-core_2.12-0.1.0-SNAPSHOT.jar
[info] Uploading com/thatdot/quine-core_2.12/0.1.0-SNAPSHOT/quine-core_2.12-0.1.0-SNAPSHOT-sources.jar
[error] java.net.SocketException: Unexpected end of file from server
[error] 	at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:903)
[error] 	at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:726)
[error] 	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1688)
[error] 	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589)
[error] 	at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:529)
[error] 	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:308)
[error] 	at requests.Requester$$anon$1.liftedTree1$1(Requester.scala:268)
[error] 	at requests.Requester$$anon$1.readBytesThrough(Requester.scala:267)
[error] 	at geny.Readable.writeBytesTo(Writable.scala:93)
[error] 	at geny.Readable.writeBytesTo$(Writable.scala:93)
[error] 	at requests.Requester$$anon$1.writeBytesTo(Requester.scala:165)
[error] 	at requests.Requester.apply(Requester.scala:114)
[error] 	at codeartifact.CodeArtifactApi.upload(CodeArtifactApi.scala:21)
[error] 	at codeartifact.CodeArtifactPlugin$.$anonfun$publish0$6(CodeArtifactPlugin.scala:102)
[error] 	at scala.collection.immutable.List.map(List.scala:297)
[error] 	at codeartifact.CodeArtifactPlugin$.$anonfun$publish0$1(CodeArtifactPlugin.scala:100)
[error] 	at codeartifact.CodeArtifactPlugin$.$anonfun$publish0$1$adapted(CodeArtifactPlugin.scala:72)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:62)
[error] 	at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] 	at sbt.Execute.work(Execute.scala:291)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[error] 	at java.base/java.lang.Thread.run(Thread.java:833)
[error] (codeArtifactPublish) java.net.SocketException: Unexpected end of file from server
@bbstilson
Copy link
Owner

My guess is that you're trying to publish a SNAPSHOT. See #8

Try removing the snapshot version and see if that works

@bbstilson
Copy link
Owner

Gonna close this. Feel free to reopen if it's unrelated to the snapshot version.

@SimunKaracic
Copy link

SimunKaracic commented Dec 12, 2023

It's not related to the snapshot version:

[info] Uploading org/companyName/model_2.13/0.0.29/model_2.13-0.0.29-sources.jar
[error] java.net.SocketException: Unexpected end of file from server
[error] 	at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:954)
[error] 	at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:761)
[error] 	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1688)
[error] 	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1589)
[error] 	at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:529)
[error] 	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:308)
[error] 	at requests.Requester$$anon$1.liftedTree1$1(Requester.scala:268)
[error] 	at requests.Requester$$anon$1.readBytesThrough(Requester.scala:267)
[error] 	at geny.Readable.writeBytesTo(Writable.scala:93)
[error] 	at geny.Readable.writeBytesTo$(Writable.scala:93)
[error] 	at requests.Requester$$anon$1.writeBytesTo(Requester.scala:165)
[error] 	at requests.Requester.apply(Requester.scala:114)
[error] 	at codeartifact.CodeArtifactApi.upload(CodeArtifactApi.scala:21)
[error] 	at codeartifact.CodeArtifactPlugin$.$anonfun$publish0$6(CodeArtifactPlugin.scala:102)
[error] 	at scala.collection.immutable.List.map(List.scala:297)
[error] 	at codeartifact.CodeArtifactPlugin$.$anonfun$publish0$1(CodeArtifactPlugin.scala:100)
[error] 	at codeartifact.CodeArtifactPlugin$.$anonfun$publish0$1$adapted(CodeArtifactPlugin.scala:72)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:49)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:63)
[error] 	at sbt.std.Transform$$anon$4.work(Transform.scala:69)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
[error] 	at sbt.Execute.work(Execute.scala:292)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:[264](https://gitlab.intel471.cloud/dev/merlin/backend-commons/-/jobs/53515#L264))
[error] 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
[error] 	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[error] 	at java.base/java.lang.Thread.run(Thread.java:840)
[error] (model / codeArtifactPublish) java.net.SocketException: Unexpected end of file from server
[error] Total time: 54 s, completed Dec 12, 2023, 1:17:02 PM

So please reopen and take a look!

@bbstilson bbstilson reopened this Dec 12, 2023
@SimunKaracic
Copy link

I was running someModule/codeArtifactPublish and getting this error.

Switching to codeArtifactPublish revealed that, along with this error, there were 403 Forbidden errors :)
Fixing those fixed the EOF error as well.

So I the error was simply swallowing the 403 and not reporting it when running someModule/codeArtifactPublish.
Sorry for the false report :(

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants