Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sbt 1.0.2 publish with credentials fails to push jar and sources artefacts (for one of three subprojects) #3570

Closed
akauppi opened this issue Sep 22, 2017 · 47 comments · Fixed by sbt/librarymanagement#317
Labels
Milestone

Comments

@akauppi
Copy link

akauppi commented Sep 22, 2017

This one is weird, and I likely won't be able to formulate it according to the contribution guidelines. But I think it's worth reporting in order to see whether others are seeing similar cases on-field as well.

In short:

  • upgrading one of my sbt projects (multiproject, with three subprojects) from sbt 0.13.15 to 1.0.2 causes one of the projects (always the same) to be only partially published (pom's are there, but jars and sources aren't) to the company's Nexus Maven repo

Screenshots:

screen shot 2017-09-21 at 11 41 58
Properly published subproject

screen shot 2017-09-21 at 11 41 36
Partial publish (no jars, no sources)

This happens for both release and snapshot publishes.

All subprojects share the same credentials setup:

def publishAs(name: String) = {
  val nexus = "https://maven.myCompany.net/"

  Def.settings(
    moduleName := name,
    publishMavenStyle := true,
    publishArtifact in (Compile, packageDoc) := false,
    publishTo := {
      if (isSnapshot.value) {
        Some("snapshots" at nexus + "content/repositories/snapshots")
      } else {
        Some("releases" at nexus + "content/repositories/releases")
      }
    },
    credentials ++= (for {
      user <- Option(System.getenv().get("MAVEN_USER"))
      pw <- Option(System.getenv().get("MAVEN_PASSWORD"))
    } yield Credentials("Sonatype Nexus Repository Manager", "maven.myCompany.net", user, pw)).toSeq
  )
}

All of this works, with 0.13.15 in project/build.properties. Changing to 1.0.2 makes publishing consistently fail.

On the command line one sees:

[error] (testkit/*:publish) java.io.IOException: PUT operation to URL https://maven.myCompany.net/content/repositories/snapshots/fi/myCompany/basement/cloak-akka-http-testkit_2.12/0.0.13-SNAPSHOT/cloak-akka-http-testkit_2.12-0.0.13-SNAPSHOT.jar failed with status code 502: Bad Gateway

The Nexus log show 401 (Unauthorized) for the failing parts.

My current work-around is simply to not upgrade to 1.0.2 within the particular project.

@dwijnand dwijnand added this to the 1.0.3 milestone Sep 22, 2017
@dwijnand
Copy link
Member

@akauppi Thanks for the report, we'll see what we can do.

@chikei
Copy link
Contributor

chikei commented Sep 27, 2017

Got same problem here with similar publish setting above, but the failed types here are javadocs, regular jar and -bundle, the exception from sbt are either java.net.SocketException: Connection reset or java.net.SocketException: Broken pipe (Write failed)

From the nexus request log file, it seems sbt will not send request with credential for failing artifact. The request logs of success artifact always contains one request without credential followed by one request with credential. The logs of failed artifacts always come with two consecutive requests without credential.

@leonardehrenfried
Copy link
Contributor

I'm seeing the same thing with 1.0.2.

Nexus rejects the upload because of missing credentials. Weirdly this only happens for some artifacts but not all.

@eed3si9n
Copy link
Member

A workaround might be:

updateOptions := updateOptions.value.withGigahorse(false)

That should fallback to similar behavior as 0.13.

@leonardehrenfried
Copy link
Contributor

I can report that setting updateOptions := updateOptions.value.withGigahorse(false) worked around the problem. However, this kinda defeats the point of upgrading to sbt 1.

@eed3si9n eed3si9n modified the milestones: 1.0.3, 1.something Oct 6, 2017
@nesc58
Copy link

nesc58 commented Oct 9, 2017

Same problem here. Problem exists since sbt 1.0.0.
Workaround updateOptions := updateOptions.value.withGigahorse(false) solved the problem for me.

@avdv
Copy link
Contributor

avdv commented Oct 17, 2017

Hi.

I also had problems not when publishing but resolving a dependency from an Ivy Repository with a dynamic revision, e.g. 0.0.+:

[error] sbt.librarymanagement.ResolveException: unresolved dependency: com.sample#agent-prometheus_2.12;0.0.+: Artifactory (internal): 
  unable to get resource for com.sample#agent-prometheus_2.12;0.0.+: 
    res=https://artifactory.internal/ext-ivy-virtual/com.sample/agent-prometheus_2.12//0.0.+/ivys/ivy.xml:

java.net.ProtocolException: Unexpected status line: 0

[error] 	at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve(IvyActions.scala:331)
[error] 	at sbt.internal.librarymanagement.IvyActions$.$anonfun$updateEither$1(IvyActions.scala:205)
[error] 	at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:229)
[error] 	at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:190)
[error] 	at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[error] 	at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[error] 	at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
[error] 	at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
[error] 	at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
[error] 	at xsbt.boot.Using$.withResource(Using.scala:10)
[error] 	at xsbt.boot.Using$.apply(Using.scala:9)
[error] 	at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
[error] 	at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
[error] 	at xsbt.boot.Locks$.apply0(Locks.scala:31)
[error] 	at xsbt.boot.Locks$.apply(Locks.scala:28)
[error] 	at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[error] 	at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:185)
[error] 	at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:182)
[error] 	at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:228)
[error] 	at sbt.internal.librarymanagement.IvyActions$.updateEither(IvyActions.scala:190)
[error] 	at sbt.librarymanagement.ivy.IvyDependencyResolution.update(IvyDependencyResolution.scala:20)
[error] 	at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:56)
[error] 	at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:38)
[error] 	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:91)
[error] 	at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:68)
[error] 	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$19(LibraryManagement.scala:104)
[error] 	at scala.util.control.Exception$Catch.apply(Exception.scala:224)
[error] 	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:104)
[error] 	at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:87)
[error] 	at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:149)
[error] 	at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:118)
[error] 	at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2353)
[error] 	at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] 	at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:42)
[error] 	at sbt.std.Transform$$anon$4.work(System.scala:64)
[error] 	at sbt.Execute.$anonfun$submit$2(Execute.scala:257)
[error] 	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] 	at sbt.Execute.work(Execute.scala:266)
[error] 	at sbt.Execute.$anonfun$submit$1(Execute.scala:257)
[error] 	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:167)
[error] 	at sbt.CompletionService$$anon$2.call(CompletionService.scala:32)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] 	at java.lang.Thread.run(Thread.java:748)

set updateOptions := updateOptions.value.withGigahorse(false) also helped.

Note, that my resolver also requires credentials to access the artifacts.

@Falmarri
Copy link
Contributor

Falmarri commented Nov 2, 2017

I'm seeing the same issue with downloading. It's finding the artifact, but it's failing on a 404 from a different repository

[debug] sbt-chain: Checking cache for: dependency: net.cakesolutions#scala-kafka-client_2.11;0.11.0.0 {compile=[default(compile)]}
[debug] sbt-chain-delegate: Checking cache for: dependency: net.cakesolutions#scala-kafka-client_2.11;0.11.0.0 {compile=[default(compile)]}
[debug]                 tried /home/jenkins/.ivy2/local/net.cakesolutions/scala-kafka-client_2.11//0.11.0.0/ivys/ivy.xml
[debug]         local: no ivy file found for net.cakesolutions#scala-kafka-client_2.11;0.11.0.0
[debug]                 tried https://repo1.maven.org/maven2/net/cakesolutions/scala-kafka-client_2.11/0.11.0.0/scala-kafka-client_2.11-0.11.0.0.pom
[debug] CLIENT ERROR: Not Found url=https://repo1.maven.org/maven2/net/cakesolutions/scala-kafka-client_2.11/0.11.0.0/scala-kafka-client_2.11-0.11.0.0.pom
[debug]         public: no ivy file found for net.cakesolutions#scala-kafka-client_2.11;0.11.0.0
[debug]                 tried https://oss.sonatype.org/content/repositories/public/net/cakesolutions/scala-kafka-client_2.11/0.11.0.0/scala-kafka-client_2.11-0.11.0.0.pom
[debug] CLIENT ERROR: Not Found url=https://oss.sonatype.org/content/repositories/public/net/cakesolutions/scala-kafka-client_2.11/0.11.0.0/scala-kafka-client_2.11-0.11.0.0.pom
[debug]         sonatype-public: no ivy file found for net.cakesolutions#scala-kafka-client_2.11;0.11.0.0
[debug]                 tried https://<company-artifactory>/net/cakesolutions/scala-kafka-client_2.11/0.11.0.0/scala-kafka-client_2.11-0.11.0.0.pom
[debug] CLIENT ERROR: Not Found url=https://<company-artifactory>/net/cakesolutions/scala-kafka-client_2.11/0.11.0.0/scala-kafka-client_2.11-0.11.0.0.pom
[debug]         <company-artifactory> releases: no ivy file found for net.cakesolutions#scala-kafka-client_2.11;0.11.0.0
[debug]                 tried https://<company-artifactory>/net/cakesolutions/scala-kafka-client_2.11/0.11.0.0/scala-kafka-client_2.11-0.11.0.0.pom
[debug] CLIENT ERROR: Conflict url=https://<company-artifactory>/net/cakesolutions/scala-kafka-client_2.11/0.11.0.0/scala-kafka-client_2.11-0.11.0.0.pom
[debug]         <company-artifactory> snapshots: no ivy file found for net.cakesolutions#scala-kafka-client_2.11;0.11.0.0
[debug]                 tried https://<company-artifactory>/net/cakesolutions/scala-kafka-client_2.11/0.11.0.0/scala-kafka-client_2.11-0.11.0.0.pom
[debug] CLIENT ERROR: Not Found url=https://<company-artifactory>/net/cakesolutions/scala-kafka-client_2.11/0.11.0.0/scala-kafka-client_2.11-0.11.0.0.pom
[debug]         <company-artifactory> Third Party: no ivy file found for net.cakesolutions#scala-kafka-client_2.11;0.11.0.0
[debug]                 tried https://dl.bintray.com/cakesolutions/maven/net/cakesolutions/scala-kafka-client_2.11/0.11.0.0/scala-kafka-client_2.11-0.11.0.0.pom
[debug]         bintray-cakesolutions-maven: found md file for net.cakesolutions#scala-kafka-client_2.11;0.11.0.0
[debug]                 => https://dl.bintray.com/cakesolutions/maven/net/cakesolutions/scala-kafka-client_2.11/0.11.0.0/scala-kafka-client_2.11-0.11.0.0.pom (0.11.0.0)
[debug] downloading https://dl.bintray.com/cakesolutions/maven/net/cakesolutions/scala-kafka-client_2.11/0.11.0.0/scala-kafka-client_2.11-0.11.0.0.pom ...
[debug]         bintray-cakesolutions-maven: downloading https://dl.bintray.com/cakesolutions/maven/net/cakesolutions/scala-kafka-client_2.11/0.11.0.0/scala-kafka-client_2.11-0.11.0.0.pom
[debug]         bintray-cakesolutions-maven: downloading https://dl.bintray.com/cakesolutions/maven/net/cakesolutions/scala-kafka-client_2.11/0.11.0.0/scala-kafka-client_2.11-0.11.0.0.pom.sha1
[debug] sha1 OK for https://dl.bintray.com/cakesolutions/maven/net/cakesolutions/scala-kafka-client_2.11/0.11.0.0/scala-kafka-client_2.11-0.11.0.0.pom
[debug]         [SUCCESSFUL ] net.cakesolutions#scala-kafka-client_2.11;0.11.0.0!scala-kafka-client_2.11.pom(pom.original) (297ms)
[debug]                 tried /home/jenkins/.ivy2/local/net.cakesolutions/scala-kafka-client_2.11//0.11.0.0/jars/scala-kafka-client_2.11.jar
[debug]                 tried https://repo1.maven.org/maven2/net/cakesolutions/scala-kafka-client_2.11/0.11.0.0/scala-kafka-client_2.11-0.11.0.0.jar
[debug] CLIENT ERROR: Not Found url=https://repo1.maven.org/maven2/net/cakesolutions/scala-kafka-client_2.11/0.11.0.0/scala-kafka-client_2.11-0.11.0.0.jar
[debug]                 tried https://oss.sonatype.org/content/repositories/public/net/cakesolutions/scala-kafka-client_2.11/0.11.0.0/scala-kafka-client_2.11-0.11.0.0.jar
[debug] problem occurred while resolving dependency: net.cakesolutions#scala-kafka-client_2.11;0.11.0.0 {compile=[default(compile)]} with bintray-cakesolutions-maven: java.lang.RuntimeException: sonatype-public: unable to get resource for net/cakesolutions#scala-kafka-client_2.11;0.11.0.0: res=https://oss.sonatype.org/content/repositories/public/net/cakesolutions/scala-kafka-client_2.11/0.11.0.0/scala-kafka-client_2.11-0.11.0.0.jar: java.net.ProtocolException: Unexpected status line: 0

Full stack trace

debug] problem occurred while resolving dependency: net.cakesolutions#scala-kafka-client_2.11;0.11.0.0 {compile=[default(compile)]} with bintray-cakesolutions-maven: java.lang.RuntimeException: sonatype-public: unable to get resource for net/cakesolutions#scala-kafka-client_2.11;0.11.0.0: res=https://oss.sonatype.org/content/repositories/public/net/cakesolutions/scala-kafka-client_2.11/0.11.0.0/scala-kafka-client_2.11-0.11.0.0.jar: java.net.ProtocolException: Unexpected status line: 0
[debug]         at org.apache.ivy.plugins.resolver.RepositoryResolver.findResourceUsingPattern(RepositoryResolver.java:135)
[debug]         at org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver.findResourceUsingPatterns(AbstractPatternsBasedResolver.java:96)
[debug]         at org.apache.ivy.plugins.resolver.IBiblioResolver.findArtifactRef(IBiblioResolver.java:124)
[debug]         at org.apache.ivy.plugins.resolver.BasicResolver.getArtifactRef(BasicResolver.java:1031)
[debug]         at org.apache.ivy.plugins.resolver.BasicResolver.locate(BasicResolver.java:893)
[debug]         at org.apache.ivy.plugins.resolver.IBiblioResolver.locate(IBiblioResolver.java:553)
[debug]         at org.apache.ivy.plugins.resolver.ChainResolver.locate(ChainResolver.java:298)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver.locate(SbtChainResolver.scala:82)
[debug]         at org.apache.ivy.plugins.resolver.ChainResolver.locate(ChainResolver.java:298)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver.locate(SbtChainResolver.scala:82)
[debug]         at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.addSourcesAndJavadocArtifactsIfPresent(PomModuleDescriptorParser.java:331)
[debug]         at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:307)
[debug]         at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:112)
[debug]         at sbt.internal.librarymanagement.CustomPomParser.parseDescriptor(CustomPomParser.scala:43)
[debug]         at org.apache.ivy.core.cache.DefaultRepositoryCacheManager$MyModuleDescriptorProvider.provideModule(DefaultRepositoryCacheManager.java:716)
[debug]         at org.apache.ivy.core.cache.ModuleDescriptorMemoryCache.getStale(ModuleDescriptorMemoryCache.java:68)
[debug]         at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.getStaledMd(DefaultRepositoryCacheManager.java:733)
[debug]         at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.cacheModuleDescriptor(DefaultRepositoryCacheManager.java:1195)
[debug]         at org.apache.ivy.plugins.resolver.BasicResolver.parse(BasicResolver.java:536)
[debug]         at org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicResolver.java:271)
[debug]         at org.apache.ivy.plugins.resolver.IBiblioResolver.getDependency(IBiblioResolver.java:538)
[debug]         at sbt.internal.librarymanagement.ConvertResolver$$anonfun$defaultConvert$lzycompute$1$PluginCapableResolver$1.sbt$internal$librarymanagement$ConvertResolver$DescriptorRequired$$super$getDependency(ConvertResolver.scala:164)
[debug]         at sbt.internal.librarymanagement.ConvertResolver$DescriptorRequired.getDependency(ConvertResolver.scala:291)
[debug]         at sbt.internal.librarymanagement.ConvertResolver$DescriptorRequired.getDependency$(ConvertResolver.scala:288)
[debug]         at sbt.internal.librarymanagement.ConvertResolver$$anonfun$defaultConvert$lzycompute$1$PluginCapableResolver$1.getDependency(ConvertResolver.scala:164)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.performResolution$1(SbtChainResolver.scala:152)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.$anonfun$getResults$3(SbtChainResolver.scala:172)
[debug]         at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
[debug]         at scala.collection.Iterator.foreach(Iterator.scala:929)
[debug]         at scala.collection.Iterator.foreach$(Iterator.scala:929)
[debug]         at scala.collection.AbstractIterator.foreach(Iterator.scala:1417)
[debug]         at scala.collection.IterableLike.foreach(IterableLike.scala:71)
[debug]         at scala.collection.IterableLike.foreach$(IterableLike.scala:70)
[debug]         at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
[debug]         at scala.collection.TraversableLike.map(TraversableLike.scala:234)
[debug]         at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
[debug]         at scala.collection.AbstractTraversable.map(Traversable.scala:104)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.getResults(SbtChainResolver.scala:165)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.results$lzycompute$1(SbtChainResolver.scala:321)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.results$1(SbtChainResolver.scala:321)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.$anonfun$getDependency$1(SbtChainResolver.scala:323)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.$anonfun$resolveByAllMeans$2(SbtChainResolver.scala:249)
[debug]         at scala.Option.orElse(Option.scala:289)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.resolveByAllMeans(SbtChainResolver.scala:247)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.getDependency(SbtChainResolver.scala:324)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver.getDependency(SbtChainResolver.scala:90)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.performResolution$1(SbtChainResolver.scala:152)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.$anonfun$getResults$3(SbtChainResolver.scala:172)
[debug]         at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
[debug]         at scala.collection.Iterator.foreach(Iterator.scala:929)
[debug]         at scala.collection.Iterator.foreach$(Iterator.scala:929)
[debug]         at scala.collection.AbstractIterator.foreach(Iterator.scala:1417)
[debug]         at scala.collection.IterableLike.foreach(IterableLike.scala:71)
[debug]         at scala.collection.IterableLike.foreach$(IterableLike.scala:70)
[debug]         at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
[debug]         at scala.collection.TraversableLike.map(TraversableLike.scala:234)
[debug]         at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
[debug]         at scala.collection.AbstractTraversable.map(Traversable.scala:104)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.getResults(SbtChainResolver.scala:165)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.results$lzycompute$1(SbtChainResolver.scala:321)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.results$1(SbtChainResolver.scala:321)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.$anonfun$getDependency$1(SbtChainResolver.scala:323)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.$anonfun$resolveByAllMeans$2(SbtChainResolver.scala:249)
[debug]         at scala.Option.orElse(Option.scala:289)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.resolveByAllMeans(SbtChainResolver.scala:247)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.getDependency(SbtChainResolver.scala:324)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver.getDependency(SbtChainResolver.scala:90)
[debug]         at org.apache.ivy.core.resolve.IvyNode.loadData(IvyNode.java:169)
[debug]         at org.apache.ivy.core.resolve.VisitNode.loadData(VisitNode.java:292)
[debug]         at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:714)
[debug]         at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:799)
[debug]         at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:722)
[debug]         at org.apache.ivy.core.resolve.ResolveEngine.getDependencies(ResolveEngine.java:594)
[debug]         at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:234)
[debug]         at org.apache.ivy.Ivy.resolve(Ivy.java:517)
[debug]         at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve(IvyActions.scala:319)
[debug]         at sbt.internal.librarymanagement.IvyActions$.$anonfun$updateEither$1(IvyActions.scala:205)
[debug]         at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:229)
[debug]         at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:190)
[debug]         at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[debug]         at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[debug]         at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
[debug]         at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
[debug]         at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
[debug]         at xsbt.boot.Using$.withResource(Using.scala:10)
[debug]         at xsbt.boot.Using$.apply(Using.scala:9)
[debug]         at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
[debug]         at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
[debug]         at xsbt.boot.Locks$.apply0(Locks.scala:31)
[debug]         at xsbt.boot.Locks$.apply(Locks.scala:28)
[debug]         at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[debug]         at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:185)
[debug]         at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:182)
[debug]         at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:228)
[debug]         at sbt.internal.librarymanagement.IvyActions$.updateEither(IvyActions.scala:190)
[debug]         at sbt.librarymanagement.ivy.IvyDependencyResolution.update(IvyDependencyResolution.scala:20)
[debug]         at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:56)
[debug]         at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:38)
[debug]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:91)
[debug]         at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:68)
[debug]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$19(LibraryManagement.scala:104)
[debug]         at scala.util.control.Exception$Catch.apply(Exception.scala:224)
[debug]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:104)
[debug]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:87)
[debug]         at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:149)
[debug]         at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:118)
[debug]         at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2353)
[debug]         at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[debug]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:42)
[debug]         at sbt.std.Transform$$anon$4.work(System.scala:64)
[debug]         at sbt.Execute.$anonfun$submit$2(Execute.scala:257)
[debug]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[debug]         at sbt.Execute.work(Execute.scala:266)
[debug]         at sbt.Execute.$anonfun$submit$1(Execute.scala:257)
[debug]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:167)
[debug]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:32)
[debug]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[debug]         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[debug]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[debug]         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[debug]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[debug]         at java.lang.Thread.run(Thread.java:748)
[debug] Caused by: java.net.ProtocolException: Unexpected status line: 0
[debug]         at okhttp3.internal.http.StatusLine.parse(StatusLine.java:69)
[debug]         at okhttp3.internal.http1.Http1Codec.readResponseHeaders(Http1Codec.java:189)
[debug]         at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:75)
[debug]         at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
[debug]         at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
[debug]         at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
[debug]         at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
[debug]         at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
[debug]         at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
[debug]         at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
[debug]         at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
[debug]         at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
[debug]         at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
[debug]         at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
[debug]         at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
[debug]         at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
[debug]         at okhttp3.RealCall.execute(RealCall.java:69)
[debug]         at sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler.getURLInfo(GigahorseUrlHandler.scala:48)
[debug]         at sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler.getURLInfo(GigahorseUrlHandler.scala:29)
[debug]         at org.apache.ivy.util.url.URLHandlerDispatcher.getURLInfo(URLHandlerDispatcher.java:66)
[debug]         at org.apache.ivy.plugins.repository.url.URLResource.init(URLResource.java:65)
[debug]         at org.apache.ivy.plugins.repository.url.URLResource.exists(URLResource.java:81)
[debug]         at org.apache.ivy.plugins.resolver.RepositoryResolver.findResourceUsingPattern(RepositoryResolver.java:97)
[debug]         ... 121 more
[debug] problem occurred while resolving dependency: net.cakesolutions#scala-kafka-client_2.11;0.11.0.0 {compile=[default(compile)]} with sbt-chain-delegate: java.lang.RuntimeException: sonatype-public: unable to get resource for net/cakesolutions#scala-kafka-client_2.11;0.11.0.0: res=https://oss.sonatype.org/content/repositories/public/net/cakesolutions/scala-kafka-client_2.11/0.11.0.0/scala-kafka-client_2.11-0.11.0.0.jar: java.net.ProtocolException: Unexpected status line: 0
[debug]         at org.apache.ivy.plugins.resolver.RepositoryResolver.findResourceUsingPattern(RepositoryResolver.java:135)
[debug]         at org.apache.ivy.plugins.resolver.AbstractPatternsBasedResolver.findResourceUsingPatterns(AbstractPatternsBasedResolver.java:96)
[debug]         at org.apache.ivy.plugins.resolver.IBiblioResolver.findArtifactRef(IBiblioResolver.java:124)
[debug]         at org.apache.ivy.plugins.resolver.BasicResolver.getArtifactRef(BasicResolver.java:1031)
[debug]         at org.apache.ivy.plugins.resolver.BasicResolver.locate(BasicResolver.java:893)
[debug]         at org.apache.ivy.plugins.resolver.IBiblioResolver.locate(IBiblioResolver.java:553)
[debug]         at org.apache.ivy.plugins.resolver.ChainResolver.locate(ChainResolver.java:298)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver.locate(SbtChainResolver.scala:82)
[debug]         at org.apache.ivy.plugins.resolver.ChainResolver.locate(ChainResolver.java:298)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver.locate(SbtChainResolver.scala:82)
[debug]         at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.addSourcesAndJavadocArtifactsIfPresent(PomModuleDescriptorParser.java:331)
[debug]         at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:307)
[debug]         at org.apache.ivy.plugins.parser.m2.PomModuleDescriptorParser.parseDescriptor(PomModuleDescriptorParser.java:112)
[debug]         at sbt.internal.librarymanagement.CustomPomParser.parseDescriptor(CustomPomParser.scala:43)
[debug]         at org.apache.ivy.core.cache.DefaultRepositoryCacheManager$MyModuleDescriptorProvider.provideModule(DefaultRepositoryCacheManager.java:716)
[debug]         at org.apache.ivy.core.cache.ModuleDescriptorMemoryCache.getStale(ModuleDescriptorMemoryCache.java:68)
[debug]         at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.getStaledMd(DefaultRepositoryCacheManager.java:733)
[debug]         at org.apache.ivy.core.cache.DefaultRepositoryCacheManager.cacheModuleDescriptor(DefaultRepositoryCacheManager.java:1195)
[debug]         at org.apache.ivy.plugins.resolver.BasicResolver.parse(BasicResolver.java:536)
[debug]         at org.apache.ivy.plugins.resolver.BasicResolver.getDependency(BasicResolver.java:271)
[debug]         at org.apache.ivy.plugins.resolver.IBiblioResolver.getDependency(IBiblioResolver.java:538)
[debug]         at sbt.internal.librarymanagement.ConvertResolver$$anonfun$defaultConvert$lzycompute$1$PluginCapableResolver$1.sbt$internal$librarymanagement$ConvertResolver$DescriptorRequired$$super$getDependency(ConvertResolver.scala:164)
[debug]         at sbt.internal.librarymanagement.ConvertResolver$DescriptorRequired.getDependency(ConvertResolver.scala:291)
[debug]         at sbt.internal.librarymanagement.ConvertResolver$DescriptorRequired.getDependency$(ConvertResolver.scala:288)
[debug]         at sbt.internal.librarymanagement.ConvertResolver$$anonfun$defaultConvert$lzycompute$1$PluginCapableResolver$1.getDependency(ConvertResolver.scala:164)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.performResolution$1(SbtChainResolver.scala:152)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.$anonfun$getResults$3(SbtChainResolver.scala:172)
[debug]         at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
[debug]         at scala.collection.Iterator.foreach(Iterator.scala:929)
[debug]         at scala.collection.Iterator.foreach$(Iterator.scala:929)
[debug]         at scala.collection.AbstractIterator.foreach(Iterator.scala:1417)
[debug]         at scala.collection.IterableLike.foreach(IterableLike.scala:71)
[debug]         at scala.collection.IterableLike.foreach$(IterableLike.scala:70)
[debug]         at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
[debug]         at scala.collection.TraversableLike.map(TraversableLike.scala:234)
[debug]         at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
[debug]         at scala.collection.AbstractTraversable.map(Traversable.scala:104)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.getResults(SbtChainResolver.scala:165)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.results$lzycompute$1(SbtChainResolver.scala:321)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.results$1(SbtChainResolver.scala:321)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.$anonfun$getDependency$1(SbtChainResolver.scala:323)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.$anonfun$resolveByAllMeans$2(SbtChainResolver.scala:249)
[debug]         at scala.Option.orElse(Option.scala:289)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.resolveByAllMeans(SbtChainResolver.scala:247)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.getDependency(SbtChainResolver.scala:324)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver.getDependency(SbtChainResolver.scala:90)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.performResolution$1(SbtChainResolver.scala:152)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.$anonfun$getResults$3(SbtChainResolver.scala:172)
[debug]         at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
[debug]         at scala.collection.Iterator.foreach(Iterator.scala:929)
[debug]         at scala.collection.Iterator.foreach$(Iterator.scala:929)
[debug]         at scala.collection.AbstractIterator.foreach(Iterator.scala:1417)
[debug]         at scala.collection.IterableLike.foreach(IterableLike.scala:71)
[debug]         at scala.collection.IterableLike.foreach$(IterableLike.scala:70)
[debug]         at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
[debug]         at scala.collection.TraversableLike.map(TraversableLike.scala:234)
[debug]         at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
[debug]         at scala.collection.AbstractTraversable.map(Traversable.scala:104)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.getResults(SbtChainResolver.scala:165)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.results$lzycompute$1(SbtChainResolver.scala:321)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.results$1(SbtChainResolver.scala:321)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.$anonfun$getDependency$1(SbtChainResolver.scala:323)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.$anonfun$resolveByAllMeans$2(SbtChainResolver.scala:249)
[debug]         at scala.Option.orElse(Option.scala:289)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.resolveByAllMeans(SbtChainResolver.scala:247)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver$CustomSbtResolution$.getDependency(SbtChainResolver.scala:324)
[debug]         at sbt.internal.librarymanagement.ivyint.SbtChainResolver.getDependency(SbtChainResolver.scala:90)
[debug]         at org.apache.ivy.core.resolve.IvyNode.loadData(IvyNode.java:169)
[debug]         at org.apache.ivy.core.resolve.VisitNode.loadData(VisitNode.java:292)
[debug]         at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:714)
[debug]         at org.apache.ivy.core.resolve.ResolveEngine.doFetchDependencies(ResolveEngine.java:799)
[debug]         at org.apache.ivy.core.resolve.ResolveEngine.fetchDependencies(ResolveEngine.java:722)
[debug]         at org.apache.ivy.core.resolve.ResolveEngine.getDependencies(ResolveEngine.java:594)
[debug]         at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:234)
[debug]         at org.apache.ivy.Ivy.resolve(Ivy.java:517)
[debug]         at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve(IvyActions.scala:319)
[debug]         at sbt.internal.librarymanagement.IvyActions$.$anonfun$updateEither$1(IvyActions.scala:205)
[debug]         at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:229)
[debug]         at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:190)
[debug]         at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[debug]         at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[debug]         at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
[debug]         at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
[debug]         at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
[debug]         at xsbt.boot.Using$.withResource(Using.scala:10)
[debug]         at xsbt.boot.Using$.apply(Using.scala:9)
[debug]         at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
[debug]         at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
[debug]         at xsbt.boot.Locks$.apply0(Locks.scala:31)
[debug]         at xsbt.boot.Locks$.apply(Locks.scala:28)
[debug]         at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[debug]         at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:185)
[debug]         at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:182)
[debug]         at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:228)
[debug]         at sbt.internal.librarymanagement.IvyActions$.updateEither(IvyActions.scala:190)
[debug]         at sbt.librarymanagement.ivy.IvyDependencyResolution.update(IvyDependencyResolution.scala:20)
[debug]         at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:56)
[debug]         at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:38)
[debug]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:91)
[debug]         at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:68)
[debug]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$19(LibraryManagement.scala:104)
[debug]         at scala.util.control.Exception$Catch.apply(Exception.scala:224)
[debug]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:104)
[debug]         at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:87)
[debug]         at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:149)
[debug]         at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:118)
[debug]         at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2353)
[debug]         at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[debug]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:42)
[debug]         at sbt.std.Transform$$anon$4.work(System.scala:64)
[debug]         at sbt.Execute.$anonfun$submit$2(Execute.scala:257)
[debug]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[debug]         at sbt.Execute.work(Execute.scala:266)
[debug]         at sbt.Execute.$anonfun$submit$1(Execute.scala:257)
[debug]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:167)
[debug]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:32)
[debug]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[debug]         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[debug]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[debug]         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[debug]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[debug]         at java.lang.Thread.run(Thread.java:748)
[debug] Caused by: java.net.ProtocolException: Unexpected status line: 0
[debug]         at okhttp3.internal.http.StatusLine.parse(StatusLine.java:69)
[debug]         at okhttp3.internal.http1.Http1Codec.readResponseHeaders(Http1Codec.java:189)
[debug]         at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:75)
[debug]         at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
[debug]         at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
[debug]         at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
[debug]         at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
[debug]         at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
[debug]         at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
[debug]         at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
[debug]         at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
[debug]         at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
[debug]         at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
[debug]         at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
[debug]         at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
[debug]         at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
[debug]         at okhttp3.RealCall.execute(RealCall.java:69)
[debug]         at sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler.getURLInfo(GigahorseUrlHandler.scala:48)
[debug]         at sbt.internal.librarymanagement.ivyint.GigahorseUrlHandler.getURLInfo(GigahorseUrlHandler.scala:29)
[debug]         at org.apache.ivy.util.url.URLHandlerDispatcher.getURLInfo(URLHandlerDispatcher.java:66)
[debug]         at org.apache.ivy.plugins.repository.url.URLResource.init(URLResource.java:65)
[debug]         at org.apache.ivy.plugins.repository.url.URLResource.exists(URLResource.java:81)
[debug]         at org.apache.ivy.plugins.resolver.RepositoryResolver.findResourceUsingPattern(RepositoryResolver.java:97)
[debug]         ... 121 more

@avdv
Copy link
Contributor

avdv commented Nov 6, 2017

It seems that after updating to version 1.0.3 it works now. May have been related the doubled slash problem?

Which version are you using @Falmarri ?

\edit: I spoke too soon. Version 1.0.3 did not change the erroneous behaviour I am seeing, must have been some caching going on behind the scene that made it look like it was OK.

@avdv
Copy link
Contributor

avdv commented Nov 16, 2017

Hi all,

this one really bugged me for a while, but the good news is that I could pinpoint the problem.

I have created simple reproducer, in a simple Java project with okhttp 3.9.0 (latest version).

The exception ("java.net.ProtocolException: Unexpected status line: 0") always occurred after the following series of requests (URLs changed for brevity):

  1. HEAD /abc/sbt_1.0/ -> 401
  2. HEAD /abc/sbt_1.0/ (w/ basic auth) -> 200
  3. GET /abc/sbt_1.0' -> 401
  4. GET /abc/sbt_1.0' (w/ basic auth) -> 200
  5. HEAD /abc/sbt_1.0/plugin_1.2.3/ivy.xml -> 💣 (boom) exception

Looking at it with a debugger, there were the response headers of the previous request in a buffer, the requests were re-using the connection (connection: keep-alive), and at the current buffer position, there was always a 0\r\n (plus other bytes from former requests).

Looking at the headers, it suddenly occurred to me: transfer-encoding: chunked.

Obviously, okhttp does not really cope well with HEAD requests using the chunked transfer encoding, ie. it does not read the final chunk and then re-uses the same buffer for the response of the next request and expects a HTTP status line at the current position...

Upstream bug report: square/okhttp#3689

@eed3si9n
Copy link
Member

@avdv Thanks for the detective work!

@leonardehrenfried
Copy link
Contributor

@avdv Excellent work and thanks for opening the bug on the okhttp repo. I hope this will be fixed upstream.

@avdv
Copy link
Contributor

avdv commented Nov 17, 2017

Hey, just a quick update: the okhttp library is not at fault here. It is a misbehaviour of the upstream server, I will create a ticket there. (need to register first) I'll keep you posted.

Iin the meantime, I could reproduce this with a miinimal example. The server seeems to switch to the chunked transfer encoding for the GET requests, and does not switch it off for the HEAD requests again which leaves the 0\r\n in the buffer.

@akauppi I had a look at your inital report again, and I guess the artifactory problem when downloading might not be really related to your problems while uploading - although the workaround is the same. Have you made any progress with your specific problem?

@leonardehrenfried
Copy link
Contributor

@avdv Did you ever open a ticket with artifactory?

@avdv
Copy link
Contributor

avdv commented Dec 12, 2017

@leonardehrenfried Yes: https://www.jfrog.com/jira/browse/RTFACT-15318

Until now there is no response...

@avdv
Copy link
Contributor

avdv commented Dec 12, 2017

TBH, I would really like to see this fixed with gigahorse (somehow) or okhttp. Even if JFrog fixes their own artifactory servers, there are probably quite a few out there which probably won't see the fix in a long time.

Also, during my tests I used nginx and mitmproxy which both somehow could cope with the responses and did not error out... So, it seems not so unreasonable to just skip to the next status line (if it is just a few bytes away)?!

@akauppi
Copy link
Author

akauppi commented Dec 12, 2017

@avdv We (Zalando, my employer) haven't really done anything about this. For my use, I can still have the official sbt be 0.13.15 which avoids touching this problem, at all. For me, that's the best policy for now.

@avdv
Copy link
Contributor

avdv commented Dec 12, 2017

@akauppi fair enough, we decided to make the switch to 1.0 and disable gigahorse via .sbtoptsin every project...

@dwijnand
Copy link
Member

@avdv If you do find a workaround for this in gigahorse I'm pretty sure a PR with the fix would be merged.

@dwijnand dwijnand modified the milestones: 1.something, 1.1.1 Dec 15, 2017
@dwijnand dwijnand modified the milestones: 1.1.1, 1.something Jan 9, 2018
@spangaer
Copy link
Contributor

While turning off gigahorse seemed to have worked for quite a while for me, for some reason it started failing today. It was clear that the Apache reverse proxy sitting in between was errorring to a 502 status when Nexus was closing the connection after responding 401. (why auth isn't provided right away on publish is somewhat odd to me, btw).

A day of googeloo finally landed me here:
https://support.sonatype.com/hc/en-us/articles/360000228868-Artifact-uploads-fail-with-broken-pipe-errors

From which you can simply copy
nexus.view.exhaustForAgents=Apache-Maven.*|Apache Ivy.*
to your nexus.properties file to make it work for SBT. (still with gigahorse off)

FYI, these two issues lead me to believe it's fixed as of Nexus 3.2
https://issues.sonatype.org/browse/NEXUS-16430
https://issues.sonatype.org/browse/NEXUS-10234

@eed3si9n eed3si9n added the uncategorized Used for Waffle integration label Sep 18, 2018
@liebichw
Copy link

liebichw commented Sep 27, 2018

I have an equivalent problem with SBT 1.1.6. The repository server is nexus 3.3.6. The project in question has 4 submodules - 3 of them I can publish, when trying to publish the fourth, the "broken pipe" error comes.
Setting

updateOptions := updateOptions.value.withGigahorse(false)

fixes the problem

jnatten added a commit to NDLANO/network that referenced this issue Oct 8, 2018
@fhuertas
Copy link

The same with SBT 1.2.5 and nexus 3.13.0.

The work around works

updateOptions := updateOptions.value.withGigahorse(false)

@mrt181
Copy link

mrt181 commented Oct 24, 2018

The same with sbt 1.2.6 and nexus 3.13.0

The work around works

updateOptions := updateOptions.value.withGigahorse(false)

@iokacha
Copy link

iokacha commented Jan 22, 2019

Hello, I'm having the same issue on 1.2.8 : the Broken pipe message
The updateOptions work around worked for me.

@bitnot
Copy link

bitnot commented Feb 4, 2019

Having a similar issue with one of the multi-projects - getting java.net.SocketException: Connection reset on publish.
SBT 1.2.8, JFrog 6.5.13
Adding -Dsbt.gigahorse=false fixed it for us.

@ALPSMAC
Copy link

ALPSMAC commented Feb 8, 2019

I'm also seeing this issue. Changing updateOptions didn't fix it for us under sbt 1.2.8, but setting -Dsbt.gigahorse=false did. This is against Nexus 2 and Nexus 3.

@schikkam
Copy link

Ran into same issue and -Dsbt.gigahorse=false fixed it. Thanks.

@baddlan
Copy link

baddlan commented Apr 6, 2019

This issue still occurs in SBT 1.1.6 when publishing to Nexus 3.15.2 running on baremetal.
As diagnosed by @avdv in #3570 (comment) the initial PUT request made to Nexus fails as it does not contain auth credentials.

After applying the updateOptions := updateOptions.value.withGigahorse(false) fix, the initial upload request still fails with 401 response but the file is submitted a second time with auth credentials and it succeeds.

@jkilgrow
Copy link

FYI...I'm using sbt.version=1.2.8 and Nexus OSS verion 3.13.0-01.
I put updateOptions := updateOptions.value.withGigahorse(false) in my build.sbt file and it resolved the issue.
My primary question is, this has been a problem since Sep 2017...and we still aren't any closer to solving it? huh...

@avdv
Copy link
Contributor

avdv commented Apr 13, 2019

Maybe make gigahorse opt-in instead of opt-out?!

radusw added a commit to monix/monix-nio that referenced this issue May 16, 2019
Check sbt/sbt#3570 for details
@udalrich
Copy link

Just got this with sbt 1.2.8 and nexus 3.16.1-02, so it's still not resolved.

@eed3si9n
Copy link
Member

I introduced Gigahorse in sbt 1.x (sbt/librarymanagement#104) as an attempt to improve the dependency resolution of Ivy (particularly for users from Australia who seem to suffer from network latency), but it seems like the keep alive has negatively affected corporate users who are hitting Nexus or Artifactory, and especially during publishing.

Now that sbt 1.3.x will be using Coursier for the resolution side by default, I should consider flipping the Gigahorse default, so publishing would be potentially slower, but more reliable.

@ctataryn
Copy link

Just ran into this today, adding -Dsbt.gigahorse=false to the sbt command in my Jenkinsfile saved my bacon. I'm glad someone figured this out.

eed3si9n added a commit to eed3si9n/librarymanagement that referenced this issue Aug 27, 2019
Fixes sbt/sbt#3570

The primary motivation for bringing in Gigahorse was to speed up the dependency resolution, especially in a high-latency environment like Australia, by enabling keep-alive. One of unintended consequences was that it ended up exposing either a bug in okhttp or Nexus / Artifactory's handling of keep-alive, since corporate users behind these proxy repositories started to experience problem publishing. Multiple people have also reported that putting network proxies like HAProxy works around this issue, which seems consistent with the theory.

Now that dependency resolution has switched to using Coursier by default, I am just going to flip the default here so publishing would use Ivy's default URL handler based on `java.net.HttpURLConnection` - https://github.com/sbt/ivy/blob/5681e1a77a149b93a4cfbe4a86d0263d7bd223eb/src/java/org/apache/ivy/util/url/BasicURLHandler.java
@mtomko
Copy link

mtomko commented Aug 28, 2019

We've been dealing with this for quite some time now when publishing artifacts - maybe on the order of years. I apologize for not having tried to come up with a repro case, but we're publishing to a private nexus instance and it seemed (based on other people's very detailed analysis) like the bug is actually on the server not the client, but it doesn't seem like a fix in the server is forthcoming.

I offer many, many thanks for efforts toward a workaround - recovering from these errors is painful as we often have to spend a some time recovering state in our release process - deleting artifacts and tags, etc, before we can retry the release (with the builds updated appropriately to disable gigahorse).

We really appreciate any work on this - thanks so much!

suiryc added a commit to worldline-messaging/scalaPSL that referenced this issue Apr 13, 2021
Migrate to "slash syntax".
See: https://www.scala-sbt.org/1.x/docs/Migrating-from-sbt-013x.html#slash

Since sbt 1.3.x, there is also a useful fix in the HTTP handler when
publishing to some 'buggy' servers (like sonatype/nexus).
See:
 - issue: sbt/sbt#3570
 - fix: sbt/librarymanagement#317
Previously, a workaround was needed:
 updateOptions := updateOptions.value.withGigahorse(false)
hayssams added a commit to starlake-ai/starlake that referenced this issue Jul 30, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.