org.sonatype.nexus.proxy.LocalStorageException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 1. Add content to releases repo at least 4 levels deep. Example com/sonatype/sample/project 2. While Nexus is stopped -- delete any storage/releases/.meta/prefixes.txt in storage directories -- cd storage/releases/com/sonatype; chmod go-rx sample; sudo chown -R root sample; 3. Start Nexus with DEBUG enabled. Auto routing threads try to regenerate the prefixes file for the releases repo. You will see what appears a problem trying to inspect directories more than 2 levels deep. {noformat} 2014-04-01 15:37:25,546-0300 WARN [ar-4-thread-2] *SYSTEM org.sonatype.nexus.proxy.walker.DefaultWalker - Aborted walking on repository "Releases" [id=releases] from path "/", cause: Cannot list directory in repository M2Repository(id=releases), path /app/nexus-testing/2.8.0-02/nexus-professional-2.8.0-02-bundle/sonatype-work/nexus/storage/releases/com/sonatype/sample org.sonatype.nexus.proxy.LocalStorageException: Cannot list directory in repository M2Repository(id=releases), path /app/nexus-testing/2.8.0-02/nexus-professional-2.8.0-02-bundle/sonatype-work/nexus/storage/releases/com/sonatype/sample at org.sonatype.nexus.proxy.storage.local.fs.DefaultFSPeer.listItems(DefaultFSPeer.java:281) ~[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.storage.local.fs.DefaultFSLocalRepositoryStorage.listItems(DefaultFSLocalRepositoryStorage.java:423) ~[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.repository.AbstractRepository.doListItems(AbstractRepository.java:1222) ~[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.maven.AbstractMavenRepository.doListItems(AbstractMavenRepository.java:505) ~[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.repository.AbstractRepository.list(AbstractRepository.java:1066) ~[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:206) ~[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:225) ~[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:225) ~[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:225) ~[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.walker.DefaultWalker.walk(DefaultWalker.java:89) ~[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.maven.routing.internal.LocalContentDiscovererImpl.discoverLocalContent(LocalContentDiscovererImpl.java:87) [nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.maven.routing.internal.ManagerImpl.updateHostedPrefixFile(ManagerImpl.java:637) [nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.maven.routing.internal.ManagerImpl.updateAndPublishPrefixFile(ManagerImpl.java:513) [nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.maven.routing.internal.UpdateRepositoryRunnable.doRun(UpdateRepositoryRunnable.java:61) [nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.maven.routing.internal.task.RunnableSupport.run(RunnableSupport.java:58) [nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.maven.routing.internal.task.CancelableRunnableSupport.run(CancelableRunnableSupport.java:72) [nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.maven.routing.internal.task.executor.ConstrainedExecutorImpl$CancelableRunnableWrapper.run(ConstrainedExecutorImpl.java:174) [nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.threads.MDCAwareRunnable.run(MDCAwareRunnable.java:41) [nexus-core-2.8.0-02.jar:2.8.0-02] at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.2.2.jar:1.2.2] at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.2.2.jar:1.2.2] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0] at java.lang.Thread.run(Thread.java:744) [na:1.8.0] {noformat} Repeat the procedure this time allowing access to com/sonatype/sample but not com/sonatype/sample/project. Prefix file generation succeeds now. {noformat} 15:50:42,354-0300 DEBUG [ar-4-thread-2] *SYSTEM org.sonatype.nexus.proxy.maven.maven2.M2Repository - releases retrieveItem() :: FOUND releases:/ 2014-04-01 15:50:42,354-0300 DEBUG [ar-4-thread-2] *SYSTEM org.sonatype.nexus.proxy.maven.maven2.M2Repository - releases.list() :: releases:/ 2014-04-01 15:50:42,355-0300 DEBUG [ar-4-thread-2] *SYSTEM org.sonatype.nexus.proxy.attributes.DefaultLSAttributeStorage - Loading attributes on UID=releases:/archetype-catalog.xml 2014-04-01 15:50:42,357-0300 DEBUG [ar-4-thread-2] *SYSTEM org.sonatype.nexus.proxy.maven.maven2.M2Repository - releases.list() :: releases:/com 2014-04-01 15:50:42,357-0300 DEBUG [ar-4-thread-2] *SYSTEM org.sonatype.nexus.proxy.maven.maven2.M2Repository - releases.list() :: releases:/com/sonatype 2014-04-01 15:50:42,358-0300 DEBUG [ar-4-thread-2] *SYSTEM org.sonatype.nexus.proxy.maven.maven2.M2Repository - releases.list() :: releases:/com/sonatype/sample 2014-04-01 15:50:42,358-0300 DEBUG [ar-4-thread-2] *SYSTEM org.sonatype.nexus.proxy.walker.DefaultWalker - Finished walking on ResourceStore 'releases' from path '/'. 2014-04-01 15:50:42,358-0300 DEBUG [ar-4-thread-2] *SYSTEM org.sonatype.nexus.proxy.maven.maven2.M2Repository - releases.retrieveItem() :: ResourceStoreRequest{requestPath='/.meta/prefixes.txt', requestContext=RequestContext{this=org.sonatype.nexus.proxy.RequestContext@726e1dec, parent=null}, pathStack=[], processedRepositories=[], appliedMappings={}} 2014-04-01 15:50:42,358-0300 DEBUG [ar-4-thread-2] *SYSTEM org.sonatype.nexus.proxy.maven.maven2.M2Repository - ResourceStoreRequest{requestPath='/.meta/prefixes.txt', requestContext=RequestContext{this=org.sonatype.nexus.proxy.RequestContext@726e1dec, parent=null}, pathStack=[], processedRepositories=[releases], appliedMappings={}} :: localOnly=true, remoteOnly=false, asExpired=false 2014-04-01 15:50:42,358-0300 DEBUG [ar-4-thread-2] *SYSTEM org.sonatype.nexus.proxy.maven.maven2.M2Repository - Item ResourceStoreRequest{requestPath='/.meta/prefixes.txt', requestContext=RequestContext{this=org.sonatype.nexus.proxy.RequestContext@726e1dec, parent=null}, pathStack=[], processedRepositories=[releases], appliedMappings={}} not found in local storage. 2014-04-01 15:50:42,358-0300 DEBUG [ar-4-thread-2] *SYSTEM org.sonatype.nexus.proxy.maven.maven2.M2Repository - releases retrieveItem() :: NOT FOUND releases:/.meta/prefixes.txt 2014-04-01 15:50:42,359-0300 INFO [ar-4-thread-2] *SYSTEM org.sonatype.nexus.proxy.maven.routing.internal.ManagerImpl - Updated and published prefix file of "Releases" [id=releases] 2014-04-01 15:50:42,359-0300 DEBUG [ar-4-thread-2] *SYSTEM org.sonatype.nexus.proxy.maven.maven2.M2Repository - releases.storeItem() :: releases:/.meta/prefixes.txt 2014-04-01 15:50:42,359-0300 DEBUG [ar-4-thread-2] *SYSTEM org.sonatype.nexus.proxy.storage.local.fs.DefaultFSPeer - Storing file to /app/nexus-testing/2.8.0-02/nexus-professional-2.8.0-02-bundle/sonatype-work/nexus/storage/releases/.meta/prefixes.txt 2014-04-01 15:50:42,360-0300 DEBUG [ar-4-thread-2] *SYSTEM org.sonatype.nexus.proxy.attributes.DefaultLSAttributeStorage - Storing attributes on UID=releases:/.meta/prefixes.txt 2014-04-01 15:50:42,360-0300 DEBUG [ar-4-thread-2] *SYSTEM org.sonatype.nexus.proxy.storage.local.fs.DefaultFSPeer - Storing file to /app/nexus-testing/2.8.0-02/nexus-professional-2.8.0-02-bundle/sonatype-work/nexus/storage/releases/.nexus/attributes/.meta/prefixes.txt 2014-04-01 15:50:42,361-0300 DEBUG [ar-4-thread-2] *SYSTEM org.sonatype.sisu.goodies.eventbus.internal.DefaultEventBus - Event 'RepositoryItemEventStoreCreate(sender="Releases" [id=releases], releases:/.meta/prefixes.txt)' fired 2014-04-01 15:50:42,362-0300 DEBUG [ar-4-thread-2] *SYSTEM org.sonatype.sisu.goodies.eventbus.internal.DefaultEventBus - Event 'PrefixFilePublishedRepositoryEvent{repositoryId=releases}' fired 2014-04-01 {noformat}
    via by Peter Lynch,
  • An example that should be avoided by Nexus: {quote} 2015-08-25 12:27:21 WARN [pxpool-1-thread-3] a530093 org.sonatype.scheduling.DefaultScheduledTask - Exception in call method of scheduled task Purge old snapshots 20-90 days org.sonatype.nexus.proxy.walker.WalkerException: Aborted walking on repository ID='snapshots' from path='/'. at org.sonatype.nexus.proxy.walker.DefaultWalker.reportWalkEnd(DefaultWalker.java:153) ~[nexus-core-2.11.4-01.jar:2.11.4-01] at org.sonatype.nexus.proxy.walker.DefaultWalker.walk(DefaultWalker.java:118) ~[nexus-core-2.11.4-01.jar:2.11.4-01] at org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover.removeSnapshotsFromMavenRepository(DefaultSnapshotRemover.java:213) ~[nexus-core-2.11.4-01.jar:2.11.4-01] at org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover.process(DefaultSnapshotRemover.java:156) ~[nexus-core-2.11.4-01.jar:2.11.4-01] at org.sonatype.nexus.maven.tasks.DefaultSnapshotRemover.removeSnapshots(DefaultSnapshotRemover.java:115) ~[nexus-core-2.11.4-01.jar:2.11.4-01] at org.sonatype.nexus.maven.tasks.SnapshotRemoverTask.doRun(SnapshotRemoverTask.java:98) ~[nexus-core-2.11.4-01.jar:2.11.4-01] at org.sonatype.nexus.maven.tasks.SnapshotRemoverTask.doRun(SnapshotRemoverTask.java:28) ~[nexus-core-2.11.4-01.jar:2.11.4-01] at org.sonatype.nexus.scheduling.AbstractNexusTask.call(AbstractNexusTask.java:163) ~[nexus-core-2.11.4-01.jar:2.11.4-01] at org.sonatype.scheduling.DefaultScheduledTask.call(DefaultScheduledTask.java:418) ~[nexus-scheduler-2.11.4-01.jar:2.11.4-01] at org.sonatype.nexus.threads.MDCAwareCallable.call(MDCAwareCallable.java:44) [nexus-core-2.11.4-01.jar:2.11.4-01] at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.3.jar:1.2.3] at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.3.jar:1.2.3] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_51] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_51] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_51] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_51] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_51] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_51] Caused by: org.sonatype.nexus.proxy.LocalStorageException: Cannot list directory in repository M2Repository(id=snapshots), path /data/repo/MavenSnapshots/lost+found at org.sonatype.nexus.proxy.storage.local.fs.DefaultFSPeer.listItems(DefaultFSPeer.java:295) ~[nexus-core-2.11.4-01.jar:2.11.4-01] at org.sonatype.nexus.proxy.storage.local.fs.DefaultFSLocalRepositoryStorage.listItems(DefaultFSLocalRepositoryStorage.java:479) ~[nexus-core-2.11.4-01.jar:2.11.4-01] at org.sonatype.nexus.proxy.repository.AbstractRepository.doListItems(AbstractRepository.java:1238) ~[nexus-core-2.11.4-01.jar:2.11.4-01] at org.sonatype.nexus.proxy.maven.AbstractMavenRepository.doListItems(AbstractMavenRepository.java:546) ~[nexus-core-2.11.4-01.jar:2.11.4-01] at org.sonatype.nexus.proxy.repository.AbstractRepository.list(AbstractRepository.java:1071) ~[nexus-core-2.11.4-01.jar:2.11.4-01] at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:192) ~[nexus-core-2.11.4-01.jar:2.11.4-01] at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:231) ~[nexus-core-2.11.4-01.jar:2.11.4-01] at org.sonatype.nexus.proxy.walker.DefaultWalker.walk(DefaultWalker.java:89) ~[nexus-core-2.11.4-01.jar:2.11.4-01] ... 16 common frames omitted {quote}
    via by Peter Lynch,
    • org.sonatype.nexus.proxy.LocalStorageException: Cannot list directory in repository M2Repository(id=releases), path /app
    • exus-testing/2.8.0-02
    • exus-professional-2.8.0-02-bundle/sonatype-work
    • exus/storage/releases/com/sonatype/sample at org.sonatype.nexus.proxy.storage.local.fs.DefaultFSPeer.listItems(DefaultFSPeer.java:281)[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.storage.local.fs.DefaultFSLocalRepositoryStorage.listItems(DefaultFSLocalRepositoryStorage.java:423)[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.repository.AbstractRepository.doListItems(AbstractRepository.java:1222)[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.maven.AbstractMavenRepository.doListItems(AbstractMavenRepository.java:505)[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.repository.AbstractRepository.list(AbstractRepository.java:1066)[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:206)[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:225)[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:225)[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.walker.DefaultWalker.walkRecursive(DefaultWalker.java:225)[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.walker.DefaultWalker.walk(DefaultWalker.java:89)[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.maven.routing.internal.LocalContentDiscovererImpl.discoverLocalContent(LocalContentDiscovererImpl.java:87)[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.maven.routing.internal.ManagerImpl.updateHostedPrefixFile(ManagerImpl.java:637)[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.maven.routing.internal.ManagerImpl.updateAndPublishPrefixFile(ManagerImpl.java:513)[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.maven.routing.internal.UpdateRepositoryRunnable.doRun(UpdateRepositoryRunnable.java:61)[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.maven.routing.internal.task.RunnableSupport.run(RunnableSupport.java:58)[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.maven.routing.internal.task.CancelableRunnableSupport.run(CancelableRunnableSupport.java:72)[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.proxy.maven.routing.internal.task.executor.ConstrainedExecutorImpl$CancelableRunnableWrapper.run(ConstrainedExecutorImpl.java:174)[nexus-core-2.8.0-02.jar:2.8.0-02] at org.sonatype.nexus.threads.MDCAwareRunnable.run(MDCAwareRunnable.java:41)[nexus-core-2.8.0-02.jar:2.8.0-02] at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)[shiro-core-1.2.2.jar:1.2.2] at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)[shiro-core-1.2.2.jar:1.2.2] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[na:1.8.0] at java.util.concurrent.FutureTask.run(FutureTask.java:266)[na:1.8.0] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)[na:1.8.0] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)[na:1.8.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0] at java.lang.Thread.run(Thread.java:744)[na:1.8.0]
    No Bugmate found.