【问题标题】:Nexus keeps saying "Remote automatically blocked and unavailable" for Eclipse P2 remote repositoryNexus 一直说 Eclipse P2 远程存储库的“远程自动被阻止且不可用”
【发布时间】:2015-08-06 05:00:07
【问题描述】:

我将 Eclipse P2 存储库作为代理添加到我的 Nexus,但在检查了一段时间后,状态变为“远程自动阻止且不可用”。例如,我使用存储库类型 P2 配置了远程 URL http://download.eclipse.org/eclipse/updates/4.4/。这是正确的,它应该像那样工作吗?

我认为我可能因为我的多次试验和错误而被列入黑名单,但是当我在 POM 中使用与存储库相同的 URL 时,它可以完美运行,即使它是从同一个 IP 获取的。所以 Nexus 代理配置似乎有问题。我这样配置代理:

  • 存储库类型:代理
  • 提供者:P2 更新站点
  • 格式:P2
  • 政策:混合
  • 远程存储位置:http://download.eclipse.org/eclipse/updates/3.6/
  • 下载远程索引:false
  • 启用自动屏蔽:true
  • 文件内容验证:true
  • 校验和策略:忽略
  • 允许文件浏览:true
  • 包含在搜索中:false
  • 发布网址:true
  • 未找到缓存 TTL:1440 分钟
  • 神器最大年龄:-1 分钟
  • 元数据最大年龄:1440 分钟
  • 物品最大年龄:1440 分钟
  • HTTP 请求设置:未配置

这个配置有问题吗?

日志只显示“超时”:

2015-05-25 19:40:51,544+0200 调试 [proxy-3-thread-389] smith remote.storage.outbound - [eclipse-3.6-try1] HEAD http://download.eclipse.org/eclipse/updates /3.6/ - 30,00 秒 2015-05-25 19:40:51,544+0200 调试 [proxy-3-thread-389] smith org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage - HEAD 方法失败,将尝试 GET。异常:执行 HEAD 方法时连接池超时错误 [repositoryId="eclipse-3.6-try1", requestPath="/", remoteUrl="http://download.eclipse.org/eclipse/updates/3.6/"] org.sonatype.nexus.proxy.RemoteStorageTransportOverloadedException:执行 HEAD 方法时连接池超时错误 [repositoryId="eclipse-3.6-try1", requestPath="/", remoteUrl="http://download.eclipse.org/eclipse/更新/3.6/"] 在 org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage.doExecuteRequest(HttpClientRemoteStorage.java:598) ~[nexus-core-2.11.2-03.jar:2.11.2-03] 在 org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage.executeRequest(HttpClientRemoteStorage.java:515) ~[nexus-core-2.11.2-03.jar:2.11.2-03] 在 org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage.executeRequestAndRelease(HttpClientRemoteStorage.java:622) ~[nexus-core-2.11.2-03.jar:2.11.2-03] 在 org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage.checkRemoteAvailability(HttpClientRemoteStorage.java:371) ~[nexus-core-2.11.2-03.jar:2.11.2-03] 在 org.sonatype.nexus.proxy.storage.remote.AbstractHTTPRemoteRepositoryStorage.isReachable(AbstractHTTPRemoteRepositoryStorage.java:50) [nexus-core-2.11.2-03.jar:2.11.2-03] 在 org.sonatype.nexus.proxy.repository.AbstractProxyRepository.isRemoteStorageReachable(AbstractProxyRepository.java:1660) [nexus-core-2.11.2-03.jar:2.11.2-03] 在 org.sonatype.nexus.proxy.repository.AbstractProxyRepository$RemoteStatusUpdateCallable.call(AbstractProxyRepository.java:1634) [nexus-core-2.11.2-03.jar:2.11.2-03] 在 org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:44) [nexus-core-2.11.2-03.jar:2.11.2-03] 在 org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.3.jar:1.2.3] 在 org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.3.jar:1.2.3] 在 java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_31] 在 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_31] 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_31] 在 java.lang.Thread.run(Thread.java:745) [na:1.8.0_31] 引起:org.apache.http.conn.ConnectionPoolTimeoutException:等待池连接超时 在 org.apache.http.impl.conn.PoolingHttpClientConnectionManager.leaseConnection(PoolingHttpClientConnectionManager.java:254) ~[httpclient-4.3.6.jar:4.3.6] 在 org.apache.http.impl.conn.PoolingHttpClientConnectionManager$1.get(PoolingHttpClientConnectionManager.java:231) ~[httpclient-4.3.6.jar:4.3.6] 在 org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:173) ~[httpclient-4.3.6.jar:4.3.6] 在 org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195) ~[httpclient-4.3.6.jar:4.3.6] 在 org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86) ~[httpclient-4.3.6.jar:4.3.6] 在 org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108) ~[httpclient-4.3.6.jar:4.3.6] 在 org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) ~[httpclient-4.3.6.jar:4.3.6] 在 org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) ~[httpclient-4.3.6.jar:4.3.6] 在 org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57) ~[httpclient-4.3.6.jar:4.3.6] 在 org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage.doExecuteRequest(HttpClientRemoteStorage.java:557) ~[nexus-core-2.11.2-03.jar:2.11.2-03] ...省略了13个常用框架

【问题讨论】:

  • “远程自动阻塞且不可用”表示远程存在网络连接问题。检查nexus.log 文件,那里会有更多关于失败的信息。此问题的最可能原因是该站点被您的防火墙阻止。
  • 这对我来说似乎也是最可能的原因,但如上所述,我使用了来自 Maven 的相同 URL,它在同一台机器上运行,并且在那里工作。所以我猜这不是问题。

标签: eclipse nexus


【解决方案1】:

我发现这个问题https://issues.sonatype.org/browse/NEXUS-5466 很好地描述了我的问题。原因似乎是 Nexus 的内部问题,无法分配所需的内部资源。

我停止并重新启动 Nexus,现在问题消失了。

很遗憾,这个错误已被关闭为“无法修复”。

【讨论】:

    【解决方案2】:

    我不确定您为什么在 Maven POM 文件中使用 P2 存储库,但就从代理下载而言,这是正确的,并且适用于 4.4 和 3.6 URL。

    【讨论】:

    • 我正在尝试使用 Maven 构建 Eclipse 插件,这就是为什么我需要一个 p2 存储库来解决构建过程中的依赖关系。你用 Nexus 中的 p2 做什么?
    【解决方案3】:

    你应该检查nexus中的代理配置。

    配置的代理 url 和身份验证(如果提供)是否有效?

    【讨论】:

    • 是的,网址有效,请参阅我的问题。但是,接受的答案描述了问题的原因以及如何解决它,所以我不确定您为什么在 5 年后发布替代答案?
    • 在我的情况下,网址无效。因此,答案可能不适合您,而是适合其他有此问题的人。
    • 好吧,但这不是我的问题的有效答案,这就是为什么消息会出现即使网址绝对有效。
    • 这是对错误信息的回答。所以我认为它可能对正在搜索它的其他用户有用。当然,我没想到会解决你 5 年前的问题。
    猜你喜欢
    • 2011-12-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-23
    • 2020-11-20
    • 1970-01-01
    • 2013-01-04
    相关资源
    最近更新 更多