A proxy repository is not working, status says "Remote Automatically Blocked and Unavailable"

This message means that nexus has temporarily blocked access to the proxy's remote.

When a request comes into a group repository in Nexus the server has to traverse all of the repositories in the group to find the member repository which can service the request.  In the case of proxy repositories, Nexus needs to periodically make requests to the remote to see if the requested item exists.

If a remote is responding very slowly this can cause incoming requests to pile up waiting for this one particular remote to respond.  In extreme cases so many requests can pile up that the inbound request thread pool becomes exhausted, rendering the server unusable.

To solve this problem we added the auto-block feature.  If a remote does not respond within the read timeout setting (default is 20 seconds, with 3 retries) it is auto-blocked.  Once this happens, nexus will check the health of the remote periodically. It starts checking every 10 seconds, then increases using a Fibonacci sequence until it is checking every 60 minutes.  As soon as the remote can be reached again it is automatically unblocked.

If you have a repository which is in this state check the nexus.log file.  You will almost certainly find that a network error is occurring, and Nexus can't reach the remote.

There are two occasions where you may need to make some adjustments.  

If you have a server that is responding slowly, but still responding, you can try increasing the "Request Timeout" under "HTTP Request Settings (optional)" in the proxy's configuration. If you are encountering this problem, a good starting point is a timeout of 60 seconds, with a retry count of 3.

The other case (which is rare) is that Nexus is not properly able to detect the health of the remote.  This can happen if HEAD requests to "/" are denied and the remote is not a well known type of server (such as another Nexus instance).  If the remote is auto-blocked, and you can't reach "/" on the remote, but you can reach sub-directories then you will need to disable the auto-block feature in your proxy repository's configuration.

Have more questions? Submit a request

2 Comments

  • 0
    Avatar
    Walter Sigel

    Before increase the time, i prefere to change the group sequency:

    Put the slow proxy repositories at the bottom of the group repository's ordered list of repositories.   This will ensure that most artifact requests do not go to these proxy's. (Answer ffrom Rich Seddon in your support channel)

  • 0
    Avatar
    Peter Lynch

    We are closing this article for comments.

    If you have a support license, please contact us by submitting a support ticket.

    If you do not have a support license, please use our Nexus Users List or our other free support resources.

Article is closed for comments.
Powered by Zendesk