0

My Nexus3 was stuck due to out of space issue, i clean some directories(non-nexus) and started, its show status like below

# service nexus status;
? nexus.service - LSB: nexus
   Loaded: loaded (/etc/init.d/nexus; generated)
   Active: active (exited) 

in logs i can see below

2019-02-06 18:59:08,550+0100 ERROR [FelixStartLevel]  *SYSTEM org.sonatype.nexus.extender.NexusContextListener - Failed to start nexus
com.orientechnologies.orient.core.exception.OStorageException: Cannot open local storage '/opt/nexus/sonatype-work/nexus3/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 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(ConcurrentHashMap.java:1688)
        at org.sonatype.nexus.orient.DatabaseManagerSupport.instance(DatabaseManagerSupport.java:285)
        at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
        at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
        at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
        at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Caused by: java.io.FileNotFoundException: /opt/nexus/sonatype-work/nexus3/db/component/dirty.fl (Permission denied)
        at java.io.RandomAccessFile.open0(Native Method)
        at java.io.RandomAccessFile.open(RandomAccessFile.java:316)

But when i do ls it shows file is there

root@XXX:/opt/nexus/sonatype-work/nexus3/db/component# ls -ltrh dirty.fl
-rw-r--r-- 1 root root 2 Feb  6 19:05 dirty.fl

Any clue what goes wrong?

ImranRazaKhan
  • 1,955
  • 5
  • 33
  • 74
  • 2
    The file is owned by root. Is nexus running as root? If not, it means the server was mistakenly started as root at some point, and you need to fix the ownership of the files (chown -R /opt/sonatype-work/nexus3"). – rseddon Feb 07 '19 at 14:09

1 Answers1

1

Cannot open local storage '/opt/nexus/sonatype-work/nexus3/db/component' with mode=rw

The file is present, but NXRM can't open it in a read-write mode. Since you have already ran out of space on your disk, please ensure your disk isn't mounted in read-only mode.

If you're still out of space, move the sonatype-work/nexus3/db/component directory to another location and create a symlink to point to the new component directory. Keep in mind the performance when choosing your new location.

To prevent this from happening in the future, try using the Cleanup Policies and periodically run Compact blob store task.

Dawid Sawa
  • 1,984
  • 1
  • 12
  • 19