Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-16419

OCommandExecutionException: Target index 'BROWSE_NODE_REPOSITORY_NAME_PARENT_PATH_NAME_IDX' not found after upgrade to 3.7.0 or later

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 3.7.0, 3.8.0, 3.9.0
    • Fix Version/s: None
    • Component/s: Browse Storage, HA

      Description

      The follow message was reported when an active Nexus 3.8.0 node running in an HA-C cluster was stopped, then upgraded to 3.9.0. The exact cause of the missing index is unknown, but it is not expected.

      2018-03-01 11:00:01,388-0500 INFO [elasticsearch[ABB5DFF5-FF22F31E-D384292F-154DF16E-40BBF496][clusterService#updateTask][T#1]] NODE1 *SYSTEM org.elasticsearch.cluster.routing.allocation - [ABB5DFF5-FF22F31E-D384292F-154DF16E-40BBF496] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[b272f70f6cdb0be4914e883c9054297e6f78a93a][0]] ...]).
      2018-03-01 11:00:01,506-0500 INFO [quartz-5-thread-6] NODE1 *SYSTEM org.sonatype.nexus.repository.search.SearchFacetImpl - Rebuilding index of repository test
      2018-03-01 11:00:01,556-0500 INFO [quartz-5-thread-1 <command>sql.select expand(rid) from index:browse_node_repository_name_parent_path_name_idx where key=[:repository_name,:parent_path,:name] limit 1</command>] NODE1 *SYSTEM ROOT - Error executing query (1221419673): OCommandExecutorSQLSelect [text=SELECT expand(rid) FROM INDEX:browse_node_repository_name_parent_path_name_idx WHERE key = ["registry-vanilla", "/v2/blobs/", "sha256:9a32f102e6778e4b3c677f1f93fa121808006d3c9e002237677248de9acb9589"] LIMIT 1]
      2018-03-01 11:00:01,558-0500 ERROR [quartz-5-thread-1 <command>sql.select expand(rid) from index:browse_node_repository_name_parent_path_name_idx where key=[:repository_name,:parent_path,:name] limit 1</command>] NODE1 *SYSTEM ROOT - Exception 48CD6299 in storage plocal:/srv/nexus/sonatype-work/nexus3/db/component: 2.2.31 (build 285537d2767275f460df32c6a3be01bfff6a517c, branch 2.2.x)
      com.orientechnologies.orient.core.exception.OCommandExecutionException: Target index 'BROWSE_NODE_REPOSITORY_NAME_PARENT_PATH_NAME_IDX' not found
      DB name="component"
      at com.orientechnologies.orient.core.sql.OCommandExecutorSQLSelect.searchInIndex(OCommandExecutorSQLSelect.java:2658)
      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:3417)
      at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.command(OAbstractPaginatedStorage.java:3335)
      at com.orientechnologies.orient.server.distributed.impl.ODistributedStorage.command(ODistributedStorage.java:280)
      at com.orientechnologies.orient.core.command.OCommandRequestTextAbstract.execute(OCommandRequestTextAbstract.java:69)
      at org.sonatype.nexus.repository.storage.BrowseNodeEntityAdapter.findNodeRecord(BrowseNodeEntityAdapter.java:288)
      at org.sonatype.nexus.repository.storage.BrowseNodeEntityAdapter.createAssetNode(BrowseNodeEntityAdapter.java:248)
      at org.sonatype.nexus.repository.storage.BrowseNodeStoreImpl.lambda$1(BrowseNodeStoreImpl.java:132)
      at org.sonatype.nexus.orient.transaction.OrientOperations.lambda$2(OrientOperations.java:63)
      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:56)
      at org.sonatype.nexus.transaction.Operations.transactional(Operations.java:200)
      at org.sonatype.nexus.transaction.Operations.run(Operations.java:155)
      at org.sonatype.nexus.orient.transaction.OrientOperations.run(OrientOperations.java:63)
      at org.sonatype.nexus.repository.storage.BrowseNodeStoreImpl.createAssetNode(BrowseNodeStoreImpl.java:132)
      at org.sonatype.nexus.repository.storage.BrowseNodeStoreImpl$$EnhancerByGuice$$389590cb.CGLIB$createAssetNode$3(<generated>)
      at org.sonatype.nexus.repository.storage.BrowseNodeStoreImpl$$EnhancerByGuice$$389590cb$$FastClassByGuice$$8c54e091.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$GuardImpl.run(StateGuard.java:270)
      at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53)
      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.repository.storage.BrowseNodeStoreImpl$$EnhancerByGuice$$389590cb.createAssetNode(<generated>)
      at org.sonatype.nexus.repository.browse.internal.BrowseNodeManager.createBrowseNodes(BrowseNodeManager.java:106)
      at org.sonatype.nexus.repository.browse.internal.BrowseNodeManager.lambda$0(BrowseNodeManager.java:94)
      at java.util.ArrayList.forEach(ArrayList.java:1255)
      

      Cause

      Undetermined but seems to be related to some bug in the upgrade steps which add the missing index, introduced in version 3.7.0

      Correcting the problem if you upgraded to 3.7.0 or later

      Shut down Nexus, open a command prompt up on the server, and navigate to the Nexus application directory.

      Execute, this command, replace the nexus-3.9.0-01 part of the path with your nexus install path:

      java -jar nexus-3.9.0-01/lib/support/nexus-orient-console.jar
      

      At the command prompt execute:

      connect plocal:sonatype-work/nexus3/db/component admin admin 
      drop class browse_node
      exit
      

      Then restart. The table and index will be recreated, and repopulated. It may take some time for this, you can track the progress by looking at "system/tasks" in the UI. When there are no more "Rebuild repository browse tree" tasks running the process is complete.

      Note that this will only affect usage of the tree browse UI. Your builds will work right after restart, they do not depend on information from this table.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            plynch Peter Lynch
            Last Updated By:
            Joe Tom Joe Tom
            Team:
            NXRM - Morpheus
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title