4
votes

I added Eclipse P2 repository as proxies to my Nexus, but after checking the status for a while, the status turns to "Remote automatically blocked and unavailable". I configured for example the remote URL http://download.eclipse.org/eclipse/updates/4.4/ with repository type P2. Is that correct and should it work like that?

I thought I might have been blacklisted because of my many trials and errors, but when I use the same URL as repository in the POM, it works perfectly, even though its being fetched from the same IP. So there seems to be a problem with the Nexus proxy configuration. I configured the proxy like this:

  • Repository type: Proxy
  • Provider: P2 Update site
  • Format: P2
  • Policy: Mixed
  • Remote storage location: http://download.eclipse.org/eclipse/updates/3.6/
  • Download remote indexes: false
  • Auto blocking enabled: true
  • File content validation: true
  • Checksum policy: ignore
  • Allow file browsing: true
  • Include in search: false
  • Publish URL: true
  • Not found cache TTL: 1440 min
  • Artifact max age: -1 min
  • Metadata max age: 1440 min
  • Item max age: 1440 min
  • HTTP request settings: none configured

Is the problem within this configuration?

The log says just "timeout":

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
3
"Remote automatically blocked and unavailable" means there is a network connection problem to the remote. Check the nexus.log file, there will be more information on the failure there. The most likely cause of this problem is that the site is being blocked by your firewall.rseddon
This seems the most probable reason to me, too, but as stated above, I used the same URL from Maven which runs on the same machine, and it worked there. So I would guess this cannot be the problem.not2savvy

3 Answers

4
votes

I have found this issue https://issues.sonatype.org/browse/NEXUS-5466 which describes my problem quite well. The cause seems to be an internal problem in Nexus, not being able to allocate required internal resources.

I stopped and restarted Nexus, now the problem is gone.

It's a pity this bug has been closed as "won't fix".

-1
votes

I am not sure why you are using a P2 repository in a Maven POM file but in terms of downloading from the proxy this is correct and works for me with both the 4.4 as well as the 3.6 URL.

-1
votes

You should check the proxy configuration in nexus.

Is the configured proxy url and the authentication (if provided) valid?