-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 3.18.0
-
Fix Version/s: 3.21.0
-
Component/s: Support Tools
-
Labels:
-
Notability:n/a
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:
- Create an (empty) file within the install directory e.g. under nexus-3.18.0-01/etc/jetty/
- Set the permissions on this file such that the Nexus user cannot read it.
- 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)
- relates
-
NEXUS-21637 Support zip generation fails to include files or generate if there are duplicate named configuration files
-
- New
-