Comments (16)
I'm aware this doesn't directly address your question, but fyi and for anyone else interested:
Everything sbt-related on repo.typesafe.com is ancient. Recent versions of things are on Maven Central. So I expect that using current sbt and current plugin versions would resolve any performance problems.
from sbt.
Play project maintainer I think creates hosts file entry such that repo.typesafe.com or repo.scala-sbt.org won't resolve on their own or CI machine.
yes that's right
I also blocked those repos locally on my machine.
Now trying an empty sbt project with sbt 1.2.7 results in:
[warn] Note: Unresolved dependencies path:
[warn] org.scala-sbt:sbt:1.2.7
[warn] +- org.scala-sbt:global-plugins:0.0 (scalaVersion=2.12, sbtVersion=1.0)
[error] sbt.librarymanagement.ResolveException: unresolved dependency: org.scala-sbt#sbt;1.2.7: Resolution failed several times for dependency: org.scala-sbt#sbt;1.2.7 {provided=[default(compile)]}::
[error] typesafe-ivy-releases: unable to get resource for org.scala-sbt#sbt;1.2.7: res=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/1.2.7/ivys/ivy.xml: java.net.ConnectException: Failed to connect to repo.typesafe.com/0:0:0:0:0:0:0:1:443
[error] sbt-plugin-releases: unable to get resource for org.scala-sbt#sbt;1.2.7: res=https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.scala-sbt/sbt/1.2.7/ivys/ivy.xml: java.net.ConnectException: Failed to connect to repo.scala-sbt.org/0:0:0:0:0:0:0:1:443
[error] typesafe-ivy-releases: unable to get resource for org.scala-sbt#sbt;1.2.7: res=https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/1.2.7/jars/sbt.jar: java.net.ConnectException: Failed to connect to repo.typesafe.com/0:0:0:0:0:0:0:1:443
So sbt 1.2.7 is still hosted on the deprecated repo.
Seems only sbt 1.3.0 and newer are hosted on maven central (just tested and worked).
@pgoranss So you need to upgrade to at least sbt 1.3.0 to avoid those deprecated repos. However this is not the full story. If you use sbt-plugins in your project/plugins.sbt
it's very likely they are outdated and also still hosted on repo.scala-sbt.org
.
Lots of work was done to migrate the most popular plugins to maven central, so I recommend to upgrade to latest sbt sbt version and also all your sbt plugins to the latest available versions and then you should not hit those old repos anymore.
from sbt.
I am unsure how long it would take these to fully resolve
https://repo1.maven.org/maven2/com/typesafe/play/sbt-plugin_2.12_1.0/ -> BAD
https://repo1.maven.org/maven2/ch/epfl/scala/sbt-bloop_2.12_1.0/1.5.11/ -> GOOD
https://repo1.maven.org/maven2/org/scalameta/sbt-scalafmt_2.12_1.0/2.4.6/ -> GOOD
https://repo1.maven.org/maven2/ch/epfl/scala/sbt-scalafix_2.12_1.0/0.10.0/ -> GOOD
https://repo1.maven.org/maven2/com/beautiful-scala/scalastyle_2.13/1.5.1/ -> GOOD
https://repo1.maven.org/maven2/com/eed3si9n/sbt-assembly_2.12_1.0/2.1.1/ -> GOOD
https://repo1.maven.org/maven2/com/mintbeans -> BAD
https://repo1.maven.org/maven2/com/github/sbt/sbt-native-packager_2.12_1.0/1.9.13/ -> GOOD
https://repo1.maven.org/maven2/com/github/cb372/sbt-explicit-dependencies_2.12_1.0/ -> BAD, but can upgraded to 0.3.1
https://repo1.maven.org/maven2/com/github/reibitto/sbt-test-shards_2.12_1.0/0.1.0/ -> GOOD
- Your main task will be upgrading Play to latest 2.9.3 or 3.0.3 which is fully hosted on Maven central.
- For sbt-ecr see sjednac/sbt-ecr#45
- For sbt-explicit-dependencies see comment above.
from sbt.
Thank you @mkurz for the advice!
For those looking for a bridge fix here, we were able to copy the method of the Play maintainers to block the public sbt plugin URLs from resolving with
sudo echo "127.0.0.1 repo.scala-sbt.org" | sudo tee -a /etc/hosts
sudo echo "127.0.0.1 repo.typesafe.com" | sudo tee -a /etc/hosts
We are then fortunate enough to have our own Artifactory instance where we setup a remote repository pointed at https://scala.jfrog.io/artifactory/sbt-plugin-releases/. This remote repository only needs to be able to resolve the plugin jars once, and will then cache them indefinitely for our use.
We then added this remote repo to our meta-project by editing project/build.sbt (Note: This is the meta-build not the build.sbt at the root of the project) to add our remote artifactory repo lilke so
resolvers ++= Seq( Resolver.url("Artifactory-sbt-plugins", url("https://<MY_JFROG>/artifactory/<MY_REMOTE_REPO_NAME>"))
(Resolver.ivyStylePatterns)
)
Obviously, upgrading to a modern version of everything is the proper thing to do, but this will serve as a hold over for now.
from sbt.
now the repo is down :/
from sbt.
@djcristi can you be maximally specific, please, about what evidence you're seeing of that?
from sbt.
Not down but we are noticing it's even slower today. We will certainly take the recommendation to upgrade SBT as a long term solution, but short term there must be someone to contact to at least report the issue?
In terms of evidence, just make a simple curl http request to scala.jfrog.io:
curl -L -o /dev/null -w "Total time: %{time_total}\n" https://scala.jfrog.io/
The response time for these http requests should be on a factor of # of milliseconds, not # of seconds. These requests occur 1000s of times during SBT Project load so it is really adds up to causing unusable build times the past couple days.
from sbt.
that?
when i wrote was giving 502 bad gateway. now it's back but very slow
from sbt.
I'll repeat what I wrote in #7523 (comment)
expectation
SBT 0.x works
While the current parties involved will likely try to resolve this issue, I should note that I EOLed sbt 0.13.x on November 30, 2018 while I was at Lightbend (https://web.archive.org/web/20210918065807/https://www.lightbend.com/blog/scala-sbt-127-patchnotes):
I would like to annouce the end of sbt 0.13 public support effective today
In other words, please adjust your expectation that at some point sbt 0.13 distribution might go away, and migrate to sbt 1.x.
https://scala.jfrog.io/ instance is granted by JFrog for free of charge, but I don't think anyone (especially commercial users) should rely on its existence now or into the future. If it's super slow or unreliable that's actually great, because hopefully we will recognize that it should be proxied via Artifactory on our own and that we should migrate off of it ASAP.
from sbt.
As for how to detect the slowness, Play project maintainer I think creates hosts file entry such that repo.typesafe.com or repo.scala-sbt.org won't resolve on their own or CI machine.
from sbt.
We are on sbt 1.2.7 so how is the EOL of sbt 0.13.x comment related to the scala.jfrog.io
slowness issues?
It sounds like the problem is a general reliance on scala.jfrog.io
so is this an artifact of being on sbt 1.2.7 rather than something more recent?
from sbt.
As far as I know, repo.typesafe.com is useful mostly for the purpose of hosting sbt 0.13 artifacts.
repo.scala-sbt.org hosts a bunch of plugins, which has mostly moved out to Maven Central in the recent years.
from sbt.
Seeing a similar issue in our CI environments. I am unsure how long it would take these to fully resolve because I am seeing our sbt process fail out before completing.
Quick facts
- Github Actions
- Scala 2.12.15
- sbt 2.4.9
- Java 17
plugins in plugins.sbt
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.7.9")
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.11")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.0")
addSbtPlugin("com.beautiful-scala" %% "sbt-scalastyle" % "1.5.1")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.1")
addSbtPlugin("com.mintbeans" % "sbt-ecr" % "0.16.0")
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.13")
addSbtPlugin("com.github.cb372" % "sbt-explicit-dependencies" % "0.2.16")
addSbtPlugin("com.github.reibitto" % "sbt-test-shards" % "0.1.0")
example errors
[error] lmcoursier.internal.shaded.coursier.error.FetchError$DownloadingArtifacts: Error fetching artifacts:
[error] https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-web/scala_2.12/sbt_1.0/1.4.4/docs/sbt-web-javadoc.jar: download error: Caught java.net.SocketException: Connection reset (Connection reset) while downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.sbt/sbt-web/scala_2.12/sbt_1.0/1.4.4/docs/sbt-web-javadoc.jar
[error]
[error] at lmcoursier.internal.shaded.coursier.Artifacts$.$anonfun$fetchArtifacts$9(Artifacts.scala:3[46](https://github.com/ActionIQ/aiq/actions/runs/9190897613/job/25277206182?pr=52445#step:8:47))
[error] at lmcoursier.internal.shaded.coursier.util.Task$.$anonfun$flatMap$extension$1(Task.scala:14)
[error] at lmcoursier.internal.shaded.coursier.util.Task$.$anonfun$flatMap$extension$1$adapted(Task.scala:14)
[error] at lmcoursier.internal.shaded.coursier.util.Task$.wrap(Task.scala:84)
[error] at lmcoursier.internal.shaded.coursier.util.Task$.$anonfun$flatMap$2(Task.scala:14)
[error] at scala.concurrent.Future.$anonfun$flatMap$1(Future.scala:307)
[error] at scala.concurrent.impl.Promise.$anonfun$transformWith$1(Promise.scala:41)
[error] at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
[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] sbt.librarymanagement.ResolveException: Error downloading com.mintbeans:sbt-ecr;sbtVersion=1.0;scalaVersion=2.12:0.16.0
[error] Not found
[error] Not found
[error] not found: https://repo1.maven.org/maven2/com/mintbeans/sbt-ecr_2.12_1.0/0.16.0/sbt-ecr-0.16.0.pom
[error] not found: /home/runner/.ivy2/localcom.mintbeans/sbt-ecr/scala_2.12/sbt_1.0/0.16.0/ivys/ivy.xml
[error] not found: https://actioniq.jfrog.io/artifactory/aiq-sbt-local/com/mintbeans/sbt-ecr_2.12_1.0/0.16.0/sbt-ecr-0.16.0.pom
[error] download error: Caught java.io.IOException: Server returned HTTP response code: [50](https://github.com/ActionIQ/aiq/actions/runs/9190897613/job/25276848694?pr=52445#step:6:51)2 for URL: https://scala.jfrog.io/artifactory/sbt-plugin-releases/com.mintbeans/sbt-ecr/scala_2.12/sbt_1.0/0.16.0/ivys/ivy.xml (Server returned HTTP response code: 502 for URL: https://scala.jfrog.io/artifactory/sbt-plugin-releases/com.mintbeans/sbt-ecr/scala_2.12/sbt_1.0/0.16.0/ivys/ivy.xml) while downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.mintbeans/sbt-ecr/scala_2.12/sbt_1.0/0.16.0/ivys/ivy.xml
[error] download error: Caught java.io.IOException: Server returned HTTP response code: 504 for URL: https://scala.jfrog.io/artifactory/sbt-plugin-releases/com.typesafe.play/sbt-plugin/scala_2.12/sbt_1.0/2.7.9/ivys/ivy.xml (Server returned HTTP response code: 504 for URL: https://scala.jfrog.io/artifactory/sbt-plugin-releases/com.typesafe.play/sbt-plugin/scala_2.12/sbt_1.0/2.7.9/ivys/ivy.xml) while downloading https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.typesafe.play/sbt-plugin/scala_2.12/sbt_1.0/2.7.9/ivys/ivy.xml
from sbt.
Thanks @mkurz for pointers!
Do you know if these modules will be in Maven as well? We run sbt 2.10.0 and run into this 502/504 issue now with them.
sbtPluginExtra("com.typesafe.sbt" % "sbt-git" % "1.0.0", sbtV = "1.0", scalaV = "2.12"), sbtPluginExtra("com.lightbend.sbt" % "sbt-javaagent" % "0.1.5", sbtV = "1.0", scalaV = "2.12"),
not found: https://repo1.maven.org/maven2/com/typesafe/sbt/sbt-git_2.12_1.0/1.0.0/sbt-git-1.0.0.pom
from sbt.
@kkeinanen Google helps. These artifacts changed groupId.
https://github.com/sbt/sbt-git
https://repo1.maven.org/maven2/com/github/sbt/sbt-git_2.12_1.0/
https://github.com/sbt/sbt-javaagent
https://repo1.maven.org/maven2/com/github/sbt/sbt-javaagent_2.12_1.0/
from sbt.
Is it possible to set a timeout for the resolver getting a response from the repo? We are using a local proxy for our builds now but sbt is still querying the old repos now pointing to jfrog. We are able to avoid the issue using the -Dsbt.override.build.repos=true
option however some of our builds have custom resolvers and those settings get ignored when we use that option.
Thanks
from sbt.
Related Issues (20)
- Command alias doesn't work with the project prefix HOT 1
- Allow the sbt launcher to be called programmatcially without running into an `exit` call HOT 10
- Compile ClassCastException HOT 1
- Unreachable case warning (E121) in inline generic function HOT 2
- Pipelining prevents Java compilation with `compileOrder := JavaThenScala` config
- sbt-coursier does not enable configuration of the `FileCache.localArtifactsShouldBeCached` setting
- Ivy revision latest version Semver syntax is buggy. HOT 1
- "value getOffsetStatic is not a member of object scala.runtime.LazyVals" while testing Java-only library with ScalaTest + Scala 3.4.1 HOT 9
- Please update the documentation HOT 1
- Sbt server displays weird characters around dates on Windows HOT 6
- java exception during first attempt to do REPL completion by TAB in sbt console on Scala 3.4.1 HOT 5
- Error message in log when compiling: BufferStrategyPaintManager$ HOT 5
- Sbt build times substantially slower on Windows vs Ubuntu. HOT 1
- `sbt.PluginData#dependencyClasspath` contains multiple `scala-library/compiler/reflect/xml` jars HOT 6
- NPE when compiling HOT 1
- Fail to boot with match error with `scala-tools-releases` in `repositories` HOT 3
- Project not found when running with ++scalaVersion HOT 1
- Unable to run tests with javaOptions HOT 2
- Scala program does not receive EOF when using `sbt run`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sbt.