我將Eclipse P2存儲庫作爲代理添加到我的Nexus中,但在檢查狀態一段時間後,狀態變爲「Remote automatically blocked and unavailable」。我配置了存儲庫類型爲P2的遠程URL http://download.eclipse.org/eclipse/updates/4.4/。這是否正確,它應該如何工作?Nexus一直對Eclipse P2遠程存儲庫說「遠程自動阻塞和不可用」
我想我可能因爲我的許多試驗和錯誤而被列入黑名單,但是當我在POM中使用與URL相同的URL時,即使它是從相同的IP獲取的,它也能正常工作。所以Nexus代理配置似乎存在問題。我配置的代理服務器是這樣的:
- 庫類型:代理
- 提供者:P2 Update站點
- 格式:P2
- 政策:混合
- 遠程存儲位置:http://download.eclipse.org/eclipse/updates/3.6/
- 下載遠程索引:false
- 啓用自動屏蔽:true
- 文件內容驗證:真
- 校驗策略:忽略
- 允許文件瀏覽:真
- 在搜索中包括:假
- 發佈網址:真
- 找不到緩存TTL:1440分鐘
- 神器最大年齡: -1分鐘
- 元最高年齡:1440分鐘
- 項目最大年齡:1440分鐘
- HTTP請求設置:無配置爲
此配置中是否存在問題?
日誌說只是「暫停」:
2015-05-25 19:40:51,544+0200 DEBUG [proxy-3-thread-389] smith remote.storage.outbound - [eclipse-3.6-try1] HEAD http://download.eclipse.org/eclipse/updates/3.6/ - 30,00 s 2015-05-25 19:40:51,544+0200 DEBUG [proxy-3-thread-389] smith org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage - HEAD method failed, will attempt GET. Exception: Connection pool timeout error while executing HEAD method [repositoryId="eclipse-3.6-try1", requestPath="/", remoteUrl="http://download.eclipse.org/eclipse/updates/3.6/"] org.sonatype.nexus.proxy.RemoteStorageTransportOverloadedException: Connection pool timeout error while executing HEAD method [repositoryId="eclipse-3.6-try1", requestPath="/", remoteUrl="http://download.eclipse.org/eclipse/updates/3.6/"] at org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage.doExecuteRequest(HttpClientRemoteStorage.java:598) ~[nexus-core-2.11.2-03.jar:2.11.2-03] at org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage.executeRequest(HttpClientRemoteStorage.java:515) ~[nexus-core-2.11.2-03.jar:2.11.2-03] at org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage.executeRequestAndRelease(HttpClientRemoteStorage.java:622) ~[nexus-core-2.11.2-03.jar:2.11.2-03] at org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage.checkRemoteAvailability(HttpClientRemoteStorage.java:371) ~[nexus-core-2.11.2-03.jar:2.11.2-03] at org.sonatype.nexus.proxy.storage.remote.AbstractHTTPRemoteRepositoryStorage.isReachable(AbstractHTTPRemoteRepositoryStorage.java:50) [nexus-core-2.11.2-03.jar:2.11.2-03] at org.sonatype.nexus.proxy.repository.AbstractProxyRepository.isRemoteStorageReachable(AbstractProxyRepository.java:1660) [nexus-core-2.11.2-03.jar:2.11.2-03] at org.sonatype.nexus.proxy.repository.AbstractProxyRepository$RemoteStatusUpdateCallable.call(AbstractProxyRepository.java:1634) [nexus-core-2.11.2-03.jar:2.11.2-03] at org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:44) [nexus-core-2.11.2-03.jar:2.11.2-03] at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.3.jar:1.2.3] at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.3.jar:1.2.3] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_31] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_31] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_31] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_31] Caused by: org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.leaseConnection(PoolingHttpClientConnectionManager.java:254) ~[httpclient-4.3.6.jar:4.3.6] at org.apache.http.impl.conn.PoolingHttpClientConnectionManager$1.get(PoolingHttpClientConnectionManager.java:231) ~[httpclient-4.3.6.jar:4.3.6] at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:173) ~[httpclient-4.3.6.jar:4.3.6] at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195) ~[httpclient-4.3.6.jar:4.3.6] at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86) ~[httpclient-4.3.6.jar:4.3.6] at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108) ~[httpclient-4.3.6.jar:4.3.6] at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) ~[httpclient-4.3.6.jar:4.3.6] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) ~[httpclient-4.3.6.jar:4.3.6] at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57) ~[httpclient-4.3.6.jar:4.3.6] at org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage.doExecuteRequest(HttpClientRemoteStorage.java:557) ~[nexus-core-2.11.2-03.jar:2.11.2-03] ... 13 common frames omitted
「遠程自動阻止和不可用」表示存在遠程網絡連接問題。檢查nexus.log文件,將會有更多關於失敗的信息。此問題最可能的原因是該站點被防火牆阻止。 – rseddon
這對我來說似乎也是最可能的原因,但如上所述,我使用來自運行在同一臺計算機上的Maven中的相同URL,並且它在那裏工作。所以我想這不會是問題。 – not2savvy