sbt - 服务器访问错误:连接重置?

Posted

技术标签:

【中文标题】sbt - 服务器访问错误:连接重置?【英文标题】:sbt - Server access error: Connection reset? 【发布时间】:2017-10-04 12:37:18 【问题描述】:

运行sbt 时出现以下错误。

PS H:\> sbt 获取 org.fusesource.jansi jansi 1.11(这可能需要一些时间)... :: 问题总结 :: :::: 警告 未找到模块:org.fusesource.jansi#jansi;1.11 ==== 本地:试过 C:\Users\user1\.ivy2\local\org.fusesource.jansi\jansi\1.11\ivys\ivy.xml -- 工件 org.fusesource.jansi#jansi;1.11!jansi.jar: C:\Users\user1\.ivy2\local\org.fusesource.jansi\jansi\1.11\jars\jansi.jar ==== 本地预加载常春藤:尝试过 文件:/C:/Users/user1/.sbt/preloaded/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml ==== 本地预加载:尝试过 文件:/C:/Users/user1/.sbt/preloaded/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom -- 工件 org.fusesource.jansi#jansi;1.11!jansi.jar: 文件:/C:/Users/user1/.sbt/preloaded/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar ==== Maven 中心:尝试过 https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom -- 工件 org.fusesource.jansi#jansi;1.11!jansi.jar: https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar ==== typesafe-ivy-releases:试过 https://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml ==== sbt-ivy-snapshots: 试过了 https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml :::::::::::::::::::::::::::::::::::::::::::::: :: 未解决的依赖 :: :::::::::::::::::::::::::::::::::::::::::::::: :: org.fusesource.jansi#jansi;1.11:未找到 :::::::::::::::::::::::::::::::::::::::::::::: :::: 错误 服务器访问报错:Connection reset url=https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom 服务器访问报错:Connection reset url=https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar 服务器访问错误:连接重置 url=https://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml 服务器访问错误:连接重置 url=https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml :: 使用详细或调试消息级别了解更多详细信息 未解决的依赖关系:org.fusesource.jansi#jansi;1.11:未找到 sbt 执行期间出错:检索所需库时出错 (完整的日志见 C:\Users\user1\.sbt\boot\update.log) 错误:无法检索 jansi 1.11

但是,我可以使用 wget 获取文件?

PS H:\> wget https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom


StatusCode        : 200
StatusDescription : OK
Content           : <?xml version="1.0" encoding="UTF-8"?>
                    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 h...
......

更新: 以下错误信息来自update.log

错误:服务器访问错误:连接重置 网址=https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom Maven Central:资源不可访问 org/fusesource/jansi#jansi;1.11: 资源=https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.pom 试 https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar 试过了 https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar 错误:服务器访问错误:连接重置 网址=https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar Maven Central:资源不可访问 org/fusesource/jansi#jansi;1.11: 资源=https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.11/jansi-1.11.jar Maven Central:找不到常春藤文件或工件 org.fusesource.jansi#jansi;1.11 typesafe-ivy-releases:没有命名空间 定义:使用系统缓存中没有常春藤文件 org.fusesource.jansi#jansi;1.11:试过 C:\Users\user1.ivy2\cache\org.fusesource.jansi\jansi\ivy-1.11.xml 试 https://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml 试过了 https://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml 错误:服务器访问错误:连接重置 网址=https://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml typesafe-ivy-releases:资源不可访问 org.fusesource.jansi#jansi;1.11: 资源=https://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml typesafe-ivy-releases:找不到 ivy 文件 org.fusesource.jansi#jansi;1.11 sbt-ivy-snapshots:没有命名空间 定义:使用系统缓存中没有常春藤文件 org.fusesource.jansi#jansi;1.11:试过 C:\Users\user1.ivy2\cache\org.fusesource.jansi\jansi\ivy-1.11.xml 试 https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml 试过了 https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml 错误:服务器访问错误:连接重置 网址=https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml sbt-ivy-snapshots:资源不可访问 org.fusesource.jansi#jansi;1.11: 资源=https://repo.scala-sbt.org/scalasbt/ivy-snapshots/org.fusesource.jansi/jansi/1.11/ivys/ivy.xml sbt-ivy-snapshots: 找不到 ivy 文件 org.fusesource.jansi#jansi;1.11

【问题讨论】:

【参考方案1】:

看起来这根本不是 Powershell 问题,无论您在使用 Powershell 时是否收到错误。根据错误的顶部,您似乎缺少依赖项:

module not found: org.fusesource.jansi#jansi;1.11

wget 有效但sbt 无效的事实是因为它们是完全不同的应用程序/exe; wget 是 Powershell cmdlet Invoke-WebRequest 的别名(运行 Get-Command wget 以亲自查看),而 sbt 是我真正从未听说过或亲自听说过的自己的应用程序。

【讨论】:

是的,我不认为 power shell 导致了这个问题。应该是 sbt 问题【参考方案2】:

我发现了问题 - 也需要为 https 设置代理设置。

【讨论】:

我也面临同样的问题。你能帮我看看你是在哪里设置的吗?你是怎么做的?

以上是关于sbt - 服务器访问错误:连接重置?的主要内容,如果未能解决你的问题,请参考以下文章

“无法访问此站点”已使用WCF服务重置连接

访问网站时提示“页面时到服务器的连接被重置”全面解决办法

客户端同时访问时服务器错误[重复]

芹菜错误“对等方重置连接”

CURL错误:Recv失败:通过对等方重置连接 - PHP Curl

sbt 无法在 mac 上启动并出现 sun 证书错误