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

repository healthcheck configuration capability permanently in invalid state after repository manager restart

    XMLWordPrintable

    Details

      Description

      Where the HealthCheck: Configuration capability is enabled, Nexus 3.13.0 may produce the following ERROR messages ( mentioned repository id will vary):

      On shutdown:

      2018-08-07 11:59:23,386+0300 INFO [Thread-6] *SYSTEM org.sonatype.nexus.bootstrap.osgi.BootstrapListener - Destroying
      2018-08-07 11:59:23,400+0300 INFO [Thread-6] *SYSTEM org.sonatype.nexus.extender.NexusContextListener - Uptime: 13 hours, 3 minutes, 45 seconds and 751 milliseconds
      2018-08-07 11:59:23,400+0300 INFO [Thread-6] *SYSTEM org.sonatype.nexus.extender.NexusLifecycleManager - Stop TASKS
      2018-08-07 11:59:23,409+0300 INFO [Thread-6] *SYSTEM org.sonatype.nexus.quartz.internal.QuartzSchedulerSPI - Scheduler put into stand-by mode
      2018-08-07 11:59:23,462+0300 INFO [Thread-6] *SYSTEM org.sonatype.nexus.extender.NexusLifecycleManager - Stop CAPABILITIES
      2018-08-07 11:59:23,473+0300 ERROR [Thread-6] *SYSTEM org.sonatype.nexus.internal.capability.DefaultCapabilityReference - Could not passivate capability HealthCheckCapability{id='f898b3903cb99c590e4a5c192d25701d', config=HealthCheckConfiguration{configuredForAll=false, useTrustStore=true}} (f898b3903cb99c590e4a5c192d25701d)
      org.sonatype.nexus.common.stateguard.InvalidStateException: Invalid state: STOPPED; allowed: [STARTED]
      at org.sonatype.nexus.common.stateguard.StateGuard._ensure(StateGuard.java:115)
      at org.sonatype.nexus.common.stateguard.StateGuard.access$1(StateGuard.java:108)
      at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:269)
      at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53)
      at com.sonatype.nexus.plugins.healthcheck.internal.capability.HealthCheckCapability.onPassivate(HealthCheckCapability.java:67)
      at com.sonatype.nexus.plugins.healthcheck.internal.capability.HealthCheckCapability.onPassivate(HealthCheckCapability.java:1)
      at org.sonatype.nexus.capability.CapabilitySupport.onPassivate(CapabilitySupport.java:194)
      at org.sonatype.nexus.internal.capability.DefaultCapabilityReference$ActiveState.passivate(DefaultCapabilityReference.java:643)
      at org.sonatype.nexus.internal.capability.DefaultCapabilityReference.passivate(DefaultCapabilityReference.java:230)
      at org.sonatype.nexus.internal.capability.ActivationConditionHandler.handle(ActivationConditionHandler.java:73)
      

      On startup:

      2018-08-07 12:00:07,280+0300 INFO [FelixStartLevel] *SYSTEM org.sonatype.nexus.extender.NexusLifecycleManager - Start CAPABILITIES
      2018-08-07 12:00:07,325+0300 INFO [PeriodicLicenseValidatorImpl-timer] *SYSTEM com.sonatype.nexus.licensing.ext.internal.NexusLicenseChangeListener - License changed; valid: true
      2018-08-07 12:00:08,039+0300 INFO [FelixStartLevel] *SYSTEM com.sonatype.nexus.clm.internal.capability.FirewallAuditCapability - Quarantine enabled on repository: npm-proxy
      2018-08-07 12:00:08,076+0300 ERROR [FelixStartLevel] *SYSTEM org.sonatype.nexus.internal.capability.DefaultCapabilityReference - Could not activate capability HealthCheckCapability{id='f898b3903cb99c590e4a5c192d25701d', config=HealthCheckConfiguration{configuredForAll=false, useTrustStore=true}} (f898b3903cb99c590e4a5c192d25701d)
      org.sonatype.nexus.common.stateguard.InvalidStateException: Invalid state: NEW; allowed: [STARTED]
      at org.sonatype.nexus.common.stateguard.StateGuard._ensure(StateGuard.java:115)
      at org.sonatype.nexus.common.stateguard.StateGuard.access$1(StateGuard.java:108)
      at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:269)
      at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53)
      at com.sonatype.nexus.plugins.healthcheck.internal.capability.HealthCheckCapability.onActivate(HealthCheckCapability.java:62)
      at com.sonatype.nexus.plugins.healthcheck.internal.capability.HealthCheckCapability.onActivate(HealthCheckCapability.java:1)
      at org.sonatype.nexus.capability.CapabilitySupport.onActivate(CapabilitySupport.java:183)
      at org.sonatype.nexus.internal.capability.DefaultCapabilityReference$EnabledState.activate(DefaultCapabilityReference.java:587)
      at org.sonatype.nexus.internal.capability.DefaultCapabilityReference.activate(DefaultCapabilityReference.java:217)
      at org.sonatype.nexus.internal.capability.ActivationConditionHandler.handle(ActivationConditionHandler.java:65)
      

      Problem

      Stopping the Nexus repository manager process will leave the HealthCheck: Configuration capability in an invalid state.

      Existing health-check tasks for proxy repositories are left intact, and will still run, but if the tasks happen to have been deleted then the capability wouldn't then re-add them on startup whereas it previously would.

      Cause

      Regression, may have been introduced by changes from --NEXUS-13121--.

      Temporary Workaround Which does not Survive Restarts

      1. Via the UI, delete the existing health check capability - System -> Capabilities --> 'Health Check: Configuration' --> 'Delete'.=
      2. Reconfigure the health check capability - System --> Capabilities --> 'Create Capability' --> 'Health Check: Configuration' (check 'Use the Nexus truststore' option to match previous config.). 

      The above should then (re)enable the health check task for all your current proxy repos. However on the next restart, you will require repeating the steps to remove the invalid state.

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jtom Joe Tom
              Reporter:
              plynch Peter Lynch
              Last Updated By:
              Peter Lynch
              Team:
              NXRM - Cypher
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title