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

Incomplete support zip generated when NXRM cannot read a file

    XMLWordPrintable

    Details

    • Notability:
      n/a

      Description

      A support zip fails to generate correctly i.e. created with missing logs and nexus.properties file if there is a file within either the install or data directory which the Nexus user cannot read e.g. due to file permissions.

      To reproduce:

      1. Create an (empty) file within the install directory e.g. under nexus-3.18.0-01/etc/jetty/
      2. Set the permissions on this file such that the Nexus user cannot read it.
      3. Start Repository Manager and attempt to generate a support zip with all 'contents' options selected.

      Expected:

      Repository Manager should generate support.zip with all the required files that it can read, including logs and the nexus.properties file, and skip any file it cannot read (there should be a log entry indicating any files that cannot be read or be included in the zip).

      Actual:

      When Repository Manager comes across a file it cannot read, it throws a java.io exception and generates an incomplete zip:

      2019-08-13 14:02:39,879+0100 ERROR [qtp977055929-70] admin org.sonatype.nexus.internal.atlas.SupportZipGeneratorImpl - Failed to create support ZIP

      java.io.FileNotFoundException: /opt/app/nexus-home/nexus-3.18.0-01/etc/jetty/nexus-web-bkp.xml (Permission denied) at java.io.FileInputStream.open0(Native Method) at

      java.io.FileInputStream.open(FileInputStream.java:195) at

      java.io.FileInputStream.<init>(FileInputStream.java:138) at org.sonatype.nexus.supportzip.FileContentSourceSupport.getContent(FileContentSourceSupport.java:60) at sun.reflect.GeneratedMethodAccessor125.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.MethodMetaProperty$GetBeanMethodMetaProperty.getProperty(MethodMetaProperty.java:76) at org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:63) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:299) at org.sonatype.nexus.internal.atlas.SupportZipGeneratorImpl$_createZip_closure9.doCall(SupportZipGeneratorImpl.groovy:307)

       

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dbradicich Damian Bradicich
              Reporter:
              hardeepn Hardeep Nagra
              Last Updated By:
              Wes Wannemacher
              Team:
              NXRM - Neo
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title