The copy of the Nexus 3.78.2-04 environment fails to start

I need to make a test copy of my Nexus Repository Manager
(I want to test upgrading to a new version and conduct other tests)

I have:

1. A virtual machine with Nexus 3.78.2-04
2. 5 BLOB Store volumes
3. An external PostgreSQL instance with the Nexus database

I create a copy of the virtual machine, a copy of the BLOB volumes, and a copy of the Nexus database.
I configure the nexus.properties file to use the new database instance.
I start Nexus and get this error:

INFO [jetty-main-1] *SYSTEM org.sonatype.nexus.extender.guice.NexusLifecycleManager - Start RESTORE
INFO [jetty-main-1] *SYSTEM org.sonatype.nexus.extender.guice.NexusLifecycleManager - Start UPGRADE
ERROR [jetty-main-1] *SYSTEM org.sonatype.nexus.upgrade.datastore.internal.UpgradeManagerImpl - Missing migrations: [SearchCapabilityStep_2_16, TrustedCertificatesMigrationStep_2_17, NodeHeartBeatMigrationStep_2_17_1, ConanCleanupMigrationStep_2_18]
ERROR [jetty-main-1] *SYSTEM org.sonatype.nexus.upgrade.datastore.internal.UpgradeManagerImpl - Missing migrations: [SearchCapabilityStep_2_16, TrustedCertificatesMigrationStep_2_17, NodeHeartBeatMigrationStep_2_17_1, ConanCleanupMigrationStep_2_18]
ERROR [jetty-main-1] *SYSTEM org.sonatype.nexus.upgrade.datastore.internal.UpgradeServiceImpl - Failed transition: NEW -> STARTED
org.sonatype.nexus.upgrade.datastore.UpgradeException: The database appears to be from a later version of Nexus Repository

Where does this error come from? Why doesn’t this issue occur in PROD — same Nexus version, same configuration, same database?

When I check the table flyway_schema_history via psql, I see these rows:

77 | 2.16 | SearchCapabilityStep_2_16 | JDBC | org.sonatype.nexus.upgrade.datastore.internal.NexusJavaMigration | | nexus | 2026-02-12 19:21:32.094611 | 108 | t
78 | 2.17 | TrustedCertificatesMigrationStep_2_17 | JDBC | org.sonatype.nexus.upgrade.datastore.internal.NexusJavaMigration | | nexus | 2026-02-12 19:21:32.210998 | 169 | t
79 | 2.17.1 | NodeHeartBeatMigrationStep_2_17_1 | JDBC | org.sonatype.nexus.upgrade.datastore.internal.NexusJavaMigration | | nexus | 2026-02-12 19:21:32.385536 | 1 | t
80 | 2.18 | ConanCleanupMigrationStep_2_18 | JDBC | org.sonatype.nexus.upgrade.datastore.internal.NexusJavaMigration | | nexus | 2026-02-12 19:21:32.39139 | 6 | t

These migrations are not new (none are above version 3.78). Why is the error occurring?

According to what I found online:

SearchCapabilityStep_2_16 — Nexus 3.74.0
Introduced in March 2024
Part of search capability updates

TrustedCertificatesMigrationStep_2_17 — Nexus 3.75.0
April 2024
Migration for the trusted certificates system

NodeHeartBeatMigrationStep_2_17_1 — Nexus 3.75.1
April–May 2024
Update to the cluster node heartbeat mechanism

ConanCleanupMigrationStep_2_18 — Nexus 3.76.0
May–June 2024
Cleanup improvements for the Conan package manager

Your database appears to be ahead of Nexus 3.78.2. The “Missing migrations” error means the migration Java classes are missing from your Nexus version — not from the database. Your database has records of migrations (2.16–2.18) that were applied by a newer Nexus version, but 3.78.2 doesn’t contain those classes. On startup, Nexus validates that every recorded migration has a corresponding class in its codebase and fails when it can’t find them.

Thank you for the response.

  1. Yes, I fully understand that, but on PROD, the same Nexus version is running with the same database and starts up without any issues. If that were the case, PROD should also fail to start with a similar error! How is Nexus currently starting there?
  2. How could the database have a newer version if I have never upgraded it and was only planning to do so now?
  3. And which version of Nexus introduced support for these migration types?
    SearchCapabilityStep_2_16
    TrustedCertificatesMigrationStep_2_17
    NodeHeartBeatMigrationStep_2_17_1
    ConanCleanupMigrationStep_2_18
  1. Check the PROD database migration history
    Run this query on the PROD database to verify if these migrations exist:
  SELECT version, description, installed_on                                                                                                                           
  FROM flyway_schema_history                                                                                                                                          
  WHERE version IN ('2.16', '2.17', '2.17.1', '2.18')                                                                                                                 
  ORDER BY version;
  1. Check if your test environment ever ran Nexus 3.84+
    If you (or anyone) temporarily started Nexus 3.84+ against this database it would have executed these migrations and recorded them in
    flyway_schema_history. This would cause the current error when trying to run an older version.
  2. Migration version timeline
    Upon inspection of the codebase, these migrations were introduced in the following Nexus versions:
    - SearchCapabilityStep_2_16 → Nexus 3.80.0
    - TrustedCertificatesMigrationStep_2_17 → Nexus 3.81.0
    - NodeHeartBeatMigrationStep_2_17_1 → Nexus 3.83.1
    - ConanCleanupMigrationStep_2_18 → Nexus 3.84.0

These migrations do not exist in Nexus 3.78.x or earlier.

I’m observing some very strange things:

The source database from PROD does not contain these migrations:

 2.10    | MalwareRemediatorMigrationStep_2_10                     | 2025-03-26 19:34:12.391332
 2.11    | BlobstoreSecretsMigrationStep_2_11                      | 2025-03-26 19:34:12.401848
 2.12    | HuggingFaceProxyDatabaseMigrationStep_2_12              | 2025-03-26 19:34:12.409103
 2.13    | CoordinateMigrationStep_2_13                            | 2025-03-26 19:34:12.414425
 2.14    | RemoveDistributedCooperationMigrationStep_2_14          | 2025-03-26 19:34:12.421736
 2.15    | RemoveLog4JVisualizer_2_15                              | 2025-03-26 19:34:12.427006
         | AzureBlobStoreMetricsMigrationStep                      | 2025-03-26 19:34:12.433933
         | CargoRealmMigrationStep                                 | 2025-03-26 19:34:12.445771
         | ComponentNormalizedVersionMigrationStep                 | 2025-03-26 19:34:13.100327
         | ComposerRemovePackagesUpgradeStep                       | 2025-03-26 19:34:13.184128
         | ConanVersionInstallDatabaseMigrationStep                | 2025-03-26 19:34:13.188818
         | CopyAssetBlobSizeMigrationStep                          | 2025-03-26 19:34:13.19446
         | DistributedEventsUpgrade                                | 2025-03-26 19:34:13.200186
         | FileBlobStoreMetricsMigrationStep                       | 2025-03-26 19:35:07.293328
         | GoogleBlobStoreMetricsMigrationStep                     | 2025-03-26 19:35:07.380683
         | NpmPCCSAndFirewallAuditCapabilityOutOfSyncMigrationStep | 2025-03-26 19:35:07.390015
         | NugetV2ComponentCountCleanupMigrationStep               | 2025-03-26 19:35:07.404867
         | PypiGenerateMissingSha256ChecksumsMigrationStep         | 2025-03-26 19:35:07.41218
         | RubygemsHashAndAttributesMigrationStep                  | 2025-03-26 19:35:07.423086
         | RubygemsHostedMarkDirtyGemInfoMigrationStep             | 2025-03-26 19:35:07.428415
         | S3BlobStoreMetricsMigrationStep                         | 2025-03-26 19:35:07.433919
         | Z_002_ApiKeySecretsDatabaseMigrationStep                | 2025-03-26 19:35:07.441775
         | NodeHeartbeatDatabaseMigrationStep                      | 2025-03-27 14:25:56.962545
         | ReplicationUseTrustStoreDatabaseMigrationStep           | 2025-03-27 14:25:56.981074
         | SamlUserDatabaseMigrationStep                           | 2025-03-27 14:25:56.990907
         | UserTokenDatabaseMigrationStep                          | 2025-03-27 14:25:56.996733
         | UserTokenToApiKeyMigrationStep                          | 2025-03-27 14:25:57.02031
         | Z_001_UserTokenLdapSamlDualRealmUserTokensMigrationStep | 2025-03-27 14:25:57.025956
(76 rows)

But after making a backup of the database and restoring it on another instance (without starting Nexus), I see this:

 2.10    | MalwareRemediatorMigrationStep_2_10                     | 2025-03-26 19:34:12.391332
 2.11    | BlobstoreSecretsMigrationStep_2_11                      | 2025-03-26 19:34:12.401848
 2.12    | HuggingFaceProxyDatabaseMigrationStep_2_12              | 2025-03-26 19:34:12.409103
 2.13    | CoordinateMigrationStep_2_13                            | 2025-03-26 19:34:12.414425
 2.14    | RemoveDistributedCooperationMigrationStep_2_14          | 2025-03-26 19:34:12.421736
 2.15    | RemoveLog4JVisualizer_2_15                              | 2025-03-26 19:34:12.427006
         | AzureBlobStoreMetricsMigrationStep                      | 2025-03-26 19:34:12.433933
         | CargoRealmMigrationStep                                 | 2025-03-26 19:34:12.445771
         | ComponentNormalizedVersionMigrationStep                 | 2025-03-26 19:34:13.100327
         | ComposerRemovePackagesUpgradeStep                       | 2025-03-26 19:34:13.184128
         | ConanVersionInstallDatabaseMigrationStep                | 2025-03-26 19:34:13.188818
         | CopyAssetBlobSizeMigrationStep                          | 2025-03-26 19:34:13.19446
         | DistributedEventsUpgrade                                | 2025-03-26 19:34:13.200186
         | FileBlobStoreMetricsMigrationStep                       | 2025-03-26 19:35:07.293328
         | GoogleBlobStoreMetricsMigrationStep                     | 2025-03-26 19:35:07.380683
         | NpmPCCSAndFirewallAuditCapabilityOutOfSyncMigrationStep | 2025-03-26 19:35:07.390015
         | NugetV2ComponentCountCleanupMigrationStep               | 2025-03-26 19:35:07.404867
         | PypiGenerateMissingSha256ChecksumsMigrationStep         | 2025-03-26 19:35:07.41218
         | RubygemsHashAndAttributesMigrationStep                  | 2025-03-26 19:35:07.423086
         | RubygemsHostedMarkDirtyGemInfoMigrationStep             | 2025-03-26 19:35:07.428415
         | S3BlobStoreMetricsMigrationStep                         | 2025-03-26 19:35:07.433919
         | Z_002_ApiKeySecretsDatabaseMigrationStep                | 2025-03-26 19:35:07.441775
         | NodeHeartbeatDatabaseMigrationStep                      | 2025-03-27 14:25:56.962545
         | ReplicationUseTrustStoreDatabaseMigrationStep           | 2025-03-27 14:25:56.981074
         | SamlUserDatabaseMigrationStep                           | 2025-03-27 14:25:56.990907
         | UserTokenDatabaseMigrationStep                          | 2025-03-27 14:25:56.996733
         | UserTokenToApiKeyMigrationStep                          | 2025-03-27 14:25:57.02031
         | Z_001_UserTokenLdapSamlDualRealmUserTokensMigrationStep | 2025-03-27 14:25:57.025956
 2.16    | SearchCapabilityStep_2_16                               | 2026-02-12 21:50:35.368149
 2.17    | TrustedCertificatesMigrationStep_2_17                   | 2026-02-12 21:50:35.506726
 2.17.1  | NodeHeartBeatMigrationStep_2_17_1                       | 2026-02-12 21:50:35.683737
 2.18    | ConanCleanupMigrationStep_2_18                          | 2026-02-12 21:50:35.690401
         | AzureSoftDeletedBlobsMigrationStep                      | 2026-02-12 21:50:35.704125
         | DistributedEventsUpgrade                                | 2026-02-12 21:50:35.713569
         | HuggingFaceExternalMetadataMigrationStep                | 2026-02-12 21:50:35.719896
         | ReconcileTaskMigrationStep                              | 2026-02-12 21:50:35.727826
         | ScheduleS3CompactTasksMigrationStep                     | 2026-02-12 21:50:35.736142
(85 rows)

Where are these migrations coming from?? oO

I only thing that I could think of is that you may have another nexus process running (or attempting to connect) to this database with a newer version than 3.78.2-04. note the date on the installed_on column 2026-02-12 21:50:35.736142

You may want to check:

  1. Check for any running Nexus processes on all your servers
  2. Review active database connections to your test PostgreSQL instance to
    see what’s connected.
  3. Check your Nexus configuration files to ensure no other instances
    point to this database.