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

staging.xml validation can orphan nexus.xml repositories during startup

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.11.2
    • Fix Version/s: 2.11.3
    • Component/s: Staging
    • Labels:
      None
    • Story Points:
      1
    • Sprint:
      Sprint 42

      Description

      Under certain startup conditions, Nexus staging configuration validation can orphan staging repositories such that they are no longer visible in the Nexus Staging Repositories UI. The repository storage directory will still exist for the repository, and the orphaned staging repository(s) will still be visible via Repositories -> Nexus Managed Repositories list.

      Example log excerpts on startup where staging validation removed a staging repository raid_staging-1197 because it was not yet added to the internal registry of repositories:

      2015-05-06 13:14:38,521+0100 INFO  [jetty-main-1] *SYSTEM org.sonatype.nexus.NxApplication - 
      -------------------------------------------------
      
      Initializing Sonatype Nexus Professional 2.11.2-06
      
      -------------------------------------------------
      2015-05-06 13:14:38,521+0100 INFO  [jetty-main-1] *SYSTEM org.sonatype.nexus.NxApplication - Activating locally installed plugins...
      
      ...
      
      2015-05-06 13:15:51,460+0100 INFO  [jetty-main-1] *SYSTEM org.sonatype.nexus.proxy.registry.DefaultRepositoryRegistry - Added repository "dit_staging_profile-1281 (staging: closed)" [id=dit_staging_profile-1281][contentClass=Maven2][mainFacet=org.sonatype.nexus.proxy.maven.MavenHostedRepository]
      2015-05-06 13:15:51,502+0100 INFO  [jetty-main-1] *SYSTEM org.sonatype.nexus.proxy.registry.DefaultRepositoryRegistry - Added repository "dit_staging_profile-1282 (staging: closed)" [id=dit_staging_profile-1282][contentClass=Maven2][mainFacet=org.sonatype.nexus.proxy.maven.MavenHostedRepository]
      2015-05-06 13:15:51,516+0100 INFO  [proxy-3-thread-1] *SYSTEM org.sonatype.nexus.proxy.storage.remote.httpclient.HttpClientRemoteStorage - Initializing remote transport for proxy repository "US_Nexus_Dev" [id=US_Nexus_Dev]...
      2015-05-06 13:15:51,527+0100 INFO  [RepositoryStatusChecker-US_Nexus_Dev] *SYSTEM org.sonatype.nexus.proxy.maven.maven2.M2Repository-US_Nexus_Dev - Next attempt to auto-unblock the "US_Nexus_Dev" (id=US_Nexus_Dev) repository by checking its remote peer health will occur in 5 minutes.
      2015-05-06 13:15:51,545+0100 INFO  [jetty-main-1] *SYSTEM org.sonatype.nexus.proxy.registry.DefaultRepositoryRegistry - Added repository "US_Nexus_Dev" [id=US_Nexus_Dev][contentClass=Maven2][mainFacet=org.sonatype.nexus.proxy.maven.MavenProxyRepository]
      2015-05-06 13:15:51,816+0100 INFO  [jetty-main-1] *SYSTEM org.sonatype.nexus.proxy.registry.DefaultRepositoryRegistry - Added repository "US_Nexus_Eval" [id=US_Nexus_Eval][contentClass=Maven2][mainFacet=org.sonatype.nexus.proxy.maven.MavenProxyRepository]
      2015-05-06 13:15:51,820+0100 INFO  [jetty-main-1] *SYSTEM org.sonatype.nexus.plugins.ruby.NexusRubygemsGatewayProvider - Creating JRuby RubygemsGateway
      2015-05-06 13:15:52,629+0100 INFO  [RepositoryStatusChecker-US_Nexus_Dev] *SYSTEM org.sonatype.nexus.proxy.maven.maven2.M2Repository-US_Nexus_Dev - Next attempt to auto-unblock the "US_Nexus_Dev" (id=US_Nexus_Dev) repository by checking its remote peer health will occur in 10 minutes.
      2015-05-06 13:15:52,661+0100 INFO  [proxy-3-thread-1] *SYSTEM org.sonatype.security.model.source.FileModelConfigurationSource - Loading security configuration from: /var/sonatype-work/nexus/conf/security.xml
      2015-05-06 13:15:52,701+0100 DEBUG [proxy-3-thread-1] *SYSTEM com.sonatype.nexus.index.rest.publisher.security.CustomMetadataSecurityResource - Loading static security configuration: bundle://40.0:1/META-INF/nexus-custom-metadata-plugin-security.xml
      2015-05-06 13:15:52,707+0100 DEBUG [proxy-3-thread-1] *SYSTEM com.sonatype.nexus.staging.internal.security.StagingStaticSecurityResource - Loading static security configuration: bundle://34.0:1/META-INF/nexus-staging-plugin-security.xml
      2015-05-06 13:15:52,778+0100 DEBUG [proxy-3-thread-1] *SYSTEM com.sonatype.nexus.staging.internal.persist.StagingConfigurationSource - Loading configuration: /var/sonatype-work/nexus/conf/staging.xml
      2015-05-06 13:15:52,779+0100 INFO  [proxy-3-thread-1] *SYSTEM org.sonatype.nexus.configuration.ModelUtils - Loading model /var/sonatype-work/nexus/conf/staging.xml
      2015-05-06 13:15:54,014+0100 WARN  [proxy-3-thread-1] *SYSTEM com.sonatype.nexus.staging.internal.persist.DefaultStagingConfiguration - Validation warning:  o repositories - Staging Repository 'raid_staging-1197' is not a valid repository, removing from configuration.
      2015-05-06 13:15:54,024+0100 DEBUG [proxy-3-thread-1] *SYSTEM com.sonatype.nexus.staging.internal.security.SecurityConfigurationMutator - Building initial configuration
      2015-05-06 13:15:54,275+0100 INFO  [proxy-3-thread-1] *SYSTEM org.sonatype.nexus.configuration.ModelUtils - Loading model /var/sonatype-work/nexus/conf/ldap.xml
      2015-05-06 13:15:54,332+0100 WARN  [proxy-3-thread-1] *SYSTEM com.sonatype.security.ldap.connector.FailoverLdapConnector - Problem connecting to LDAP server: org.sonatype.security.ldap.dao.LdapDAOException: Failed to retrieve ldap information for users.
      2015-05-06 13:15:54,356+0100 INFO  [proxy-3-thread-1] *SYSTEM org.sonatype.nexus.configuration.ModelUtils - Loading model /var/sonatype-work/nexus/conf/crowd-plugin.xml
      2015-05-06 13:15:54,359+0100 INFO  [proxy-3-thread-1] *SYSTEM org.sonatype.nexus.notification.EmailCarrier - Sending out e-mail notification to notification group "autoBlockTarget" (total of 2 recipients).
      2015-05-06 13:15:54,360+0100 INFO  [proxy-3-thread-1] *SYSTEM org.sonatype.micromailer.imp.DefaultEMailer -   Handling mail request NX1430914552636
      2015-05-06 13:15:54,366+0100 INFO  [pool-2-thread-1] *SYSTEM org.sonatype.nexus.velocity.VelocityEngineProvider - Creating Nexus VelocityEngine
      2015-05-06 13:16:04,299+0100 INFO  [jetty-main-1] *SYSTEM org.sonatype.nexus.proxy.registry.DefaultRepositoryRegistry - Added repository "RubyGems" [id=RubyGems][contentClass=Rubygems][mainFacet=org.sonatype.nexus.plugins.ruby.hosted.HostedRubyRepository]
      
      ....
      
      2015-05-06 13:16:45,264+0100 INFO  [jetty-main-1] *SYSTEM org.sonatype.nexus.proxy.registry.DefaultRepositoryRegistry - Added repository "raid_staging-1197 (staging: closed)" [id=raid_staging-1197][contentClass=Maven2][mainFacet=org.sonatype.nexus.proxy.maven.MavenHostedRepository]
      
      

      Symptoms

      After a Nexus restart, some staging repositories are no longer visible in the staging repositories list.

      Log messages similar to this will be present in nexus.log:

      com.sonatype.nexus.staging.internal.persist.DefaultStagingConfiguration - Validation warning: o repositories - Staging Repository 'raid_staging-1197' is not a valid repository, removing from configuration.

      Workaround

      There is no workaround to prevent this race condition.

      How to Recover Orphaned Repositories.

      Repositories can be recovered by Sonatype Support. Affected users should open a support ticket at https://support.sonatype.com along with a Nexus support bundle.

        Attachments

          Activity

            People

            Assignee:
            jtom Joe Tom
            Reporter:
            plynch Peter Lynch
            Last Updated By:
            Peter Lynch
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title