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

deleting a repository may lead to Error deserializing record ODatabaseException The database instance is not set in the current thread requiring a server restart

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.5.0
    • Fix Version/s: 3.7.0
    • Component/s: Database
    • Labels:

      Description

      A user attempted to delete their maven-central repo while running 3.5.0-02. After clicking delete, the repository list didn't refresh. Closing browser windows and signing back into the UI didn't help render the repository list. The user was forced to restart nexus to get out of this state.

      The error message at the time of repository deletion was:

      2018-02-13 12:00:00,006-0500 INFO  [quartz-4-thread-18] *SYSTEM org.sonatype.nexus.quartz.internal.task.QuartzTaskInfo - Task 'Storage facet cleanup' [repository.storage-facet-cleanup] state change RUNNING -> WAITING (OK)
      2018-02-13 12:02:05,444-0500 INFO  [qtp829322311-15795] admin org.ehcache.core.EhcacheManager - Cache 'maven-central#negative-cache' removed from EhcacheManager.
      2018-02-13 12:02:05,507-0500 WARN  [qtp829322311-15795] admin com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinary - Error deserializing record with id #21:1 send this data for debugging: AAxidWNrZXQvAAAAEzEAAAAhABptYXZlbi1jZW50cmFsAgcQZmlyZXdhbGwAAAAxDAA= 
      2018-02-13 12:02:05,507-0500 ERROR [qtp829322311-15795] admin org.sonatype.nexus.repository.storage.StorageFacetImpl - Failed transition: STOPPED -> DELETED
      com.orientechnologies.orient.core.exception.ODatabaseException: The database instance is not set in the current thread. Be sure to set it with: ODatabaseRecordThreadLocal.INSTANCE.set(db);
          at com.orientechnologies.orient.core.db.ODatabaseRecordThreadLocal.get(ODatabaseRecordThreadLocal.java:51)
          at com.orientechnologies.orient.core.record.ORecordAbstract.getDatabase(ORecordAbstract.java:237)
          at com.orientechnologies.orient.core.record.impl.ODocument.getGlobalPropertyById(ODocument.java:2194)
          at com.orientechnologies.orient.core.record.impl.ODocumentInternal.getGlobalPropertyById(ODocumentInternal.java:64)
          at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.getGlobalProperty(ORecordSerializerBinaryV0.java:515)
          at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.deserialize(ORecordSerializerBinaryV0.java:259)
          at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinary.fromStream(ORecordSerializerBinary.java:80)
          at com.orientechnologies.orient.core.record.impl.ODocument.deserializeFields(ODocument.java:1854)
          at com.orientechnologies.orient.core.record.impl.ODocument.checkForFields(ODocument.java:2623)
          at com.orientechnologies.orient.core.record.impl.ODocument.setDirty(ODocument.java:1421)
          at com.orientechnologies.orient.core.record.impl.OSimpleMultiValueChangeListener.onAfterRecordChanged(OSimpleMultiValueChangeListener.java:56)
          at com.orientechnologies.orient.core.db.record.OTrackedMap.fireCollectionChangedEvent(OTrackedMap.java:230)
          at com.orientechnologies.orient.core.db.record.OTrackedMap.put(OTrackedMap.java:82)
          at org.sonatype.nexus.common.collect.AttributesMap.set(AttributesMap.java:237)
          at org.sonatype.nexus.common.collect.NestedAttributesMap.set(NestedAttributesMap.java:133)
          at org.sonatype.nexus.repository.storage.internal.StorageFacetManagerImpl.enqueueDeletion(StorageFacetManagerImpl.java:105)
          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 org.sonatype.nexus.repository.storage.StorageFacetImpl.doDelete(StorageFacetImpl.java:191)
          at org.sonatype.nexus.repository.FacetSupport.delete(FacetSupport.java:178)
          at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
          at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:191)
          at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:56)
          at org.sonatype.nexus.repository.manager.internal.RepositoryImpl.delete(RepositoryImpl.java:268)
          at org.sonatype.nexus.common.stateguard.MethodInvocationAction.run(MethodInvocationAction.java:39)
          at org.sonatype.nexus.common.stateguard.StateGuard$TransitionImpl.run(StateGuard.java:191)
          at org.sonatype.nexus.common.stateguard.TransitionsInterceptor.invoke(TransitionsInterceptor.java:56)
          at org.sonatype.nexus.repository.manager.internal.RepositoryManagerImpl.delete(RepositoryManagerImpl.java:364)
          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 org.sonatype.nexus.repository.manager.RepositoryManager$delete$3.call(Unknown Source)
          at org.sonatype.nexus.coreui.RepositoryComponent.remove(RepositoryComponent.groovy:245)
          at com.palominolabs.metrics.guice.ExceptionMeteredInterceptor.invoke(ExceptionMeteredInterceptor.java:49)
          at com.palominolabs.metrics.guice.TimedInterceptor.invoke(TimedInterceptor.java:47)
          at org.sonatype.nexus.validation.internal.ValidationInterceptor.invoke(ValidationInterceptor.java:53)
          at org.apache.shiro.guice.aop.AopAllianceMethodInvocationAdapter.proceed(AopAllianceMethodInvocationAdapter.java:49)
          at org.apache.shiro.authz.aop.AuthorizingAnnotationMethodInterceptor.invoke(AuthorizingAnnotationMethodInterceptor.java:68)
          at org.apache.shiro.guice.aop.AopAllianceMethodInterceptorAdapter.invoke(AopAllianceMethodInterceptorAdapter.java:36)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at com.softwarementors.extjs.djn.router.dispatcher.DispatcherBase.invokeJavaMethod(DispatcherBase.java:142)
          at com.softwarementors.extjs.djn.router.dispatcher.DispatcherBase.invokeMethod(DispatcherBase.java:133)
          at org.sonatype.nexus.extdirect.internal.ExtDirectServlet$3.invokeMethod(ExtDirectServlet.java:227)
          at com.softwarementors.extjs.djn.router.dispatcher.DispatcherBase.dispatch(DispatcherBase.java:63)
          at com.softwarementors.extjs.djn.router.processor.standard.StandardRequestProcessorBase.dispatchStandardMethod(StandardRequestProcessorBase.java:73)
          at com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor.processIndividualRequest(JsonRequestProcessor.java:502)
          at com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor.processIndividualRequestsInThisThread(JsonRequestProcessor.java:150)
          at com.softwarementors.extjs.djn.router.processor.standard.json.JsonRequestProcessor.process(JsonRequestProcessor.java:133)
          at com.softwarementors.extjs.djn.router.RequestRouter.processJsonRequest(RequestRouter.java:83)
          at com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.processRequest(DirectJNgineServlet.java:617)
          at com.softwarementors.extjs.djn.servlet.DirectJNgineServlet.doPost(DirectJNgineServlet.java:580)
          at org.sonatype.nexus.extdirect.internal.ExtDirectServlet.doPost(ExtDirectServlet.java:133)
      

      All attempt to load the ui caused the following errors to repeat every 5 seconds:

      10.9.32.219 - admin [13/Feb/2018:12:14:18 -0500] "POST /service/extdirect/poll/rapture_State_get HTTP/1.1" 200 77 15 "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.108 Safari/537.36"

      2018-02-13 12:14:18,416-0500 ERROR [qtp829322311-17314] admin org.sonatype.nexus.extdirect.internal.ExtDirectServlet - Failed to invoke action method: coreui_Repository.coreui_Repository_readStatus, java-method: org.sonatype.nexus.coreui.RepositoryComponent.readStatus
      org.sonatype.nexus.common.stateguard.InvalidStateException: Invalid state: DELETED; allowed: [STARTED]
      	at org.sonatype.nexus.common.stateguard.StateGuard._ensure(StateGuard.java:115)
      	at org.sonatype.nexus.common.stateguard.StateGuard.access$1(StateGuard.java:108)
      	at org.sonatype.nexus.common.stateguard.StateGuard$GuardImpl.run(StateGuard.java:269)
      	at org.sonatype.nexus.common.stateguard.GuardedInterceptor.invoke(GuardedInterceptor.java:53)
      	at sun.reflect.GeneratedMethodAccessor239.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      	at java.lang.reflect.Method.invoke(Unknown Source)
      	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      	at org.codehaus.groovy.runtime.metaclass.MethodMetaProperty$GetBeanMethodMetaProperty.getProperty(MethodMetaProperty.java:76)
      	at org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:64)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:296)
      	at org.sonatype.nexus.coreui.RepositoryComponent.buildStatus(RepositoryComponent.groovy:310)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              plynch Peter Lynch
              Last Updated By:
              Peter Lynch
              Team:
              Nexus - Platform
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title