Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-16565

IllegalStateException Insufficient configured threads from a docker repository connector configuration


    • 3



      On saving a Docker repository configuration that has defined a port number, the nexus.log may contain a message such as this:

      WARN [jetty-main-1] *SYSTEM org.sonatype.nexus.bootstrap.jetty.ConnectorManager - Could not start connector: DockerConnectorConfiguration\{repositoryName=xxx-xxxx-docker, scheme=http, port=10059} java.lang.IllegalStateException: Insufficient configured threads: required=203 < max=200 for QueuedThreadPool@qtp915926290\{STARTED,8<=15<=

      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.

      Nexus Repository Manager 3.8.0 Release Notes
      Eclipse Jetty 9.4.8 thread allocation

      Short Term Workaround

      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:

        <Arg name="threadpool">
          <New id="threadpool" class="org.sonatype.nexus.bootstrap.jetty.InstrumentedQueuedThreadPool">
            <Set name="maxThreads">400</Set>

      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.

      Long Term Workaround

      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:



        Issue Links



              Unassigned Unassigned
              plynch Peter Lynch
              Maksym Kalachov [X] Maksym Kalachov [X] (Inactive)
              Nexus - Formats
              0 Vote for this issue
              9 Start watching this issue