【发布时间】: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,它在同一台机器上运行,并且在那里工作。所以我猜这不是问题。