Support Questions

Find answers, ask questions, and share your expertise
Announcements
Welcome to the upgraded Community! Read this blog to see What’s New!

NIFI Error o.a.nifi.processors.standard.InvokeHTTP

avatar
New Contributor
Hi, I'm having a NiFi error when I try to download a file. Especially in the InvokeHttp process. The error does not always appear for the uuid itself.
2017-05-12 12:45:11,034 ERROR [Timer-Driven Process Thread-42] o.a.nifi.processors.standard.InvokeHTTP InvokeHTTP[id=d5ee3432-122a-133t-a3e2-4c7233ds4500] Routing to
 Failure due to exception: org.apache.nifi.processor.exception.FlowFileAccessException: Failed to import data from buffer(com.squareup.okhttp.internal.http.Http1xStr
eam$FixedLengthSource@2e12123).inputStream() for StandardFlowFileRecord[uuid=33482899-3ddc-2441-c73e-3dd2838ss929,claim=,offset=0,name=Process_00123.zip,size=0]
due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable to create ContentClaim due to java.net.ProtocolException: unexpected end of stream: org.ap
ache.nifi.processor.exception.FlowFileAccessException: Failed to import data from buffer(com.squareup.okhttp.internal.http.Http1xStream$FixedLengthSource@2e12123).i
nputStream() for StandardFlowFileRecord[uuid=33482899-3ddc-2441-c73e-3dd2838ss929,claim=,offset=0,name=Process_00123.zip,size=0] due to org.apache.nifi.processor.
exception.FlowFileAccessException: Unable to create ContentClaim due to java.net.ProtocolException: unexpected end of stream
2017-05-12 12:45:11,124 ERROR [Timer-Driven Process Thread-42] o.a.nifi.processors.standard.InvokeHTTP
org.apache.nifi.processor.exception.FlowFileAccessException: Failed to import data from buffer(com.squareup.okhttp.internal.http.Http1xStream$FixedLengthSource@2e12123).inputStream() for StandardFlowFileRecord[uuid=33482899-3ddc-2441-c73e-3dd2838ss929,claim=,offset=0,name=Process_00123.zip,size=0] due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable to create ContentClaim due to java.net.ProtocolException: unexpected end of stream
        at org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:2690) ~[na:na]
        at org.apache.nifi.processors.standard.InvokeHTTP.onTrigger(InvokeHTTP.java:700) ~[nifi-standard-processors-1.1.0.2.1.0.0-165.jar:1.1.0.2.1.0.0-165]
        at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) [nifi-api-1.1.0.2.1.0.0-165.jar:1.1.0.2.1.0.0-165]
        at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1099) [nifi-framework-core-1.1.0.2.1.0.0-165.jar:1.1.0.2.1.0.0-165]
        at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136) [nifi-framework-core-1.1.0.2.1.0.0-165.jar:1.1.0.2.1.0.0-165]
        at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) [nifi-framework-core-1.1.0.2.1.0.0-165.jar:1.1.0.2.1.0.0-165]
        at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132) [nifi-framework-core-1.1.0.2.1.0.0-165.jar:1.1.0.2.1.0.0-165]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_111]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_111]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_111]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_111]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_111]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_111]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_111]
Caused by: org.apache.nifi.processor.exception.FlowFileAccessException: Unable to create ContentClaim due to java.net.ProtocolException: unexpected end of stream
        at org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:2683) ~[na:na]
        ... 13 common frames omitted
Caused by: java.net.ProtocolException: unexpected end of stream
        at com.squareup.okhttp.internal.http.Http1xStream$FixedLengthSource.read(Http1xStream.java:396) ~[okhttp-2.7.1.jar:na]
        at okio.RealBufferedSource$1.read(RealBufferedSource.java:371) ~[okio-1.6.0.jar:na]
        at java.io.InputStream.read(InputStream.java:101) ~[na:1.8.0_111]
        at org.apache.nifi.stream.io.StreamUtils.copy(StreamUtils.java:35) ~[nifi-utils-1.1.0.2.1.0.0-165.jar:1.1.0.2.1.0.0-165]
        at org.apache.nifi.controller.repository.FileSystemRepository.importFrom(FileSystemRepository.java:700) ~[na:na]
        at org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:2680) ~[na:na]
        ... 13 common frames omitted


Any idea what would cause this exception, and how to fix it?

1 REPLY 1

avatar
@Albert Mc Gregor

Have you tried pulling the same file from the command line of the NiFi system using wget?

Labels