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

"java.io.IOException: Write end dead" occurs when group members do not use the same blobstore

    XMLWordPrintable

    Details

    • Story Points:
      5
    • Sprint:
      NXRM Trinity Sprint 14
    • Notability:
      2

      Description

      When requesting components from a group repository that contains member repos configured with different blob stores, an "org.sonatype.nexus.blobstore.api.BlobStoreException: java.io.IOException: Write end dead, Cause: Write end dead" error can randomly occur causing build/install failure.

      Reproduce (using NPM):
      1. Create 2 (file-based) blob stores e.g. store_A and store_B
      2. Create the following repo setup:
      NPM_Group (store_A): [NPM_Hosted (store_A), NPM_Proxy (store_B)]

      3. Upload some components to the hosted repo.
      4. Perform an npm install against the group repo that will request components from both member repos.

      Expected:
      Install completes with all required components served.

      Actual:
      Install fails with "org.sonatype.nexus.blobstore.api.BlobStoreException: java.io.IOException: Write end dead, Cause: Write end dead" e.g.

      > npm install
      npm ERR! code E500
      npm ERR! 500 javax.servlet.ServletException: org.sonatype.nexus.blobstore.api.BlobStoreException: BlobId: 5a53f62c-7712-434f-a785-bd60f1800ff3, java.io.IOException: Write end dead, Cause: Write end dead: xxxyyy@1.0.0
      
      127.0.0.1 - - [19/Jun/2019:11:40:39 +0100] "GET /repository/ccl-npm/xxxyyy HTTP/1.1" 500 - 2059 1056
      
      org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: GET /repository/ccl-npm/xxxyyy
      org.sonatype.nexus.blobstore.api.BlobStoreException: BlobId: 5a53f62c-7712-434f-a785-bd60f1800ff3, java.io.IOException: Write end dead, Cause: Write end dead
      	at org.sonatype.nexus.blobstore.file.FileBlobStore.tryCreate(FileBlobStore.java:364)
      	at org.sonatype.nexus.blobstore.file.FileBlobStore.create(FileBlobStore.java:300)
      	at org.sonatype.nexus.blobstore.file.FileBlobStore.doCreate(FileBlobStore.java:281)
      	at org.sonatype.nexus.blobstore.BlobStoreSupport.create(BlobStoreSupport.java:92)
      	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.blobstore.BlobStoreSupport.create(BlobStoreSupport.java:79)
      	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.repository.storage.BlobTx.create(BlobTx.java:72)
      	at org.sonatype.nexus.repository.storage.StorageTxImpl.createBlob(StorageTxImpl.java:609)
      	at sun.reflect.GeneratedMethodAccessor298.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.createBlob(Unknown Source)
      	at org.sonatype.nexus.repository.npm.internal.NpmFacetUtils.storeContent(NpmFacetUtils.java:131)
      	at org.sonatype.nexus.repository.npm.internal.NpmFacetUtils.savePackageRoot(NpmFacetUtils.java:389)
      	at org.sonatype.nexus.repository.npm.internal.NpmGroupFacet.savePackageRootToCache(NpmGroupFacet.java:288)
      	at org.sonatype.nexus.transaction.TransactionalWrapper.proceedWithTransaction(TransactionalWrapper.java:56)
      	at org.sonatype.nexus.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:54)
      	at org.sonatype.nexus.repository.npm.internal.NpmGroupFacet.saveToCache(NpmGroupFacet.java:273)
      	at org.sonatype.nexus.repository.npm.internal.NpmGroupFacet.buildMergedPackageRoot(NpmGroupFacet.java:269)
      	at org.sonatype.nexus.repository.npm.internal.NpmGroupFacet.lambda$0(NpmGroupFacet.java:172)
      	at org.sonatype.nexus.common.io.CooperatingFuture.performCall(CooperatingFuture.java:122)
      	at com.sonatype.nexus.hazelcast.internal.io.DistributedCooperatingFuture.performCall(DistributedCooperatingFuture.java:50)
      	at org.sonatype.nexus.common.io.CooperatingFuture.call(CooperatingFuture.java:64)
      	at org.sonatype.nexus.common.io.ScopedCooperationFactorySupport$ScopedCooperation.cooperate(ScopedCooperationFactorySupport.java:99)
      	at org.sonatype.nexus.repository.npm.internal.NpmGroupFacet.buildPackageRoot(NpmGroupFacet.java:162)
      	at org.sonatype.nexus.repository.npm.internal.NpmGroupFacet$buildPackageRoot$0.call(Unknown Source)
      	at org.sonatype.nexus.repository.npm.internal.NpmGroupPackageHandler.buildMergedPackageRoot(NpmGroupPackageHandler.groovy:77)
      	at sun.reflect.GeneratedMethodAccessor303.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210)
      	at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59)
      	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:177)
      	at org.sonatype.nexus.repository.npm.internal.NpmGroupPackageHandler.doGet(NpmGroupPackageHandler.groovy:57)
      	at org.sonatype.nexus.repository.group.GroupHandler.handle(GroupHandler.java:93)
      	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
      	at org.sonatype.nexus.repository.view.handlers.LastDownloadedHandler.handle(LastDownloadedHandler.java:63)
      	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.security.SecurityHandler.handle(SecurityHandler.java:52)
      	at org.sonatype.nexus.repository.view.Context.proceed(Context.java:80)
      	at org.sonatype.nexus.repository.view.handlers.TimingHandler.handle(TimingHandler.java:46)
      	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:64)
      	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)
      ...
      Caused by: java.io.IOException: Write end dead
      	at java.io.PipedInputStream.read(PipedInputStream.java:310)
      	at java.io.PipedInputStream.read(PipedInputStream.java:377)
      	at org.sonatype.nexus.common.hash.MultiHashingInputStream.read(MultiHashingInputStream.java:66)
      	at com.google.common.io.CountingInputStream.read(CountingInputStream.java:63)
      	at java.security.DigestInputStream.read(DigestInputStream.java:161)
      	at java.io.FilterInputStream.read(FilterInputStream.java:133)
      	at java.io.FilterInputStream.read(FilterInputStream.java:107)
      	at com.google.common.io.ByteStreams.copy(ByteStreams.java:109)
      	at org.sonatype.nexus.blobstore.file.internal.SimpleFileOperations.create(SimpleFileOperations.java:61)
      	at org.sonatype.nexus.blobstore.file.FileBlobStore.lambda$0(FileBlobStore.java:281)
      	at org.sonatype.nexus.blobstore.file.FileBlobStore.tryCreate(FileBlobStore.java:334)
      	... 143 common frames omitted
       

      Issue not observed when repos are using the same blob store.

        Attachments

          Activity

            People

            Assignee:
            sonofreichuk Sergii Onofreichuk
            Reporter:
            hardeepn Hardeep Nagra
            Last Updated By:
            Michael Prescott Michael Prescott
            Team:
            Original Nexus - Trinity - not for new tickets
            Votes:
            5 Vote for this issue
            Watchers:
            15 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title