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

a docker connector port already in use prevents startup of repository manager

    Details

      Description

      When starting nexus, all Connector ports defined in docker repositories try to start after the main connectors start. If a configured docker port is already in use, then repository manager will not start.

      2019-03-27 15:14:33,975-0300 WARN  [FelixStartLevel] *SYSTEM org.sonatype.nexus.repository.docker.internal.DockerConnectorFacetImpl - Validation failed; 1 constraints violated:
        1) Port is already in use, type: class org.sonatype.nexus.validation.ConstraintViolationFactory$HelperBean, property: attributes.docker.httpPort, value: org.sonatype.nexus.validation.ConstraintViolationFactory$HelperBean@2044df35
      
      2019-03-27 15:14:33,988-0300 ERROR [FelixStartLevel] *SYSTEM org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl - Failed transition: NEW -> STARTED
      javax.validation.ConstraintViolationException: null
      	at org.sonatype.nexus.repository.manager.internal.RepositoryImpl.validate(RepositoryImpl.java:174)
      	at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.newRepository(RepositoryManagerImpl.java:189)
      	at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.restoreRepositories(RepositoryManagerImpl.java:264)
      	at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.doStart(RepositoryManagerImpl.java:246)
      	at org.sonatype.nexus.common.stateguard.StateGuardLifecycleSupport.start(StateGuardLifecycleSupport.java:67)
      	at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
      	at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:193)
      	at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:56)
      	at org.sonatype.nexus.extender.NexusLifecycleManager.startComponent(NexusLifecycleManager.java:168)
      	at org.sonatype.nexus.extender.NexusLifecycleManager.to(NexusLifecycleManager.java:100)
      	at org.sonatype.nexus.extender.NexusContextListener.frameworkEvent(NexusContextListener.java:195)
      	at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1429)
      	at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
      	at java.lang.Thread.run(Thread.java:748)
      2019-03-27 15:14:33,992-0300 ERROR [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusContextListener - Failed to start nexus
      javax.validation.ConstraintViolationException: null
      	at org.sonatype.nexus.repository.manager.internal.RepositoryImpl.validate(RepositoryImpl.java:174)
      	at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.newRepository(RepositoryManagerImpl.java:189)
      	at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.restoreRepositories(RepositoryManagerImpl.java:264)
      	at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.doStart(RepositoryManagerImpl.java:246)
      	at org.sonatype.nexus.common.stateguard.StateGuardLifecycleSupport.start(StateGuardLifecycleSupport.java:67)
      	at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
      	at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:193)
      	at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:56)
      	at org.sonatype.nexus.extender.NexusLifecycleManager.startComponent(NexusLifecycleManager.java:168)
      	at org.sonatype.nexus.extender.NexusLifecycleManager.to(NexusLifecycleManager.java:100)
      	at org.sonatype.nexus.extender.NexusContextListener.frameworkEvent(NexusContextListener.java:195)
      	at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1429)
      	at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
      	at java.lang.Thread.run(Thread.java:748)
      
      

      Expected

      The concern is while Nexus is stopped for a legitimate reason, some other process may legitimately use a port docker repo was using - including possibly the main connectors of Nexus itself. Then when Nexus tries to startup, you cannot start nexus to change the docker port to something else.

      Specific repository configuration should not prevent startup of an entire production server.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              plynch Peter Lynch
              Last Updated By:
              Michael Prescott Michael Prescott
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title