OrientDB Database health check failed with database integrity: BROKEN - Sonatype Nexus Repository - Sonatype Community

OrientDB Database health check failed with database integrity: BROKEN

post by sakshumjain on Oct 9, 2024

Hello,

We are trying to upgrade the Sonatype Nexus Repository OSS 3.70.2 database from OrientDb to H2. We ran the health check on the backup taken from OrientDb using admin task and got below error:

12:54:52 [main] INFO c.s.n.d.m.tasklet.HealthCheckTasklet - Check of storage completed in 234660ms. without errors.
12:54:52 [main] INFO c.s.n.d.m.tasklet.HealthCheckTasklet - Checking db cluster consistency for errors…
12:55:16 [main] INFO c.s.n.d.m.tasklet.HealthCheckTasklet - Check storage: OK
12:55:16 [main] INFO c.s.n.d.m.tasklet.HealthCheckTasklet - Check clusters consistency: OK
12:55:16 [main] INFO c.s.n.d.m.tasklet.HealthCheckTasklet - 0 component duplicates found
12:55:16 [main] INFO c.s.n.d.m.tasklet.HealthCheckTasklet - 1 asset duplicates found
12:55:16 [main] INFO c.s.n.d.m.tasklet.HealthCheckTasklet - 0 browse nodes duplicates found
12:55:16 [main] INFO c.s.n.d.m.tasklet.HealthCheckTasklet - ------------------------------------------------------------
12:55:16 [main] INFO c.s.n.d.m.tasklet.HealthCheckTasklet - Database integrity: BROKEN
12:55:16 [main] INFO c.s.n.d.m.tasklet.HealthCheckTasklet - ------------------------------------------------------------

how to find the issue and fix it before doing the migration? Please let us know.

post by mpiggott on Oct 9, 2024

You’ll need to manually connect to the database using an OrientDB console tool. I’m not sure these instructions are up to date as I believe the console may no longer be distributed - Accessing the OrientDB Console

The error message is saying that in the assets table there are multiple assets in the same repository with the same path.

post by sakshumjain on Oct 10, 2024

@mpiggott thank you for your response. I am not able to connect to database. do you know how can I login at H2 database and check for these duplicates?

post by sakshumjain on Oct 16, 2024

@ldurant I am wondering if you can help with instructions for login at H2 database? Thank You in advance!

post by ldurant on Oct 17, 2024

@sakshumjain It appears you need to do the login for your existing OrientDB database, not H2 since your instance is still using OrientDB and have not migrated to H2 yet. Are you saying you cannot connect to the OrientDB database?

post by sakshumjain on Oct 21, 2024

Hi @ldurant,

Yes, our production is still on OrientDB; it will be good if we manage to delete the duplicates in this only and then migrate, but I was trying on lower environments and there I upgraded to H2 so wanted to know how I can access H2 and delete duplicates.

As per the logs, it has skipped only 1 record, and in the health checkup, it displayed one duplicate. Does it mean it has skipped that?

Also, I can see on the results it has filtered some data as per the below entry:

Where can I find what is filtered and why?

Looking forward to your response!

post by sakshumjain on Oct 28, 2024

@ldurant awaiting your response; this will help us to resolve the bottleneck. Please respond.