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

The current database instance is not active on the current thread when pulling docker images

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 3.24.0, 3.26.1
    • Fix Version/s: None
    • Component/s: Docker
    • Labels:

      Description

      Sometimes when we pull docker images, we get an error:

      2020-07-27 22:54:22,466+0200 WARN  [qtp1423031717-67019] *UNKNOWN org.sonatype.nexus.repository.docker.internal.V2Handlers - Error: HEAD /v2/app-partnerauskunftservice/manifests/1.0.9-5aeac74
      java.lang.IllegalStateException: The current database instance (com.orientechnologies.orient.core.db.OPartitionedDatabasePool$DatabaseDocumentTxPooled@2754e39f) is not active on the current thread (Thread[qtp1423031717-67019,5,main]). Current active database is: null
              at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.checkIfActive(ODatabaseDocumentTx.java:3416)
              at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.command(ODatabaseDocumentTx.java:737)
              at org.sonatype.nexus.repository.storage.MetadataNodeEntityAdapter.findByProperty(MetadataNodeEntityAdapter.java:149)
              at org.sonatype.nexus.repository.storage.StorageTxImpl.findAssetWithProperty(StorageTxImpl.java:349)
              at sun.reflect.GeneratedMethodAccessor178.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.sonatype.nexus.common.stateguard.SimpleMethodInvocation.proceed(SimpleMethodInvocation.java:53)
              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:53)
              at org.sonatype.nexus.common.stateguard.StateGuardAspect$1.invoke(StateGuardAspect.java:63)
              at com.sun.proxy.$Proxy212.findAssetWithProperty(Unknown Source)
              at org.sonatype.nexus.repository.docker.internal.orient.DockerFacetUtils.findAsset(DockerFacetUtils.java:345)
              at org.sonatype.nexus.repository.docker.internal.orient.DockerFacetUtils.getOrCreateAsset(DockerFacetUtils.java:222)
              at sun.reflect.GeneratedMethodAccessor275.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
              at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
              at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.invoke(StaticMetaMethodSite.java:46)
              at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.call(StaticMetaMethodSite.java:91)
              at org.sonatype.nexus.repository.docker.internal.orient.V2ManifestUtilImpl.insertEmptyLayerIfNeeded(V2ManifestUtilImpl.groovy:235)
              at org.sonatype.nexus.repository.docker.internal.orient.V2ManifestUtilImpl$insertEmptyLayerIfNeeded$1.callCurrent(Unknown Source)
              at org.sonatype.nexus.repository.docker.internal.orient.V2ManifestUtilImpl.mayDowngrade(V2ManifestUtilImpl.groovy:168)
              at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:49)
              at org.sonatype.nexus.repository.docker.internal.orient.DockerHostedFacetImpl.getManifestByTag(DockerHostedFacetImpl.java:815)
              at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:57)
              at org.sonatype.nexus.transaction.TransactionInterceptor.proceedWithTransaction(TransactionInterceptor.java:66)
              at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
              at org.sonatype.nexus.repository.docker.internal.DockerHostedFacet$getManifestByTag.call(Unknown Source)
              at org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure14.doCall(V2Handlers.groovy:256)
              at sun.reflect.GeneratedMethodAccessor170.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
              at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
              at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
              at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
              at groovy.lang.Closure.call(Closure.java:420)
              at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:54)
              at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:124)
              at com.sun.proxy.$Proxy191.handle(Unknown Source)
              at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
              at org.sonatype.nexus.repository.storage.LastDownloadedHandler.handle(LastDownloadedHandler.java:59)
              at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
              at org.sonatype.nexus.repository.storage.UnitOfWorkHandler.handle(UnitOfWorkHandler.java:39)
              at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
              at org.sonatype.nexus.repository.view.handlers.ContentHeadersHandler.handle(ContentHeadersHandler.java:46)
              at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
              at org.sonatype.nexus.repository.view.handlers.ConditionalRequestHandler.handle(ConditionalRequestHandler.java:72)
              at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
              at org.sonatype.nexus.repository.http.PartialFetchHandler.handle(PartialFetchHandler.java:59)
              at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
              at com.sonatype.nexus.clm.internal.FirewallContributedHandler.handle(FirewallContributedHandler.java:98)
              at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
              at org.sonatype.nexus.repository.view.handlers.HandlerContributor.handle(HandlerContributor.java:67)
              at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
              at org.sonatype.nexus.repository.security.SecurityHandler.handle(SecurityHandler.java:51)
              at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
              at org.sonatype.nexus.repository.view.Context$proceed.call(Unknown Source)
              at org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure18.doCall(V2Handlers.groovy:300)
              at sun.reflect.GeneratedMethodAccessor152.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
              at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
              at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
              at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
              at groovy.lang.Closure.call(Closure.java:420)
              at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:54)
              at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:124)
              at com.sun.proxy.$Proxy191.handle(Unknown Source)
              at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
              at org.sonatype.nexus.repository.view.Context$proceed.call(Unknown Source)
              at org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure16.doCall(V2Handlers.groovy:275)
              at sun.reflect.GeneratedMethodAccessor169.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
              at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
              at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
              at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
              at groovy.lang.Closure.call(Closure.java:420)
              at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:54)
              at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:124)
              at com.sun.proxy.$Proxy191.handle(Unknown Source)
              at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
              at org.sonatype.nexus.repository.view.Context$proceed.call(Unknown Source)
              at org.sonatype.nexus.repository.docker.internal.V2Handlers$_closure1.doCall(V2Handlers.groovy:92)
              at sun.reflect.GeneratedMethodAccessor151.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
              at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
              at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
              at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
              at groovy.lang.Closure.call(Closure.java:420)
              at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:54)
              at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:124)
              at com.sun.proxy.$Proxy191.handle(Unknown Source)
              at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
              at org.sonatype.nexus.repository.view.handlers.TimingHandler.handle(TimingHandler.java:58)
              at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
              at org.sonatype.nexus.repository.view.Context.start(Context.java:114)
              at org.sonatype.nexus.repository.view.Router.dispatch(Router.java:65)
              at org.sonatype.nexus.repository.view.ConfigurableViewFacet.dispatch(ConfigurableViewFacet.java:52)
              at org.sonatype.nexus.repository.view.ConfigurableViewFacet.dispatch(ConfigurableViewFacet.java:43)
              at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.dispatchAndSend(ViewServlet.java:212)
              at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.doService(ViewServlet.java:174)
              at org.sonatype.nexus.repository.httpbridge.internal.ViewServlet.service(ViewServlet.java:126)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
              at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:286)
              at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:276)
              at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:181)
              at com.google.inject.servlet.DynamicServletPipeline.service(DynamicServletPipeline.java:71)
              at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)
              at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:112)
              at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
              at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
              at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
              at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
              at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
              at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
              at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
              at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
              at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
              at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
              at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
              at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
              at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
              at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
              at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
              at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
              at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
              at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
              at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
              at org.sonatype.nexus.security.SecurityFilter.executeChain(SecurityFilter.java:85)
              at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
              at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
              at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
              at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:387)
              at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
              at org.sonatype.nexus.security.SecurityFilter.doFilterInternal(SecurityFilter.java:101)
              at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
              at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
              at org.sonatype.nexus.repository.httpbridge.internal.ExhaustRequestFilter.doFilter(ExhaustRequestFilter.java:80)
              at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
              at com.sonatype.nexus.licensing.internal.LicensingRedirectFilter.doFilter(LicensingRedirectFilter.java:116)
              at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
              at com.codahale.metrics.servlet.AbstractInstrumentedFilter.doFilter(AbstractInstrumentedFilter.java:112)
              at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
              at org.sonatype.nexus.internal.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:79)
              at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
              at org.sonatype.nexus.internal.web.EnvironmentFilter.doFilter(EnvironmentFilter.java:101)
              at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
              at org.sonatype.nexus.internal.web.HeaderPatternFilter.doFilter(HeaderPatternFilter.java:98)
              at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)
              at com.google.inject.servlet.DynamicFilterPipeline.dispatch(DynamicFilterPipeline.java:104)
              at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:135)
              at org.sonatype.nexus.bootstrap.osgi.DelegatingFilter.doFilter(DelegatingFilter.java:73)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602)
              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
              at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
              at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1700)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)
              at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1667)
              at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
              at com.codahale.metrics.jetty9.InstrumentedHandler.handle(InstrumentedHandler.java:239)
              at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:152)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
              at org.eclipse.jetty.server.Server.handle(Server.java:505)
              at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370)
              at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267)
              at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
              at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
              at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
              at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
              at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:698)
              at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:804)
              at java.lang.Thread.run(Thread.java:748)
       

      Actually we make a head request on the manifest. If I try 'docker pull ...' some time later, it's possible to pull the image.
      The head request is part of a python script that makes this head request on all docker images in nexus and trys to pull them. We implemented this python script, because we had issues with broken docker images. This python script checks the health of docker images. We have 8000+ docker images in our nexus.
      We have this problem since several weeks. I think we experienced this problem first in version 3.24.0. Before we had 3.21.0. I think that version didn't cause these problems.

      Our current nexus version: 3.24.0 (Docker Image from docker hub)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              ckasper Christian Kasper
              Last Updated By:
              Joe Tom Joe Tom
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Date of First Response:

                  tigCommentSecurity.panel-title