# Corrupted component database (Nexus RM on Openshift)

## post by antonioproietti.net on Jun 22, 2023

Antonio Proietti

---

Hi all, yesterday my Nexus Repository Manager running as container on Openshift 3.11, after working well for 2 years, suddenly crashed.

Image used is

```
registry.connect.redhat.com/sonatype/nexus-repository-manager:3.28.1-ubi-1
```

After reading many articles on forums, communities, etc, I tried to start a debug pod, delete .wal files under /nexus-data/db/config and /nexus-data/db/security and then repair these two databases.

I followed these procedures:

- [Unable to start Nexus repository on CentOS 7 running on AWS](https://groups.google.com/a/glists.sonatype.com/g/nexus-users/c/64W_y9fDGzQ/m/o0FKRgiDAwAJ?pli=1)
- [Fix Sonatype Nexus OrientDB · GitHub](https://gist.github.com/marcelmaatkamp/123e8793e07a72a382d8d0e8d66bbd8f?permalink_comment_id=3276537)

Config and security databases was fixed, but if I try to reach the component db from the orient db console with the following command:

```
java -jar  /opt/sonatype/nexus/lib/support/nexus-orient-console.jar

connect plocal:/nexus-data/db/component/ admin admin
```

I obtain the following error, that is the same I can see in the pod logs:

> Disconnecting from the database \[null\]…OK
> 
> Connecting to database \[plocal:/nexus-data/db/component\] with user ‘admin’…Exception `0132E0CC` in storage `plocal:/nexus-data/db/component`: 2.2.36 (build d3beb772c02098ceaea89779a7afd4b7305d3788, branch 2.2.x)
> 
> com.orientechnologies.orient.core.exception.OStorageException: Cannot open local storage ‘/nexus-data/db/component’ with mode=rw
> 
> DB name="component"
> 
> at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.open(OAbstractPaginatedStorage.java:323)
> at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.open(ODatabaseDocumentTx.java:259)
> at com.orientechnologies.orient.console.OConsoleDatabaseApp.connect(OConsoleDatabaseDatabaseApp.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)
> 
> Caused by: com.orientechnologies.orient.core.exception.OStorageException: Can not find configuration file for storage component
> 
> DB name="component"
> 
> at com.orientechnologies.orient.core.storage.impl.local.OStorageConfigurationSegment.load(OStorageConfigurationSegment.java:165)
> at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.open(OAbstractPaginatedStorage.java:267)
> … 11 more
> 
> Error: com.orientechnologies.orient.core.exception.OStorageException: Cannot open local storage ‘/nexus-data/db/component’ with mode=rw
> 
> DB name="component"
> 
> Error: com.orientechnologies.orient.core.exception.OStorageException: Can not find configuration file for storage component
> 
> DB name="component"

It seems like no more database component is present (file corruption??)

Unfortunately I do not have a backup/export for this database.

Any suggestion? Is it possibile create an empty DB and start like a fresh installation only for this database, maintaining the other 2? Or recreate the missing “configuration file for storage component” which is reported in the logs?

Thanks and regards,
