sonatype / nexus-public

Sonatype Nexus Repository Open-source codebase mirror
https://www.sonatype.com/products/repository-oss-download
Eclipse Public License 1.0
1.9k stars 564 forks source link

database migrate fail. #462

Closed Alixxxxxxx closed 1 week ago

Alixxxxxxx commented 2 weeks ago

14:57:57 [main] WARN c.s.n.d.migrator.MigratorApplication - Please ensure any Nexus Repository instance has been gracefully shut down before proceeding. 14:57:57 [main] INFO c.s.n.d.migrator.MigratorApplication - Do you want to continue [y/n]? y 14:57:59 [main] INFO c.s.n.d.migrator.MigratorApplication - --content_migration parameter is absent. Setting it to true. 14:57:59 [main] INFO c.s.n.d.migrator.MigratorApplication - Force parameter wasn't found. Setting it to false by default. 14:57:59 [main] INFO c.s.n.d.migrator.MigratorApplication - ------------------------------------------------------------ 14:57:59 [main] INFO c.s.n.d.migrator.MigratorApplication - Java version: Red Hat, Inc. 11.0.17 14:57:59 [main] INFO c.s.n.d.migrator.MigratorApplication - JVM arguments: -Xmx16G -Xms16G -XX:+UseG1GC -XX:MaxDirectMemorySize=28672M 14:57:59 [main] INFO c.s.n.d.migrator.MigratorApplication - Migrator arguments: --migration_type=h2 --content_migration=true --export_json=false --force=false 14:57:59 [main] INFO c.s.n.d.migrator.MigratorApplication - ------------------------------------------------------------ 14:57:59 [main] INFO c.s.n.d.migrator.MigratorApplication - Starting MigratorApplication v3.70.1-03 using Java 11.0.17 on jenkins1032964 with PID 4026 (/home/nexus/sonatype-work/nexus3/nexus-db-migrator-3.70.1-03.jar started by root in /home/nexus/sonatype-work/nexus3) 14:57:59 [main] INFO c.s.n.d.migrator.MigratorApplication - No active profile set, falling back to 1 default profile: "default" Warning: Nashorn engine is planned to be removed from a future JDK release 14:58:02 [main] INFO o.s.b.c.r.s.JobRepositoryFactoryBean - No database type set, using meta data indicating: H2 14:58:02 [main] INFO c.s.n.d.migrator.MigratorApplication - Started MigratorApplication in 3.285 seconds (JVM running for 5.805) 14:58:02 [main] INFO o.s.b.a.b.JobLauncherApplicationRunner - Running default command line with: [--migration_type=h2, --content_migration=true, --export_json=false, --force=false] 14:58:02 [main] INFO c.s.n.d.m.validator.PathValidator - Validating Orient directory contains .bak files: /home/nexus/sonatype-work/nexus3 14:58:02 [main] INFO o.s.b.a.l.ConditionEvaluationReportLoggingListener -

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 14:58:02 [main] ERROR o.s.boot.SpringApplication - Application run failed java.lang.IllegalStateException: Failed to execute ApplicationRunner at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:776) at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:763) at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1317) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) at com.sonatype.nexus.db.migrator.MigratorApplication.main(MigratorApplication.java:117) Caused by: com.sonatype.nexus.db.migrator.exception.InvalidMigrationFilesException: The migration files in /home/nexus/sonatype-work/nexus3 do not match the expected requirements: No backup files (*.bak) found. WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.orientechnologies.common.directmemory.OByteBufferPool (file:/home/nexus/sonatype-work/nexus3/nexus-db-migrator-3.70.1-03.jar) to method sun.nio.ch.DirectBuffer.cleaner() WARNING: Please consider reporting this to the maintainers of com.orientechnologies.common.directmemory.OByteBufferPool WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release

vx-github commented 2 weeks ago

@Alixxxxxxx You really should read the migration documentation carefully. You just ran the migration tool in the active db directory. There for no *.bak db backup can be found.

https://help.sonatype.com/en/orient-3-70-java-8-or-11.html#migrating-from-orientdb-to-h2-252166

This is no issue. @mrprescott

mrprescott commented 1 week ago

Thanks for taking an early look at this, @vx-github. I'll close this for now until we hear further from @Alixxxxxxx.