Artifactory 7.90.6升级至7.104.7失败及回滚异常求助
Issue 1: Multiple JVMs Connecting to Derby During Upgrade to 7.104.7
Derby is an embedded database that only allows a single JVM connection at a time. The error occurs because leftover services from the old version or conflicting new services are accessing Derby simultaneously.
Fix steps:
- Ensure all old services are fully stopped: Use system commands like
systemctl stop artifactoryorjfrog service stop allto terminate all JFrog processes, then verify no lingering Java processes are running withps aux | grep java. - Start services in correct order for 7.104.7: Since Topology is a new split service, start core services one by one:
- Start Topology service first:
jfrog service start topology - Wait for it to fully initialize, then start Access, Artifactory, and other services sequentially.
- Start Topology service first:
- Migrate to an external database (production recommendation): Derby is not designed for multi-service or production use. Switch to PostgreSQL, MySQL, or another supported external database to eliminate single-JVM connection restrictions.
Issue 2: jfmd Service Fails After Rollback to 7.90.6
The error about unknown migration file v040_resize_pkg_tags_value_column.sql happens because starting 7.104.7 applied newer metadata migrations that the 7.90.6 jfmd service doesn't recognize.
Fix options:
Option 1: Restore Pre-Upgrade jfmd Database Backup
If you created a backup of the jfmd Derby database (usually located at $JFROG_HOME/var/data/jfmd/derby) before upgrading:
- Stop all JFrog services.
- Replace the current jfmd Derby directory with your pre-upgrade backup.
- Start the 7.90.6 jfmd service and verify it runs correctly.
Option 2: Manually Remove the Unrecognized Migration Entry
If no pre-upgrade jfmd backup exists, modify the Derby database to remove the migration record:
- Stop all JFrog services.
- Locate the jfmd Derby database directory (e.g.,
/opt/jfrog/var/data/jfmd/derby). - Launch Derby's interactive tool
ij:ij - Connect to the jfmd database:
connect 'jdbc:derby:/opt/jfrog/var/data/jfmd/derby'; - Delete the unrecognized migration entry:
DELETE FROM DATABASECHANGELOG WHERE ID = 'v040_resize_pkg_tags_value_column'; - Exit
ijwithexit;. - Start the 7.90.6 jfmd service. It should now start without the migration error.
Key Note for Future Upgrades
Always back up all JFrog database directories (artifactory/derby, access/derby, jfmd/derby, topology/derby if applicable) before initiating any version upgrade. This prevents partial migration issues when rolling back.
内容的提问来源于stack exchange,提问作者Lukas Rytz

