Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot open local storage nexus3/db/config with mode=rw DB name="config"

Tags:

nexus

orientdb

I am trying to run nexus oss on my windows machine, I tried running nexus service as described here. But I am getting this error, i do not install orientdb i suppose it will come bundle with the nexus package.

Cannot open local storage 'C:/nexus/sonatype-work/nexus3/db/config' with mode=rw

Here is complete log trace of error for reference.

2018-10-27 14:56:48,677+0300 ERROR [FelixStartLevel] *SYSTEM com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage - Exception `12B058F9` in storage `plocal:C:/nexus/sonatype-work/nexus3/db/config`: 2.2.36 (build d3beb772c02098ceaea89779a7afd4b7305d3788, branch 2.2.x)
com.orientechnologies.orient.core.exception.OStorageException: Cannot open local storage 'C:/nexus/sonatype-work/nexus3/db/config' with mode=rw
        DB name="config"
        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 org.sonatype.nexus.orient.DatabaseManagerSupport.connect(DatabaseManagerSupport.java:174)
        at org.sonatype.nexus.orient.DatabaseInstanceImpl.doStart(DatabaseInstanceImpl.java:56)
        at org.sonatype.goodies.lifecycle.LifecycleSupport.start(LifecycleSupport.java:104)
        at org.sonatype.goodies.lifecycle.Lifecycles.start(Lifecycles.java:44)
        at org.sonatype.nexus.orient.DatabaseManagerSupport.createInstance(DatabaseManagerSupport.java:306)
        at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(Unknown Source)
        at org.sonatype.nexus.orient.DatabaseManagerSupport.instance(DatabaseManagerSupport.java:285)
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown Source)
        at java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source)
        at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
        at java.util.stream.ForEachOps$ForEachTask.compute(Unknown Source)
        at java.util.concurrent.CountedCompleter.exec(Unknown Source)
        at java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
        at java.util.concurrent.ForkJoinTask.doInvoke(Unknown Source)
        at java.util.concurrent.ForkJoinTask.invoke(Unknown Source)
        at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(Unknown Source)
        at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(Unknown Source)
        at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
        at java.util.stream.ReferencePipeline.forEach(Unknown Source)
        at java.util.stream.ReferencePipeline$Head.forEach(Unknown Source)
        at org.sonatype.nexus.orient.restore.RestoreServiceImpl.doStart(RestoreServiceImpl.java:76)
        at org.sonatype.nexus.common.stateguard.StateGuardLifecycleSupport.start(StateGuardLifecycleSupport.java:67)
        at org.sonatype.nexus.orient.restore.RestoreServiceImpl$$EnhancerByGuice$$2c1dbe4.CGLIB$start$1(<generated>)
        at org.sonatype.nexus.orient.restore.RestoreServiceImpl$$EnhancerByGuice$$2c1dbe4$$FastClassByGuice$$23df1cd1.invoke(<generated>)
        at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:76)
        at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
        at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:193)
        at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:56)
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:77)
        at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:55)
        at org.sonatype.nexus.orient.restore.RestoreServiceImpl$$EnhancerByGuice$$2c1dbe4.start(<generated>)
        at org.sonatype.nexus.extender.NexusLifecycleManager.startComponent(NexusLifecycleManager.java:157)
        at org.sonatype.nexus.extender.NexusLifecycleManager.to(NexusLifecycleManager.java:95)
        at org.sonatype.nexus.extender.NexusContextListener.frameworkEvent(NexusContextListener.java:195)
        at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1429)
        at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
        at java.lang.Thread.run(Unknown Source)
Caused by: com.orientechnologies.orient.core.exception.OStorageException: File with name 'upgrade_model_versions.pcl' does not exist in storage 'config'
        DB name="config"
        at com.orientechnologies.orient.core.storage.cache.local.OWOWCache.loadFile(OWOWCache.java:475)

Thanks in advance.

like image 789
Muhammad Adnan Avatar asked Sep 21 '25 02:09

Muhammad Adnan


2 Answers

The error means that a "plocal" database can't be opened by multiple JVM at the same time. To fix:

  • check if there's no process using OrientDB (most of the times a OrientDB Server is running in the background). Just shutdown that server and retry
  • if you need multiple access to the same database, don't use "plocal" directly, but rather start a server and access to the database by using "remote" protocol. In this way the server is able to share the same database with multiple clients.

For more information: https://orientdb.com/docs/last/Troubleshooting.html#error-comorientechnologiesorientcoreexceptionostorageexception-cannot-open-local-storage-tmpdatabasesdemo-with-moderw


Hope it helps

Regards

like image 94
Michela Bonizzi Avatar answered Sep 23 '25 11:09

Michela Bonizzi


I had exactly the same issue when I upgraded Nexus from 3.7 to Nexus 3.20. The problem was that I executed the command nexus.exe / before this command nexus.exe /run. This is how I solved the issue:

  • First uninstalled Nexus 3.20 and installed it again
  • Executed nexus.exe /run
  • Created the service nexus.exe
  • Checked localhost:8081 and the Nexus interface appeared
like image 40
Hernando Garcia Morales Avatar answered Sep 23 '25 12:09

Hernando Garcia Morales