Problem generating browse nodes for Asset - NullPointerException

446 views
Skip to first unread message

Torsten Reinhard

unread,
Mar 8, 2022, 9:49:39 AM3/8/22
to Nexus Users
Hi,

since some days and after upgrading from 3.19.2 to 3.37.3 version of Nexus we see a lot of those exceptions in the log:

2022-03-07 12:48:10,757+0000 WARN  [event-14-thread-77]  jenkins-bot org.sonatype.nexus.repository.browse.internal.orient.OrientBrowseNodeManager - Problem generating browse nodes for Asset{metadata=AttachedEntityMetadata{schema=asset, document=#19:1388436{bucket:#16:2,format:maven2,last_updated:Mon Mar 07 12:48:10 UTC 2022,attributes:[4],component:null,name:com/bmw/otd3/otd-apps/maven-metadata.xml.sha256,size:64,content_type:text/plain,created_by:jenkins-bot,created_by_ip:192.168.44.78,blob_ref:default@BA9BC40B-5DB4D5F6-C3F73D66-3F51D79F-79422570:2ff45716-a3da-4b46-aad1-2ce408dda81e,last_downloaded:null,blob_created:Mon Mar 07 12:48:10 UTC 2022,blob_updated:Mon Mar 07 12:48:10 UTC 2022} v1}, name=com/bmw/otd3/otd-apps/maven-metadata.xml.sha256}
com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: sql.select expand(rid) from index:browse_node_repository_name_parent_path_name_idx where key=:key limit 1
        DB name="component"
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3421)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:3318)
        at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:69)
        at org.sonatype.nexus.repository.browse.internal.orient.BrowseNodeEntityAdapter.findNodeRecord(BrowseNodeEntityAdapter.java:361)
        at org.sonatype.nexus.repository.browse.internal.orient.BrowseNodeEntityAdapter.maybeCreateParentNodes(BrowseNodeEntityAdapter.java:324)
        at org.sonatype.nexus.repository.browse.internal.orient.BrowseNodeEntityAdapter.createAssetNode(BrowseNodeEntityAdapter.java:279)
        at org.sonatype.nexus.repository.browse.internal.orient.OrientBrowseNodeStore.lambda$1(OrientBrowseNodeStore.java:168)
        at org.sonatype.nexus.orient.transaction.OrientOperations.lambda$2(OrientOperations.java:62)
        at org.sonatype.nexus.transaction.OperationPoint.lambda$0(OperationPoint.java:53)
        at org.sonatype.nexus.transaction.OperationPoint.proceed(OperationPoint.java:64)
        at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:58)
        at org.sonatype.nexus.transaction.Operations.proceedWithTransaction(Operations.java:232)
        at org.sonatype.nexus.transaction.Operations.transactional(Operations.java:223)
        at org.sonatype.nexus.transaction.Operations.run(Operations.java:175)
        at org.sonatype.nexus.orient.transaction.OrientOperations.run(OrientOperations.java:62)
        at org.sonatype.nexus.repository.browse.internal.orient.OrientBrowseNodeStore.createAssetNode(OrientBrowseNodeStore.java:168)
        at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
        at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:272)
        at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:54)
        at org.sonatype.nexus.repository.browse.internal.orient.OrientBrowseNodeManager.createBrowseNodes(OrientBrowseNodeManager.java:137)
        at org.sonatype.nexus.repository.browse.internal.orient.OrientBrowseNodeManager.createFromAsset(OrientBrowseNodeManager.java:80)
        at org.sonatype.nexus.repository.browse.internal.orient.OrientBrowseNodeEventHandler.lambda$0(OrientBrowseNodeEventHandler.java:59)
        at org.sonatype.nexus.repository.browse.internal.orient.OrientBrowseNodeEventHandler.handle(OrientBrowseNodeEventHandler.java:90)
        at org.sonatype.nexus.repository.browse.internal.orient.OrientBrowseNodeEventHandler.on(OrientBrowseNodeEventHandler.java:59)
        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.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:87)
        at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:72)
        at org.sonatype.nexus.internal.event.AffinityBarrier.lambda$1(AffinityBarrier.java:91)
        at org.sonatype.nexus.thread.internal.MDCAwareRunnable.run(MDCAwareRunnable.java:40)
        at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120)
        at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException: null
        at com.orientechnologies.orient.core.index.sbtree.local.OSBTree.findBucket(OSBTree.java:1674)
        at com.orientechnologies.orient.core.index.sbtree.local.OSBTree.get(OSBTree.java:194)
        at com.orientechnologies.orient.core.index.engine.OSBTreeIndexEngine.get(OSBTreeIndexEngine.java:128)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.doGetIndexValue(OAbstractPaginatedStorage.java:2289)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.getIndexValue(OAbstractPaginatedStorage.java:2271)
        at com.orientechnologies.orient.core.index.OIndexOneValue.get(OIndexOneValue.java:58)
        at com.orientechnologies.orient.core.index.OIndexOneValue.get(OIndexOneValue.java:40)
        at com.orientechnologies.orient.core.index.OIndexAbstractDelegate.get(OIndexAbstractDelegate.java:58)
        at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:258)
        at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:40)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.searchInIndex(OCommandExecutorSQLSelect.java:2747)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.assignTarget(OCommandExecutorSQLSelect.java:529)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.executeSearch(OCommandExecutorSQLSelect.java:509)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.execute(OCommandExecutorSQLSelect.java:485)
        at com.orientechnologies.orient.core.sql.OCommandExecutorSQLDelegate.execute(OCommandExecutorSQLDelegate.java:70)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.executeCommand(OAbstractPaginatedStorage.java:3400)
        ... 36 common frames omitted

Additionally we are no more able to Browse in the UI.
I´ve tried the " Repair - Rebuild repository browse" task but it also fails with NPE (log file is attached)

What could have caused this damage and how can this be repaired?

Any help is very appreciated,
thx in advance,

Torsten
create.browse.nodes-20220308114241014.zip

Torsten Reinhard

unread,
Mar 9, 2022, 3:09:28 AM3/9/22
to Nexus Users, Torsten Reinhard
at the end I was able to fix this with these commands:

sh-4.4$ java -jar /opt/sonatype/nexus/lib/support/nexus-orient-console.jar

OrientDB console v.2.2.36 (build d3beb772c02098ceaea89779a7afd4b7305d3788, branch 2.2.x) https://www.orientdb.com
Type 'help' to display all the supported commands.
orientdb> sh: tput: command not found
orientdb> connect plocal:/nexus-data/db/component/ admin admin

Connecting to database [plocal:/nexus-data/db/component/] with user 'admin'...
2022-03-08 23:18:34:635 WARNI {db=component} Storage 'component' was not closed properly. Will try to recover from write ahead log... [OLocalPaginatedStorage]
2022-03-08 23:18:34:644 WARNI {db=component} Record OFuzzyCheckpointStartRecord{lsn=LSN{segment=1038, position=38535770}} com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OFuzzyCheckpointStartRecord{lsn=null, previousCheckpoint=LSN{segment=1038, position=38486646}} will be skipped during data restore [OLocalPaginatedStorage]
2022-03-08 23:18:34:645 WARNI {db=component} Record com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OFuzzyCheckpointEndRecord{lsn=LSN{segment=1038, position=38535810}} will be skipped during data restore [OLocalPaginatedStorage]OK

orientdb {db=component}> check database
...
Checking cluster browse_node  for index browse_node_repository_name_parent_path_name_idx
cluster browse_node (27) |                    | 0%Exception `2B58F754` in storage `plocal:/nexus-data/db/component`: 2.2.36 (build d3beb772c02098ceaea89779a7afd4b7305d3788, branch 2.2.x)
java.lang.NullPointerException

        at com.orientechnologies.orient.core.index.sbtree.local.OSBTree.findBucket(OSBTree.java:1674)
        at com.orientechnologies.orient.core.index.sbtree.local.OSBTree.get(OSBTree.java:194)
        at com.orientechnologies.orient.core.index.engine.OSBTreeIndexEngine.get(OSBTreeIndexEngine.java:128)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.doGetIndexValue(OAbstractPaginatedStorage.java:2289)
        at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.getIndexValue(OAbstractPaginatedStorage.java:2271)
        at com.orientechnologies.orient.core.index.OIndexOneValue.get(OIndexOneValue.java:58)
        at com.orientechnologies.orient.core.index.OIndexOneValue.get(OIndexOneValue.java:40)
        at com.orientechnologies.orient.core.index.OIndexAbstractDelegate.get(OIndexAbstractDelegate.java:58)
        at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:258)
        at com.orientechnologies.orient.core.index.OIndexTxAwareOneValue.get(OIndexTxAwareOneValue.java:40)
        at com.orientechnologies.orient.core.db.tool.OCheckIndexTool.checkThatRecordIsIndexed(OCheckIndexTool.java:153)
        at com.orientechnologies.orient.core.db.tool.OCheckIndexTool.checkCluster(OCheckIndexTool.java:119)
        at com.orientechnologies.orient.core.db.tool.OCheckIndexTool.checkIndex(OCheckIndexTool.java:97)
        at com.orientechnologies.orient.core.db.tool.OCheckIndexTool.run(OCheckIndexTool.java:68)
        at com.orientechnologies.orient.console.OConsoleDatabaseApp.checkDatabase(OConsoleDatabaseApp.java:2140)

        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)

Error: java.lang.NullPointerException

orientdb {db=component}> REPAIR DATABASE
orientdb {db=component}> drop class browse_node

After restarting Nexus, the issue was solved.

This is also mentioned in

Thx, Torsten
Reply all
Reply to author
Forward
0 new messages