[jira] [Commented] (NIFI-4988) UnpackContent throws "java.lang.IllegalArgumentException: invalid entry size" and Administratively Yields
[ https://issues.apache.org/jira/browse/NIFI-4988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16484035#comment-16484035 ] ASF GitHub Bot commented on NIFI-4988: -- Github user asfgit closed the pull request at: https://github.com/apache/nifi/pull/2725 > UnpackContent throws "java.lang.IllegalArgumentException: invalid entry size" > and Administratively Yields > - > > Key: NIFI-4988 > URL: https://issues.apache.org/jira/browse/NIFI-4988 > Project: Apache NiFi > Issue Type: Bug >Affects Versions: 1.4.0, 1.5.0 >Reporter: William Vilwock >Assignee: Andrew Psaltis >Priority: Major > Attachments: 1474061523922903.zip, 1474113567697855.zip, > UnpackContent-NIFI-4988.xml > > > When using the UnpackContent processor we sometimes receive the error > "java.lang.IllegalArgumentException: invalid entry size". Instead of the flow > file being routed to the failure relationship, the session is rolled back, > the flow file is penalized, and the framework "Administratively Yields". This > is causing our flow to back up. We would expect the malformed zip to be > routed to the failure relationship, not tried again. We received this > exception in both NiFi 1.4.0 and 1.5.0. > This is our exception stack trace: > java.lang.IllegalArgumentException: invalid entry size > at > org.apache.commons.compress.archivers.zip.ZipArchiveEntry.setSize(ZipArchiveEntry.java:679) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.readDataDescriptor(ZipArchiveInputStream.java:764) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.closeEntry(ZipArchiveInputStream.java:651) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextZipEntry(ZipArchiveInputStream.java:225) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextEntry(ZipArchiveInputStream.java:378) > at > org.apache.nifi.processors.standard.UnpackContent$ZipUnpacker$1.process(UnpackContent.java:362) > at > org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2175) > at > org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2145) > at > org.apache.nifi.processors.standard.UnpackContent$ZipUnpacker.unpack(UnpackContent.java:356) > at > org.apache.nifi.processors.standard.UnpackContent.onTrigger(UnpackContent.java:255) > at > org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) > at > org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1122) > at > org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147) > at > org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) > at > org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:128) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > at java.lang.Thread.run(Thread.java:748) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-4988) UnpackContent throws "java.lang.IllegalArgumentException: invalid entry size" and Administratively Yields
[ https://issues.apache.org/jira/browse/NIFI-4988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16484032#comment-16484032 ] ASF subversion and git services commented on NIFI-4988: --- Commit 6356d7b9ee7cd9a84515a441724a2659397a0ffa in nifi's branch refs/heads/master from [~apsaltis] [ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=6356d7b ] NIFI-4988 This closes #2725. Changed the exception handling so that an invliad ZIP is handled. When an invalid zip is processed, the exception is an IllegalArgumentException which was not being handled and thus the session was being rollbacked. Signed-off-by: joewitt > UnpackContent throws "java.lang.IllegalArgumentException: invalid entry size" > and Administratively Yields > - > > Key: NIFI-4988 > URL: https://issues.apache.org/jira/browse/NIFI-4988 > Project: Apache NiFi > Issue Type: Bug >Affects Versions: 1.4.0, 1.5.0 >Reporter: William Vilwock >Assignee: Andrew Psaltis >Priority: Major > Attachments: 1474061523922903.zip, 1474113567697855.zip, > UnpackContent-NIFI-4988.xml > > > When using the UnpackContent processor we sometimes receive the error > "java.lang.IllegalArgumentException: invalid entry size". Instead of the flow > file being routed to the failure relationship, the session is rolled back, > the flow file is penalized, and the framework "Administratively Yields". This > is causing our flow to back up. We would expect the malformed zip to be > routed to the failure relationship, not tried again. We received this > exception in both NiFi 1.4.0 and 1.5.0. > This is our exception stack trace: > java.lang.IllegalArgumentException: invalid entry size > at > org.apache.commons.compress.archivers.zip.ZipArchiveEntry.setSize(ZipArchiveEntry.java:679) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.readDataDescriptor(ZipArchiveInputStream.java:764) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.closeEntry(ZipArchiveInputStream.java:651) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextZipEntry(ZipArchiveInputStream.java:225) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextEntry(ZipArchiveInputStream.java:378) > at > org.apache.nifi.processors.standard.UnpackContent$ZipUnpacker$1.process(UnpackContent.java:362) > at > org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2175) > at > org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2145) > at > org.apache.nifi.processors.standard.UnpackContent$ZipUnpacker.unpack(UnpackContent.java:356) > at > org.apache.nifi.processors.standard.UnpackContent.onTrigger(UnpackContent.java:255) > at > org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) > at > org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1122) > at > org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147) > at > org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) > at > org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:128) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > at java.lang.Thread.run(Thread.java:748) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-4988) UnpackContent throws "java.lang.IllegalArgumentException: invalid entry size" and Administratively Yields
[ https://issues.apache.org/jira/browse/NIFI-4988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16482735#comment-16482735 ] ASF GitHub Bot commented on NIFI-4988: -- Github user joewitt commented on the issue: https://github.com/apache/nifi/pull/2725 also possible that I am totally full of it. One of these, possibly both, are true. > UnpackContent throws "java.lang.IllegalArgumentException: invalid entry size" > and Administratively Yields > - > > Key: NIFI-4988 > URL: https://issues.apache.org/jira/browse/NIFI-4988 > Project: Apache NiFi > Issue Type: Bug >Affects Versions: 1.4.0, 1.5.0 >Reporter: William Vilwock >Assignee: Andrew Psaltis >Priority: Major > Attachments: 1474061523922903.zip, 1474113567697855.zip, > UnpackContent-NIFI-4988.xml > > > When using the UnpackContent processor we sometimes receive the error > "java.lang.IllegalArgumentException: invalid entry size". Instead of the flow > file being routed to the failure relationship, the session is rolled back, > the flow file is penalized, and the framework "Administratively Yields". This > is causing our flow to back up. We would expect the malformed zip to be > routed to the failure relationship, not tried again. We received this > exception in both NiFi 1.4.0 and 1.5.0. > This is our exception stack trace: > java.lang.IllegalArgumentException: invalid entry size > at > org.apache.commons.compress.archivers.zip.ZipArchiveEntry.setSize(ZipArchiveEntry.java:679) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.readDataDescriptor(ZipArchiveInputStream.java:764) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.closeEntry(ZipArchiveInputStream.java:651) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextZipEntry(ZipArchiveInputStream.java:225) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextEntry(ZipArchiveInputStream.java:378) > at > org.apache.nifi.processors.standard.UnpackContent$ZipUnpacker$1.process(UnpackContent.java:362) > at > org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2175) > at > org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2145) > at > org.apache.nifi.processors.standard.UnpackContent$ZipUnpacker.unpack(UnpackContent.java:356) > at > org.apache.nifi.processors.standard.UnpackContent.onTrigger(UnpackContent.java:255) > at > org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) > at > org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1122) > at > org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147) > at > org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) > at > org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:128) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > at java.lang.Thread.run(Thread.java:748) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-4988) UnpackContent throws "java.lang.IllegalArgumentException: invalid entry size" and Administratively Yields
[ https://issues.apache.org/jira/browse/NIFI-4988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16482734#comment-16482734 ] ASF GitHub Bot commented on NIFI-4988: -- Github user markap14 commented on the issue: https://github.com/apache/nifi/pull/2725 Ah, ok, I didn't realize that @joewitt - I thought it had to always be excluded. There are probably a handful of well-known magic headers or something then. Good to know! > UnpackContent throws "java.lang.IllegalArgumentException: invalid entry size" > and Administratively Yields > - > > Key: NIFI-4988 > URL: https://issues.apache.org/jira/browse/NIFI-4988 > Project: Apache NiFi > Issue Type: Bug >Affects Versions: 1.4.0, 1.5.0 >Reporter: William Vilwock >Assignee: Andrew Psaltis >Priority: Major > Attachments: 1474061523922903.zip, 1474113567697855.zip, > UnpackContent-NIFI-4988.xml > > > When using the UnpackContent processor we sometimes receive the error > "java.lang.IllegalArgumentException: invalid entry size". Instead of the flow > file being routed to the failure relationship, the session is rolled back, > the flow file is penalized, and the framework "Administratively Yields". This > is causing our flow to back up. We would expect the malformed zip to be > routed to the failure relationship, not tried again. We received this > exception in both NiFi 1.4.0 and 1.5.0. > This is our exception stack trace: > java.lang.IllegalArgumentException: invalid entry size > at > org.apache.commons.compress.archivers.zip.ZipArchiveEntry.setSize(ZipArchiveEntry.java:679) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.readDataDescriptor(ZipArchiveInputStream.java:764) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.closeEntry(ZipArchiveInputStream.java:651) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextZipEntry(ZipArchiveInputStream.java:225) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextEntry(ZipArchiveInputStream.java:378) > at > org.apache.nifi.processors.standard.UnpackContent$ZipUnpacker$1.process(UnpackContent.java:362) > at > org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2175) > at > org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2145) > at > org.apache.nifi.processors.standard.UnpackContent$ZipUnpacker.unpack(UnpackContent.java:356) > at > org.apache.nifi.processors.standard.UnpackContent.onTrigger(UnpackContent.java:255) > at > org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) > at > org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1122) > at > org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147) > at > org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) > at > org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:128) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > at java.lang.Thread.run(Thread.java:748) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-4988) UnpackContent throws "java.lang.IllegalArgumentException: invalid entry size" and Administratively Yields
[ https://issues.apache.org/jira/browse/NIFI-4988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16482723#comment-16482723 ] ASF GitHub Bot commented on NIFI-4988: -- Github user joewitt commented on the issue: https://github.com/apache/nifi/pull/2725 @markap14 i think often RAT can detect something is a binary file and not subject to having a license header. It can't hurt to add the exclusion but i think it is normal that rat isn't unhappy about it. > UnpackContent throws "java.lang.IllegalArgumentException: invalid entry size" > and Administratively Yields > - > > Key: NIFI-4988 > URL: https://issues.apache.org/jira/browse/NIFI-4988 > Project: Apache NiFi > Issue Type: Bug >Affects Versions: 1.4.0, 1.5.0 >Reporter: William Vilwock >Assignee: Andrew Psaltis >Priority: Major > Attachments: 1474061523922903.zip, 1474113567697855.zip, > UnpackContent-NIFI-4988.xml > > > When using the UnpackContent processor we sometimes receive the error > "java.lang.IllegalArgumentException: invalid entry size". Instead of the flow > file being routed to the failure relationship, the session is rolled back, > the flow file is penalized, and the framework "Administratively Yields". This > is causing our flow to back up. We would expect the malformed zip to be > routed to the failure relationship, not tried again. We received this > exception in both NiFi 1.4.0 and 1.5.0. > This is our exception stack trace: > java.lang.IllegalArgumentException: invalid entry size > at > org.apache.commons.compress.archivers.zip.ZipArchiveEntry.setSize(ZipArchiveEntry.java:679) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.readDataDescriptor(ZipArchiveInputStream.java:764) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.closeEntry(ZipArchiveInputStream.java:651) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextZipEntry(ZipArchiveInputStream.java:225) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextEntry(ZipArchiveInputStream.java:378) > at > org.apache.nifi.processors.standard.UnpackContent$ZipUnpacker$1.process(UnpackContent.java:362) > at > org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2175) > at > org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2145) > at > org.apache.nifi.processors.standard.UnpackContent$ZipUnpacker.unpack(UnpackContent.java:356) > at > org.apache.nifi.processors.standard.UnpackContent.onTrigger(UnpackContent.java:255) > at > org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) > at > org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1122) > at > org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147) > at > org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) > at > org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:128) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > at java.lang.Thread.run(Thread.java:748) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-4988) UnpackContent throws "java.lang.IllegalArgumentException: invalid entry size" and Administratively Yields
[ https://issues.apache.org/jira/browse/NIFI-4988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16482719#comment-16482719 ] ASF GitHub Bot commented on NIFI-4988: -- Github user markap14 commented on a diff in the pull request: https://github.com/apache/nifi/pull/2725#discussion_r189647485 --- Diff: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestUnpackContent.java --- @@ -168,6 +168,39 @@ public void testZip() throws IOException { flowFile.assertContentEquals(path.toFile()); } } +@Test +public void testInvalidZip() throws IOException { +final TestRunner unpackRunner = TestRunners.newTestRunner(new UnpackContent()); +final TestRunner autoUnpackRunner = TestRunners.newTestRunner(new UnpackContent()); +unpackRunner.setProperty(UnpackContent.PACKAGING_FORMAT, UnpackContent.PackageFormat.ZIP_FORMAT.toString()); +autoUnpackRunner.setProperty(UnpackContent.PACKAGING_FORMAT, UnpackContent.PackageFormat.AUTO_DETECT_FORMAT.toString()); +unpackRunner.enqueue(dataPath.resolve("invalid_data.zip")); +unpackRunner.enqueue(dataPath.resolve("invalid_data.zip")); +Map attributes = new HashMap<>(1); +attributes.put("mime.type", "application/zip"); +autoUnpackRunner.enqueue(dataPath.resolve("invalid_data.zip"), attributes); +autoUnpackRunner.enqueue(dataPath.resolve("invalid_data.zip"), attributes); +unpackRunner.run(2); +autoUnpackRunner.run(2); + +unpackRunner.assertTransferCount(UnpackContent.REL_FAILURE, 2); +unpackRunner.assertTransferCount(UnpackContent.REL_ORIGINAL, 0); +unpackRunner.assertTransferCount(UnpackContent.REL_SUCCESS, 0); + +autoUnpackRunner.assertTransferCount(UnpackContent.REL_FAILURE, 2); +autoUnpackRunner.assertTransferCount(UnpackContent.REL_ORIGINAL, 0); +autoUnpackRunner.assertTransferCount(UnpackContent.REL_SUCCESS, 0); + +final List unpacked = unpackRunner.getFlowFilesForRelationship(UnpackContent.REL_FAILURE); +for (final MockFlowFile flowFile : unpacked) { +final String filename = flowFile.getAttribute(CoreAttributes.FILENAME.key()); + // final String folder = flowFile.getAttribute(CoreAttributes.PATH.key()); --- End diff -- Can probably remove this line. > UnpackContent throws "java.lang.IllegalArgumentException: invalid entry size" > and Administratively Yields > - > > Key: NIFI-4988 > URL: https://issues.apache.org/jira/browse/NIFI-4988 > Project: Apache NiFi > Issue Type: Bug >Affects Versions: 1.4.0, 1.5.0 >Reporter: William Vilwock >Assignee: Andrew Psaltis >Priority: Major > Attachments: 1474061523922903.zip, 1474113567697855.zip, > UnpackContent-NIFI-4988.xml > > > When using the UnpackContent processor we sometimes receive the error > "java.lang.IllegalArgumentException: invalid entry size". Instead of the flow > file being routed to the failure relationship, the session is rolled back, > the flow file is penalized, and the framework "Administratively Yields". This > is causing our flow to back up. We would expect the malformed zip to be > routed to the failure relationship, not tried again. We received this > exception in both NiFi 1.4.0 and 1.5.0. > This is our exception stack trace: > java.lang.IllegalArgumentException: invalid entry size > at > org.apache.commons.compress.archivers.zip.ZipArchiveEntry.setSize(ZipArchiveEntry.java:679) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.readDataDescriptor(ZipArchiveInputStream.java:764) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.closeEntry(ZipArchiveInputStream.java:651) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextZipEntry(ZipArchiveInputStream.java:225) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextEntry(ZipArchiveInputStream.java:378) > at > org.apache.nifi.processors.standard.UnpackContent$ZipUnpacker$1.process(UnpackContent.java:362) > at > org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2175) > at > org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2145) > at > org.apache.nifi.processors.standard.UnpackContent$ZipUnpacker.unpack(UnpackContent.java:356) > at > org.apache.nifi.processors.standard.UnpackContent.onTrigger(UnpackContent.java:255) > at > org.apache.nifi.processo
[jira] [Commented] (NIFI-4988) UnpackContent throws "java.lang.IllegalArgumentException: invalid entry size" and Administratively Yields
[ https://issues.apache.org/jira/browse/NIFI-4988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16482717#comment-16482717 ] ASF GitHub Bot commented on NIFI-4988: -- Github user markap14 commented on the issue: https://github.com/apache/nifi/pull/2725 I think I'm missing something obvious... but the PR adds a new file, invalid_data.zip but it doesn't add it to the RAT exclusions in the pom.xml... yet, it still pass the contrib-check. I'm not sure why. > UnpackContent throws "java.lang.IllegalArgumentException: invalid entry size" > and Administratively Yields > - > > Key: NIFI-4988 > URL: https://issues.apache.org/jira/browse/NIFI-4988 > Project: Apache NiFi > Issue Type: Bug >Affects Versions: 1.4.0, 1.5.0 >Reporter: William Vilwock >Assignee: Andrew Psaltis >Priority: Major > Attachments: 1474061523922903.zip, 1474113567697855.zip, > UnpackContent-NIFI-4988.xml > > > When using the UnpackContent processor we sometimes receive the error > "java.lang.IllegalArgumentException: invalid entry size". Instead of the flow > file being routed to the failure relationship, the session is rolled back, > the flow file is penalized, and the framework "Administratively Yields". This > is causing our flow to back up. We would expect the malformed zip to be > routed to the failure relationship, not tried again. We received this > exception in both NiFi 1.4.0 and 1.5.0. > This is our exception stack trace: > java.lang.IllegalArgumentException: invalid entry size > at > org.apache.commons.compress.archivers.zip.ZipArchiveEntry.setSize(ZipArchiveEntry.java:679) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.readDataDescriptor(ZipArchiveInputStream.java:764) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.closeEntry(ZipArchiveInputStream.java:651) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextZipEntry(ZipArchiveInputStream.java:225) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextEntry(ZipArchiveInputStream.java:378) > at > org.apache.nifi.processors.standard.UnpackContent$ZipUnpacker$1.process(UnpackContent.java:362) > at > org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2175) > at > org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2145) > at > org.apache.nifi.processors.standard.UnpackContent$ZipUnpacker.unpack(UnpackContent.java:356) > at > org.apache.nifi.processors.standard.UnpackContent.onTrigger(UnpackContent.java:255) > at > org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) > at > org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1122) > at > org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147) > at > org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) > at > org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:128) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > at java.lang.Thread.run(Thread.java:748) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-4988) UnpackContent throws "java.lang.IllegalArgumentException: invalid entry size" and Administratively Yields
[ https://issues.apache.org/jira/browse/NIFI-4988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16481856#comment-16481856 ] ASF GitHub Bot commented on NIFI-4988: -- GitHub user apsaltis opened a pull request: https://github.com/apache/nifi/pull/2725 NIFI-4988 Changed to handle an invalid ZIP file Changed the exception handling so that an invalid ZIP file is handled. When an invalid zip is processed, the exception is an IllegalArgumentException which was not being handled and thus the session was being rollbacked. Thank you for submitting a contribution to Apache NiFi. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### For all changes: - [X ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [X ] Does your PR title start with NIFI- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [X ] Has your PR been rebased against the latest commit within the target branch (typically master)? - [ X] Is your initial contribution a single, squashed commit? ### For code changes: - [ X] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder? - [X ] Have you written or updated unit tests to verify your changes? - [N/A ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [N/A ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly? - [N/A ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly? - [N/A ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties? ### For documentation related changes: - [N/A ] Have you ensured that format looks appropriate for the output in which it is rendered? ### Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. You can merge this pull request into a Git repository by running: $ git pull https://github.com/apsaltis/nifi NIFI-4988 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/nifi/pull/2725.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2725 commit bca63409d0fb37df715c3095a926a00bb88ba151 Author: Andrew Psaltis Date: 2018-05-20T07:10:39Z NIFI-4988 Changed the exception handling so that an invliad ZIP is handled. When an invalid zip is processed, the exception is an IllegalArgumentException which was not being handled and thus the session was being rollbacked. > UnpackContent throws "java.lang.IllegalArgumentException: invalid entry size" > and Administratively Yields > - > > Key: NIFI-4988 > URL: https://issues.apache.org/jira/browse/NIFI-4988 > Project: Apache NiFi > Issue Type: Bug >Affects Versions: 1.4.0, 1.5.0 >Reporter: William Vilwock >Assignee: Andrew Psaltis >Priority: Major > Attachments: 1474061523922903.zip, 1474113567697855.zip, > UnpackContent-NIFI-4988.xml > > > When using the UnpackContent processor we sometimes receive the error > "java.lang.IllegalArgumentException: invalid entry size". Instead of the flow > file being routed to the failure relationship, the session is rolled back, > the flow file is penalized, and the framework "Administratively Yields". This > is causing our flow to back up. We would expect the malformed zip to be > routed to the failure relationship, not tried again. We received this > exception in both NiFi 1.4.0 and 1.5.0. > This is our exception stack trace: > java.lang.IllegalArgumentException: invalid entry size > at > org.apache.commons.compress.archivers.zip.ZipArchiveEntry.setSize(ZipArchiveEntry.java:679) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.readDataDescriptor(ZipArchiveInputStream.java:764) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.closeEntry(ZipArchiveInputStream.java:651) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextZipEntry(ZipArchiveInputStream.java:225) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextEntry(ZipArchiveInputStream.java:378) > at
[jira] [Commented] (NIFI-4988) UnpackContent throws "java.lang.IllegalArgumentException: invalid entry size" and Administratively Yields
[ https://issues.apache.org/jira/browse/NIFI-4988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16480319#comment-16480319 ] Andrew Psaltis commented on NIFI-4988: -- Hi, I've attached two .zip files that reproduce this error along with a template to use with it.[^UnpackContent-NIFI-4988.xml][^1474113567697855.zip] > UnpackContent throws "java.lang.IllegalArgumentException: invalid entry size" > and Administratively Yields > - > > Key: NIFI-4988 > URL: https://issues.apache.org/jira/browse/NIFI-4988 > Project: Apache NiFi > Issue Type: Bug >Affects Versions: 1.4.0, 1.5.0 >Reporter: William Vilwock >Priority: Major > Attachments: 1474061523922903.zip, 1474113567697855.zip, > UnpackContent-NIFI-4988.xml > > > When using the UnpackContent processor we sometimes receive the error > "java.lang.IllegalArgumentException: invalid entry size". Instead of the flow > file being routed to the failure relationship, the session is rolled back, > the flow file is penalized, and the framework "Administratively Yields". This > is causing our flow to back up. We would expect the malformed zip to be > routed to the failure relationship, not tried again. We received this > exception in both NiFi 1.4.0 and 1.5.0. > This is our exception stack trace: > java.lang.IllegalArgumentException: invalid entry size > at > org.apache.commons.compress.archivers.zip.ZipArchiveEntry.setSize(ZipArchiveEntry.java:679) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.readDataDescriptor(ZipArchiveInputStream.java:764) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.closeEntry(ZipArchiveInputStream.java:651) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextZipEntry(ZipArchiveInputStream.java:225) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextEntry(ZipArchiveInputStream.java:378) > at > org.apache.nifi.processors.standard.UnpackContent$ZipUnpacker$1.process(UnpackContent.java:362) > at > org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2175) > at > org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2145) > at > org.apache.nifi.processors.standard.UnpackContent$ZipUnpacker.unpack(UnpackContent.java:356) > at > org.apache.nifi.processors.standard.UnpackContent.onTrigger(UnpackContent.java:255) > at > org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) > at > org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1122) > at > org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147) > at > org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) > at > org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:128) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > at java.lang.Thread.run(Thread.java:748) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-4988) UnpackContent throws "java.lang.IllegalArgumentException: invalid entry size" and Administratively Yields
[ https://issues.apache.org/jira/browse/NIFI-4988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16408256#comment-16408256 ] William Vilwock commented on NIFI-4988: --- Unfortunately, I cannot provide the data sample that caused this. Does the stack trace give you enough to go off of? > UnpackContent throws "java.lang.IllegalArgumentException: invalid entry size" > and Administratively Yields > - > > Key: NIFI-4988 > URL: https://issues.apache.org/jira/browse/NIFI-4988 > Project: Apache NiFi > Issue Type: Bug >Affects Versions: 1.4.0, 1.5.0 >Reporter: William Vilwock >Priority: Major > > When using the UnpackContent processor we sometimes receive the error > "java.lang.IllegalArgumentException: invalid entry size". Instead of the flow > file being routed to the failure relationship, the session is rolled back, > the flow file is penalized, and the framework "Administratively Yields". This > is causing our flow to back up. We would expect the malformed zip to be > routed to the failure relationship, not tried again. We received this > exception in both NiFi 1.4.0 and 1.5.0. > This is our exception stack trace: > java.lang.IllegalArgumentException: invalid entry size > at > org.apache.commons.compress.archivers.zip.ZipArchiveEntry.setSize(ZipArchiveEntry.java:679) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.readDataDescriptor(ZipArchiveInputStream.java:764) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.closeEntry(ZipArchiveInputStream.java:651) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextZipEntry(ZipArchiveInputStream.java:225) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextEntry(ZipArchiveInputStream.java:378) > at > org.apache.nifi.processors.standard.UnpackContent$ZipUnpacker$1.process(UnpackContent.java:362) > at > org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2175) > at > org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2145) > at > org.apache.nifi.processors.standard.UnpackContent$ZipUnpacker.unpack(UnpackContent.java:356) > at > org.apache.nifi.processors.standard.UnpackContent.onTrigger(UnpackContent.java:255) > at > org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) > at > org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1122) > at > org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147) > at > org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) > at > org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:128) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > at java.lang.Thread.run(Thread.java:748) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (NIFI-4988) UnpackContent throws "java.lang.IllegalArgumentException: invalid entry size" and Administratively Yields
[ https://issues.apache.org/jira/browse/NIFI-4988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16403226#comment-16403226 ] Joseph Witt commented on NIFI-4988: --- Agreed. Can you provide a data sample that causes this. > UnpackContent throws "java.lang.IllegalArgumentException: invalid entry size" > and Administratively Yields > - > > Key: NIFI-4988 > URL: https://issues.apache.org/jira/browse/NIFI-4988 > Project: Apache NiFi > Issue Type: Bug >Affects Versions: 1.4.0, 1.5.0 >Reporter: William Vilwock >Priority: Major > > When using the UnpackContent processor we sometimes receive the error > "java.lang.IllegalArgumentException: invalid entry size". Instead of the flow > file being routed to the failure relationship, the session is rolled back, > the flow file is penalized, and the framework "Administratively Yields". This > is causing our flow to back up. We would expect the malformed zip to be > routed to the failure relationship, not tried again. We received this > exception in both NiFi 1.4.0 and 1.5.0. > This is our exception stack trace: > java.lang.IllegalArgumentException: invalid entry size > at > org.apache.commons.compress.archivers.zip.ZipArchiveEntry.setSize(ZipArchiveEntry.java:679) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.readDataDescriptor(ZipArchiveInputStream.java:764) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.closeEntry(ZipArchiveInputStream.java:651) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextZipEntry(ZipArchiveInputStream.java:225) > at > org.apache.commons.compress.archivers.zip.ZipArchiveInputStream.getNextEntry(ZipArchiveInputStream.java:378) > at > org.apache.nifi.processors.standard.UnpackContent$ZipUnpacker$1.process(UnpackContent.java:362) > at > org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2175) > at > org.apache.nifi.controller.repository.StandardProcessSession.read(StandardProcessSession.java:2145) > at > org.apache.nifi.processors.standard.UnpackContent$ZipUnpacker.unpack(UnpackContent.java:356) > at > org.apache.nifi.processors.standard.UnpackContent.onTrigger(UnpackContent.java:255) > at > org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) > at > org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1122) > at > org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147) > at > org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) > at > org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:128) > at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > at java.lang.Thread.run(Thread.java:748) -- This message was sent by Atlassian JIRA (v7.6.3#76005)