Nexus Repository Manager - Невозможно подключиться к OrientDB для восстановления - PullRequest
0 голосов
/ 14 апреля 2020

Мы используем Nexus Repository Manager v3.14.0, который использует версию Orient DB 2.2.36. В результате нехватки места на рабочем столе «компонентная» БД была повреждена, и мы больше не можем запускать службу, так как постоянно получаем следующую ошибку:

2020-04-13 20:36:22,104+0300 ERROR [OrientDB rebuild indexes]  *SYSTEM com.orientechnologies.orient.core.index.OIndexNotUnique - $ANSI{green {db=component}} Exception during index 'component_bucket_name_version_idx' deletion
com.orientechnologies.orient.core.exception.OPageIsBrokenException: Following files and pages are detected to be broken ['assetdownloadcount_1.cpm' :187;], storage is switched to 'read only' mode. Any modification operations are prohibited. To restore database and make it fully operational you may export and import database to and from JSON.
        DB name="component"
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.checkLowDiskSpaceRequestsAndReadOnlyConditions(OAbstractPaginatedStorage.java:5144)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.deleteIndexEngine(OAbstractPaginatedStorage.java:2114)
        at com.orientechnologies.orient.core.index.OIndexAbstract.create(OIndexAbstract.java:259)
        at com.orientechnologies.orient.core.index.OIndexMultiValues.create(OIndexMultiValues.java:258)
        at com.orientechnologies.orient.core.index.OIndexMultiValues.create(OIndexMultiValues.java:44)
        at com.orientechnologies.orient.core.index.OIndexManagerShared$RecreateIndexesTask.createAutomaticIndex(OIndexManagerShared.java:600)
        at com.orientechnologies.orient.core.index.OIndexManagerShared$RecreateIndexesTask.recreateIndex(OIndexManagerShared.java:586)
        at com.orientechnologies.orient.core.index.OIndexManagerShared$RecreateIndexesTask.recreateIndexes(OIndexManagerShared.java:534)
        at com.orientechnologies.orient.core.index.OIndexManagerShared$RecreateIndexesTask.run(OIndexManagerShared.java:515)
        at java.lang.Thread.run(Thread.java:748)

Мы пытаемся восстановить базы данных путем экспорта и импорта из JSON, выполнив следующее:

CONNECT plocal:/nexus-data/db/component admin admin

export database component-export
drop database
create database plocal:/nexus-data/db/component admin admin
import database component-export.json.gz

DISCONNECT

Но команда «ПОДКЛЮЧИТЬ» завершается неудачно со следующей ошибкой:

Connecting to database [PLOCAL:/NXRM/sonatype-work/nexus3/db/component] with user 'admin'...
2020-04-14 07:53:41:866 WARNI {db=component} Storage 'component' was not closed properly. Will try to recover from write ahead log... [OLocalPaginatedStorage]
2020-04-14 07:53:41:867 WARNI {db=component} Restore is not possible because write ahead log is empty. [OLocalPaginatedStorage]$ANSI{green {db=component}} Index 'browse_node_component_id_idx' cannot be created and will be removed from configuration
com.orientechnologies.orient.core.exception.OStorageException: File with name 'browse_node_component_id_idx.sbt' does not exist in storage 'component'
        DB name="component"
        at com.orientechnologies.orient.core.storage.cache.local.OWOWCache.loadFile(OWOWCache.java:475)
        at com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurableComponent.openFile(ODurableComponent.java:180)
        at com.orientechnologies.orient.core.index.sbtree.local.OSBTree.load(OSBTree.java:423)
        at com.orientechnologies.orient.core.index.engine.OSBTreeIndexEngine.load(OSBTreeIndexEngine.java:98)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.openIndexes(OAbstractPaginatedStorage.java:352)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.open(OAbstractPaginatedStorage.java:291)
        at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:259)
        at com.orientechnologies.orient.console.OConsoleDatabaseApp.connect(OConsoleDatabaseApp.java:234)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.orientechnologies.common.console.OConsoleApplication.execute(OConsoleApplication.java:405)
        at com.orientechnologies.common.console.OConsoleApplication.executeCommands(OConsoleApplication.java:260)
        at com.orientechnologies.common.console.OConsoleApplication.run(OConsoleApplication.java:131)
        at com.orientechnologies.orient.console.OConsoleDatabaseApp.main(OConsoleDatabaseApp.java:145)
        at org.sonatype.nexus.orient.console.Main.main(Main.java:63)
$ANSI{green {db=component}} Index 'asset_component_idx' cannot be created and will be removed from configuration
com.orientechnologies.orient.core.exception.OStorageException: File with name 'asset_component_idx.sbt' does not exist in storage 'component'
        DB name="component"
        at com.orientechnologies.orient.core.storage.cache.local.OWOWCache.loadFile(OWOWCache.java:475)
        at com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurableComponent.openFile(ODurableComponent.java:180)
        at com.orientechnologies.orient.core.index.sbtree.local.OSBTree.load(OSBTree.java:423)
        at com.orientechnologies.orient.core.index.engine.OSBTreeIndexEngine.load(OSBTreeIndexEngine.java:98)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.openIndexes(OAbstractPaginatedStorage.java:352)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.open(OAbstractPaginatedStorage.java:291)
        at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:259)
        at com.orientechnologies.orient.console.OConsoleDatabaseApp.connect(OConsoleDatabaseApp.java:234)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.orientechnologies.common.console.OConsoleApplication.execute(OConsoleApplication.java:405)
        at com.orientechnologies.common.console.OConsoleApplication.executeCommands(OConsoleApplication.java:260)
        at com.orientechnologies.common.console.OConsoleApplication.run(OConsoleApplication.java:131)
        at com.orientechnologies.orient.console.OConsoleDatabaseApp.main(OConsoleDatabaseApp.java:145)
        at org.sonatype.nexus.orient.console.Main.main(Main.java:63)
$ANSI{green {db=component}} Index 'assetdownloadcount_repository_name_asset_name_date_type_date_idx' cannot be created and will be removed from configuration
com.orientechnologies.orient.core.exception.OStorageException: File with name 'assetdownloadcount_repository_name_asset_name_date_type_date_idx.sbt' does not exist in storage 'component'
        DB name="component"
        at com.orientechnologies.orient.core.storage.cache.local.OWOWCache.loadFile(OWOWCache.java:475)
        at com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurableComponent.openFile(ODurableComponent.java:180)
        at com.orientechnologies.orient.core.index.sbtree.local.OSBTree.load(OSBTree.java:423)
        at com.orientechnologies.orient.core.index.engine.OSBTreeIndexEngine.load(OSBTreeIndexEngine.java:98)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.openIndexes(OAbstractPaginatedStorage.java:352)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.open(OAbstractPaginatedStorage.java:291)
        at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:259)
        at com.orientechnologies.orient.console.OConsoleDatabaseApp.connect(OConsoleDatabaseApp.java:234)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.orientechnologies.common.console.OConsoleApplication.execute(OConsoleApplication.java:405)
        at com.orientechnologies.common.console.OConsoleApplication.executeCommands(OConsoleApplication.java:260)
        at com.orientechnologies.common.console.OConsoleApplication.run(OConsoleApplication.java:131)
        at com.orientechnologies.orient.console.OConsoleDatabaseApp.main(OConsoleDatabaseApp.java:145)
        at org.sonatype.nexus.orient.console.Main.main(Main.java:63)
$ANSI{green {db=component}} Index 'OFunction.name' cannot be created and will be removed from configuration
com.orientechnologies.orient.core.exception.OStorageException: File with name 'OFunction.name.him' does not exist in storage 'component'
        DB name="component"
        at com.orientechnologies.orient.core.storage.cache.local.OWOWCache.loadFile(OWOWCache.java:475)
        at com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurableComponent.openFile(ODurableComponent.java:180)
        at com.orientechnologies.orient.core.index.hashindex.local.OLocalHashTable.load(OLocalHashTable.java:671)
        at com.orientechnologies.orient.core.index.engine.OHashTableIndexEngine.load(OHashTableIndexEngine.java:119)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.openIndexes(OAbstractPaginatedStorage.java:352)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.open(OAbstractPaginatedStorage.java:291)
        at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:259)
        at com.orientechnologies.orient.console.OConsoleDatabaseApp.connect(OConsoleDatabaseApp.java:234)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.orientechnologies.common.console.OConsoleApplication.execute(OConsoleApplication.java:405)
        at com.orientechnologies.common.console.OConsoleApplication.executeCommands(OConsoleApplication.java:260)
        at com.orientechnologies.common.console.OConsoleApplication.run(OConsoleApplication.java:131)
        at com.orientechnologies.orient.console.OConsoleDatabaseApp.main(OConsoleDatabaseApp.java:145)
        at org.sonatype.nexus.orient.console.Main.main(Main.java:63)
$ANSI{green {db=component}} Index 'component_ci_name_ci_idx' cannot be created and will be removed from configuration
com.orientechnologies.orient.core.exception.OStorageException: File with name 'component_ci_name_ci_idx.sbt' does not exist in storage 'component'
        DB name="component"
        at com.orientechnologies.orient.core.storage.cache.local.OWOWCache.loadFile(OWOWCache.java:475)
        at com.orientechnologies.orient.core.storage.impl.local.paginated.base.ODurableComponent.openFile(ODurableComponent.java:180)
        at com.orientechnologies.orient.core.index.sbtree.local.OSBTree.load(OSBTree.java:423)
        at com.orientechnologies.orient.core.index.engine.OSBTreeIndexEngine.load(OSBTreeIndexEngine.java:98)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.openIndexes(OAbstractPaginatedStorage.java:352)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.open(OAbstractPaginatedStorage.java:291)
        at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:259)
        at com.orientechnologies.orient.console.OConsoleDatabaseApp.connect(OConsoleDatabaseApp.java:234)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.orientechnologies.common.console.OConsoleApplication.execute(OConsoleApplication.java:405)
        at com.orientechnologies.common.console.OConsoleApplication.executeCommands(OConsoleApplication.java:260)
        at com.orientechnologies.common.console.OConsoleApplication.run(OConsoleApplication.java:131)
        at com.orientechnologies.orient.console.OConsoleDatabaseApp.main(OConsoleDatabaseApp.java:145)
        at org.sonatype.nexus.orient.console.Main.main(Main.java:63)

Мы также пытались подключиться после удаления всех файлов .wal, но все равно появляется та же ошибка.

Обратите внимание, что у нас нет резервных копий для восстановления.

Любая идея, как это исправить, чтобы мы могли подключиться к базе данных?

...