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

Stopping Nexus while a "Drop Inactive Staging Repositories" is running can lead to configuration inconsistencies

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.14.1
    • Fix Version/s: None
    • Component/s: Scheduled Tasks, Staging
    • Labels:
    • Story Points:
      5

      Description

      Saw this in a customer log. A "drop inactive staging repositories" task was started:

      2016-12-09 18:00:02 INFO [pxpool-1-thread-14] *TASK com.sonatype.nexus.staging.internal.task.DropInactiveRepositoriesTask - Inactive repositories selected to drop: [build-50727, build-50728, build-50729, build-50730, build-50731, build-50732, build-50733, build-50734, build-50735, build-50736, build-50737, build-50738, build-50739, build-50740, build-50741, build-50742, build-50743, build-50744, build-50745, build-50746, build-50747, build-50748, build-50749, build-50750, build-50751, build-50752, build-50753, build-50754, build-50755, build-50756, build-50757, build-50758, build-50759, build-50760, build-50761, build-50762, build-50763, build-50764, build-50765, build-50766, build-50767, build-50768, build-50769, build-50770, build-50771, build-50772, build-50773, build-50774, build-50775, build-50776, build-50777, build-50778, build-50779, build-50780, build-50781, build-50782, build-50783, build-50784, build-50785, build-50786, build-50787, build-50788, build-50789, build-50790, build-50791, build-50792, build-50793, build-50794, build-50795, build-50796, build-50797, build-50798, build-50799, build-50800, build-50801, build-50802, build-50803, build-50804, build-50805, build-50806, build-50807, build-50808, build-50809, build-50810, build-50811, build-50812, build-50813, build-50814, build-50815, build-50816, build-50817, build-50818, build-50819, build-50820, build-50821, build-50822, build-50823, build-50824, build-50825, build-50826, build-50827, build-50828, build-50829, build-50830, build-50831, build-50832, build-50833, build-50834, build-50835, build-50836, build-50837, build-50838, build-50839, build-50840, build-50841, build-50842, build-50843, build-50844, build-50845, build-50846, build-50847, build-50848, build-50849, build-50850, build-50851, build-50852, build-50853, build-50854, build-50855, build-50856, build-50857, build-50858, build-50859, build-50860, build-50861, build-50862, build-50863, build-50864, build-50865, build-50866, build-50867, build-50868, build-50869, build-50870, build-50871, build-50872, build-50873, build-50874, build-50875, build-50876, build-50877, build-50878, build-50879, build-50880, build-50881, build-50882, build-50883, build-50884, build-50885, build-50886, build-50887, build-50888]

      About a minute later Nexus was shut down:

      2016-12-09 18:01:07 INFO [WrapperListener_stop_runner] *SYSTEM org.sonatype.nexus.bootstrap.jsw.JswLauncher - Stopping with code: 0
      2016-12-09 18:01:07 INFO [WrapperListener_stop_runner] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - Stopping
      2016-12-09 18:01:07 INFO [WrapperListener_stop_runner] *SYSTEM org.sonatype.nexus.bootstrap.jetty.JettyServer - Stopping: org.eclipse.jetty.server.Server@695d7d60
      2016-12-09 18:01:07 INFO [WrapperListener_stop_runner] *SYSTEM org.eclipse.jetty.server.Server - Graceful shutdown InstrumentedSelectChannelConnector@0.0.0.0:8080
      2016-12-09 18:01:08 INFO [WrapperListener_stop_runner] *SYSTEM org.eclipse.jetty.server.Server - Graceful shutdown o.e.j.w.WebAppContext{/nexus,file\:/usr/local/nexus-professional-2.12.0-01/nexus/},/usr/local/nexus-professional-2.12.0-01/nexus

      During shut down there are quite a few exceptions from the thread running the drop task.

      And in the end the thread dropping the repositories is the last thing running, this is the end of the log:

      2016-12-09 18:01:17 INFO [pxpool-1-thread-19] *TASK org.sonatype.nexus.configuration.ModelUtils - Saving model /usr/local/sonatype-work/nexus/conf/staging.xml
      2016-12-09 18:01:17 WARN [pxpool-1-thread-19] *TASK com.sonatype.nexus.staging.internal.task.RepositoryDropTask - One or more operations failed; aborting: com.sonatype.nexus.staging.StagingConfigurationException: org.sonatype.nexus.proxy.NoSuchRepositoryException: Repository with ID="build-50745" not found
      2016-12-09 18:01:17 INFO [pxpool-1-thread-19] *TASK org.sonatype.nexus.configuration.ModelUtils - Saving model /usr/local/sonatype-work/nexus/conf/staging.xml
      2016-12-09 18:01:18 INFO [pxpool-1-thread-19] *TASK org.sonatype.nexus.configuration.ModelUtils - Saving model /usr/local/sonatype-work/nexus/conf/staging.xml
      2016-12-09 18:01:18 INFO [pxpool-1-thread-19] *TASK org.sonatype.nexus.configuration.ModelUtils - Saving model /usr/local/sonatype-work/nexus/conf/staging.xml
      2016-12-09 18:01:18 INFO [pxpool-1-thread-19] *TASK org.sonatype.nexus.configuration.ModelUtils - Saving model /usr/local/sonatype-work/nexus/conf/staging.xml
      2016-12-09 18:01:18 INFO [pxpool-1-thread-19] *TASK org.sonatype.nexus.configuration.ModelUtils - Saving model /usr/local/sonatype-work/nexus/conf/staging.xml
      2016-12-09 18:01:18 INFO [pxpool-1-thread-19] *TASK org.sonatype.nexus.configuration.ModelUtils - Saving model /usr/local/sonatype-work/nexus/conf/staging.xml
      2016-12-09 18:01:18 INFO [pxpool-1-thread-19] *TASK org.sonatype.nexus.configuration.ModelUtils - Saving model /usr/local/sonatype-work/nexus/conf/staging.xml
      2016-12-09 18:01:18 INFO [pxpool-1-thread-19] *TASK org.sonatype.nexus.configuration.ModelUtils - Saving model /usr/local/sonatype-work/nexus/conf/staging.xml
      2016-12-09 18:01:18 INFO [pxpool-1-thread-19] *TASK org.sonatype.nexus.configuration.ModelUtils - Saving model /usr/local/sonatype-work/nexus/conf/staging.xml
      2016-12-09 18:01:19 INFO [pxpool-1-thread-19] *TASK org.sonatype.nexus.configuration.ModelUtils - Saving model /usr/local/sonatype-work/nexus/conf/staging.xml
      2016-12-09 18:01:19 INFO [pxpool-1-thread-19] *TASK org.sonatype.nexus.configuration.ModelUtils - Saving model /usr/local/sonatype-work/nexus/conf/staging.xml
      2016-12-09 18:01:19 INFO [pxpool-1-thread-19] *TASK org.sonatype.nexus.configuration.ModelUtils - Saving model /usr/local/sonatype-work/nexus/conf/staging.xml
      2016-12-09 18:01:19 INFO [pxpool-1-thread-19] *TASK org.sonatype.nexus.configuration.ModelUtils - Saving model /usr/local/sonatype-work/nexus/conf/staging.xml
      2016-12-09 18:01:19 INFO [pxpool-1-thread-19] *TASK org.sonatype.nexus.configuration.ModelUtils - Saving model /usr/local/sonatype-work/nexus/conf/staging.xml
      2016-12-09 18:01:19 INFO [pxpool-1-thread-19] *TASK org.sonatype.nexus.configuration.ModelUtils - Saving model /usr/local/sonatype-work/nexus/conf/staging.xml
      2016-12-09 18:01:19 INFO [pxpool-1-thread-19] *TASK org.sonatype.nexus.configuration.ModelUtils - Saving model /usr/local/sonatype-work/nexus/conf/staging.xml
      2016-12-09 18:01:19 INFO [pxpool-1-thread-19] *TASK org.sonatype.nexus.configuration.ModelUtils - Saving model /usr/local/sonatype-work/nexus/conf/staging.xml
      2016-12-09 18:01:19 INFO [pxpool-1-thread-19] *TASK org.sonatype.nexus.configuration.ModelUtils - Saving model /usr/local/sonatype-work/nexus/conf/staging.xml
      2016-12-09 18:01:20 INFO [pxpool-1-thread-19] *TASK org.sonatype.nexus.configuration.ModelUtils - Saving model /usr/local/sonatype-work/nexus/conf/staging.xml

      After restart there are numerous inconsistencies between repositories in the nexus.xml and staging.xml files. This resulted in the log getting enormous (20Gb), due to warnings, and also left a large number of staging repositories in a state where they couldn't be dropped.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            rseddon Rich Seddon
            Last Updated By:
            Peter Lynch
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title