Overview
Symptom
After upgrading a Nexus Repository instance, the Status page shows the following Pending Upgrade Tasks warning:
The following tasks have been queued by upgrades and have not completed: file.blobstore.metrics.datastore.migration, repository.pypi.generate-missing-sha256-checksums, secrets.migration, nexus.apikey.secrets, conan.version.install.task, component.normalize.version, repository.metrics.blob.size.copy, secrets.migration, component.normalize.version, repository.metrics.blob.size.copy, create.component.index.task, azure.soft.deleted.blobstore.migration, external.blobstore.metadata, trusted.certificates.migration. Upgrade task queue is triggered after startup, look for stuck tasks or task failures after startup
Cause
The upgrade task Repair - Migrate blob store metrics from external files to DB (file.blobstore.metrics.datastore.migration) has a failed status in the upgrade_tasks table, and the task was removed since version 3.72, causing a NullPointerException when Nexus attempts to restart it, which in turn blocks the rest of the upgrade task queue.
Applicability
This solution applies only when file.blobstore.metrics.datastore.migration is the first failing task. If it is not, do not follow these steps — raise a ticket with the Sonatype Support team instead.
Steps
Step 1 — Confirm the Error
Check the nexus.log after restarting the instance. Confirm the following error is present:
2026-07-14 13:53:17,330+0200 INFO [jetty-main-1] *SYSTEM org.sonatype.nexus.scheduling.internal.upgrade.datastore.QueuingUpgradeTaskScheduler - Running failed upgrade task Repair - Migrate blob store metrics from external files to DB
2026-07-14 13:53:17,330+0200 ERROR [jetty-main-1] *SYSTEM org.sonatype.nexus.scheduling.internal.upgrade.datastore.QueuingUpgradeTaskScheduler - Failed to restart upgrade task: Repair - Migrate blob store metrics from external files to DB
java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:902)
at org.sonatype.nexus.scheduling.TaskSchedulerImpl.scheduleTask(TaskSchedulerImpl.java:159)
at org.sonatype.nexus.scheduling.TaskSchedulerImpl.submit(TaskSchedulerImpl.java:129)
at org.sonatype.nexus.scheduling.internal.upgrade.datastore.QueuingUpgradeTaskScheduler.scheduleTask(QueuingUpgradeTaskScheduler.java:222)
at org.sonatype.nexus.scheduling.internal.upgrade.datastore.QueuingUpgradeTaskScheduler.lambda$1(QueuingUpgradeTaskScheduler.java:179)
at org.sonatype.nexus.common.cooperation2.ScopedCooperation2Support$ScopedCooperation2Builder.perform(ScopedCooperation2Support.java:88)
at org.sonatype.nexus.common.cooperation2.datastore.internal.CooperatingFuture.performCall(CooperatingFuture.java:126)
at org.sonatype.nexus.common.cooperation2.datastore.internal.CooperatingFuture.call(CooperatingFuture.java:68)
at org.sonatype.nexus.common.cooperation2.ScopedCooperation2Support$ScopedCooperation2Builder.cooperate(ScopedCooperation2Support.java:105)
at org.sonatype.nexus.scheduling.internal.upgrade.datastore.QueuingUpgradeTaskScheduler.maybeStartQueue_aroundBody0(QueuingUpgradeTaskScheduler.java:191)
at org.sonatype.nexus.scheduling.internal.upgrade.datastore.QueuingUpgradeTaskScheduler$AjcClosure1.run(QueuingUpgradeTaskScheduler.java:1)
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:164)
at org.sonatype.nexus.common.stateguard.GuardedAspect.lambda$0(GuardedAspect.java:39)
at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:298)
at org.sonatype.nexus.common.stateguard.GuardedAspect.around(GuardedAspect.java:37)
at org.sonatype.nexus.scheduling.internal.upgrade.datastore.QueuingUpgradeTaskScheduler.maybeStartQueue(QueuingUpgradeTaskScheduler.java:172)
at org.sonatype.nexus.scheduling.internal.upgrade.datastore.QueuingUpgradeTaskScheduler.on(QueuingUpgradeTaskScheduler.java:136)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:84)
at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:141)
at com.google.common.eventbus.Subscriber.lambda$dispatchEvent$0(Subscriber.java:70)
at org.sonatype.nexus.bootstrap.entrypoint.event.EventExecutor.execute(EventExecutor.java:220)
at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:67)
at com.google.common.eventbus.Dispatcher$ImmediateDispatcher.dispatch(Dispatcher.java:190)
at com.google.common.eventbus.EventBus.post(EventBus.java:262)
at org.sonatype.nexus.bootstrap.entrypoint.event.EventManagerImpl.post(EventManagerImpl.java:109)
at java.base/java.util.concurrent.ConcurrentLinkedQueue.forEachFrom(ConcurrentLinkedQueue.java:1037)
at java.base/java.util.concurrent.ConcurrentLinkedQueue.forEach(ConcurrentLinkedQueue.java:1054)
at org.sonatype.nexus.upgrade.datastore.internal.PostStartupUpgradeAuditor.doStart(PostStartupUpgradeAuditor.java:47)
at org.sonatype.nexus.common.stateguard.StateGuardLifecycleSupport.start_aroundBody0(StateGuardLifecycleSupport.java:71)
at org.sonatype.nexus.common.stateguard.StateGuardLifecycleSupport$AjcClosure1.run(StateGuardLifecycleSupport.java:1)
at org.aspectj.runtime.reflect.JoinPointImpl.proceed(JoinPointImpl.java:164)
at org.sonatype.nexus.common.stateguard.TransitionsAspect.lambda$0(TransitionsAspect.java:58)
at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:217)
at org.sonatype.nexus.common.stateguard.TransitionsAspect.aroundTransitionsMethod(TransitionsAspect.java:56)
at org.sonatype.nexus.common.stateguard.StateGuardLifecycleSupport.start(StateGuardLifecycleSupport.java:70)
at org.sonatype.nexus.extender.NexusLifecycleManager.startComponent(NexusLifecycleManager.java:151)
at org.sonatype.nexus.extender.NexusLifecycleManager.to(NexusLifecycleManager.java:107)
at org.sonatype.nexus.extender.internal.NexusServletContextListener.moveToPhase(NexusServletContextListener.java:122)
at org.sonatype.nexus.extender.internal.NexusServletContextListener.contextInitialized(NexusServletContextListener.java:77)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:1591)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.contextInitialized(ServletContextHandler.java:500)
at org.eclipse.jetty.ee10.servlet.ServletHandler.initialize(ServletHandler.java:676)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.startContext(ServletContextHandler.java:1325)
at org.eclipse.jetty.ee10.webapp.WebAppContext.startWebapp(WebAppContext.java:1358)
at org.eclipse.jetty.ee10.webapp.WebAppContext.startContext(WebAppContext.java:1316)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.lambda$doStart$0(ServletContextHandler.java:1051)
at org.eclipse.jetty.server.handler.ContextHandler$ScopedContext.call(ContextHandler.java:1494)
at org.eclipse.jetty.ee10.servlet.ServletContextHandler.doStart(ServletContextHandler.java:1048)
at org.eclipse.jetty.ee10.webapp.WebAppContext.doStart(WebAppContext.java:509)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:120)
at org.eclipse.jetty.server.Handler$Abstract.doStart(Handler.java:491)
at io.dropwizard.metrics.jetty12.AbstractInstrumentedHandler.doStart(AbstractInstrumentedHandler.java:149)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169)
at org.eclipse.jetty.server.Server.start(Server.java:643)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:120)
at org.eclipse.jetty.server.Handler$Abstract.doStart(Handler.java:491)
at org.eclipse.jetty.server.Server.doStart(Server.java:584)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.sonatype.nexus.bootstrap.entrypoint.jetty.JettyServer$JettyMainThread.run(JettyServer.java:367)Step 2 — Connect to the Database and Query the Failed Task
2.1 PostgreSQL
Connect using psql:
psql -d <database_name> -U <database_user> -h <host_optional> -p <port_optional>
Then run:
SELECT * FROM UPGRADE_TASKS WHERE STATUS='failed';2.2 H2 Database
2.2.1 — Check the H2 version
Generate a Support ZIP (Administration UI → Support → Support ZIP), unzip it, and navigate to:
<support-zip>/work/db_info.properties
Example content:
DatabaseProductName=H2
DatabaseProductVersion=2.4.240 (2025-09-22)2.2.2 — Back up the H2 database and verify the issue on the backup first
Run the Admin - Backup H2 Database task from the Nexus Tasks UI. Copy the backup to a safe location and unzip it to retrieve the nexus.mv.db file.
2.2.3 — Start the H2 web console
Download the H2 JAR matching your database version from https://www.h2database.com/html/download.html and start the console:
java -jar h2-2.x.x.jar -web -webPort 8082
Then open in your browser:
http://localhost:8082
2.2.4 — Connect to the backup database
Use the following connection settings:
Save Settings: Generic H2 (Embedded)
Driver: org.h2.Driver
JDBC URL: jdbc:h2:<backup-database-path>/nexus;MV_STORE=true;DATABASE_TO_UPPER=FALSE;DEFAULT_LOCK_TIMEOUT=600000
username: (leave blank)
password: (leave blank)Note: Because the database file is named nexus.mv.db, use /nexus at the end of the JDBC URL path. The H2 embedded database has a password—leave both fields blank.
2.2.5 — Query the failed task
SELECT * FROM UPGRADE_TASKS WHERE STATUS='failed';Step 3 — Verify the Failed Task and Note its ID
In the query result, confirm that the CONFIGURATION column contains:
"Repair - Migrate blob store metrics from external files to DB"
Note the ID value of this row.
Step 4 — Delete the Failed Task Entry
For H2 users: After verifying the issue on the backup database, take a new backup of the live database, stop the Nexus instance, connect to the H2 database used by the instance (not the backup), and then run the DELETE.
DELETE FROM UPGRADE_TASKS WHERE ID=<ID from Step 3>;Step 5 — Restart the Instance
Start Nexus Repository and monitor the logs for upgrade tasks completing successfully.
Step 6 — If the Warning Persists
Connect to the database again (for H2, stop the instance first) and run:
SELECT * FROM UPGRADE_TASKS;Confirm this returns 0 rows. Then restart the instance again and check the Status page.
If the Issue is Not Resolved
If the above steps do not resolve the problem, please raise a support ticket with Sonatype and include:
- A Support ZIP (Administration UI → Support → Support ZIP, with size limits unchecked)
- The relevant
nexus.logfrom the day of the upgrade - The output of
SELECT * FROM UPGRADE_TASKS;