On saving a Docker repository configuration that has defined a port number, the nexus.log may contain a message such as this:
This indicates that the pool of threads that Eclipse Jetty draws from to preallocate threads for the new connector is too small to meet the required total. The default pool size is 200 threads.
When this error happens on saving Docker repository configuration, no other changes can be made to the Docker repository configuration.
This error can also happen on Nexus startup, where each Docker repository connector is started.
Nexus version 3.8.0+ is more likely to trigger this issue because in that version Eclipse Jetty was upgraded to 9.4.8 from 9.3.20, and the thread allocation strategy has changed slightly in that version.
You may be able to avoid the error by increasing the Jetty thread pool. Edit the configuration file (<nexus-app-dir>/etc/jetty/jetty.xml) and add a new maxThreads setter:
Caution: We suggest being conservative increasing the thread pool maxThreads - each new thread in the pool has the potential to increase workload inside of Nexus for concurrent request threads.
Restart Nexus to pick up changes to the file. Startup will fail if this file contains invalid XML.
Consider using a strategy where a reverse proxy in front of Nexus dynamically maps docker requests to Nexus Docker repositories. In this scenario, you will not need to specify port numbers and therefore new connectors, on your docker repos. Increasing the Jetty thread pool should not be required in this case: