Support Questions

Find answers, ask questions, and share your expertise

Nifi Error : failed to import data from buffer | unable to create content claim due to Java.io.EOFException

avatar
Explorer

Nifi Error : failed to import data from buffer | unable to create content claim due to Java io EOFException.

Please help to resolve this nifi UI issue . 

nifi_error_sit.png

 

nifi_error_eu_prod.png

8 REPLIES 8

avatar
Community Manager

@AhmedParvez Welcome to the Cloudera Community!

To help you get the best possible solution, I have tagged our NiFi experts @SAMSAL @cotopaul  who may be able to assist you further.

Please keep us updated on your post, and we hope you find a satisfactory solution to your query.


Regards,

Diana Torres,
Community Moderator


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar

@AhmedParvez,

If you need assistance with a problem, please make sure that you write everything in the post. Right now, you post does not contain any information regarding what you are trying to do 🙂 What is the input of that InvokeHTTP Processor and what are you trying to call and how? What is the answer you expect?

So basically the only possible answer you can get from how you described your post is:
You have a problem in your processor. Take a look into what you are doing and correct your mistake, as this will solve your problem.

avatar
Explorer

I have attached screenshots of the error if this can help. I am getting this error in invoke http processor where i am sending any api request though request successful getting following error message as - Processing failed : flow file [filename :xxx] : failed to import data from buffer (responsebodysource ()).due to org.apache.nifi.processor.exception.flowfileexception : unable to create contentclaim due to java.io.EOFException

avatar

As you know, EOF is an exception in Java that occurs when an end of file or end of stream is reached unexpectedly during input. In your case, if you receive this error, most likely you are sending the API call somehow wrong and you need to have a look at it.

In addition to this, check the nifi-app.log file to see the entire stack trace of the error message, as the bulletin board might not show you the entire error message 🙂

Besides that, are you certain that you have open connectivity between your NiFi Instance and the API Endpoint you are trying to call?

avatar
Explorer

Thanks for the answer. following is the complete stack trace log.

2023-10-10 14:01:01,542 INFO [main] o.e.jetty.server.handler.ContextHandler Started o.e.j.w.WebAppContext@15e0fe05{nifi-api,/nifi-api,file:///opt/exgw/nifi-1.17.0/work/jetty/nifi-web-api-1.17.0.war/webapp/,AVAILABLE}{./work/nar/extensions/nifi-server-nar-1.17.0.nar-unpacked/NAR-INF/bundled-dependencies/nifi-web-api-1.17.0.war}
2023-10-10 14:01:01,703 ERROR [Timer-Driven Process Thread-1] o.a.nifi.processors.standard.InvokeHTTP InvokeHTTP[id=22ec0a77-b91f-3a2a-e19b-dab6e46e0717] Request Processing failed: StandardFlowFileRecord[uuid=893fd559-fd28-475b-b2d1-e94fbf566d86,claim=,offset=0,name=893fd559-fd28-475b-b2d1-e94fbf566d86,size=0]
org.apache.nifi.processor.exception.FlowFileAccessException: Failed to import data from buffer(ResponseBodySource(okhttp3.internal.http1.Http1ExchangeCodec$ChunkedSource@1de64fd6)).inputStream() for StandardFlowFileRecord[uuid=f4327acc-d1ea-4450-a5ad-89723bfafec6,claim=,offset=0,name=893fd559-fd28-475b-b2d1-e94fbf566d86,size=0] due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable to create ContentClaim due to java.io.EOFException
at org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:3580)
at org.apache.nifi.processors.standard.InvokeHTTP.onTrigger(InvokeHTTP.java:1008)
at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1356)
at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:246)
at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:102)
at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
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:750)
Caused by: org.apache.nifi.processor.exception.FlowFileAccessException: Unable to create ContentClaim due to java.io.EOFException
at org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:3573)
... 13 common frames omitted
Caused by: java.io.EOFException: null
at okio.RealBufferedSource.require(RealBufferedSource.kt:199)
at okio.RealBufferedSource.readHexadecimalUnsignedLong(RealBufferedSource.kt:381)
at okhttp3.internal.http1.Http1ExchangeCodec$ChunkedSource.readChunkSize(Http1ExchangeCodec.kt:429)
at okhttp3.internal.http1.Http1ExchangeCodec$ChunkedSource.read(Http1ExchangeCodec.kt:408)
at okhttp3.internal.connection.Exchange$ResponseBodySource.read(Exchange.kt:276)
at okio.RealBufferedSource$inputStream$1.read(RealBufferedSource.kt:158)
at java.io.InputStream.read(InputStream.java:101)
at org.apache.nifi.controller.repository.io.TaskTerminationInputStream.read(TaskTerminationInputStream.java:62)
at org.apache.nifi.stream.io.StreamUtils.copy(StreamUtils.java:35)
at org.apache.nifi.controller.repository.FileSystemRepository.importFrom(FileSystemRepository.java:837)
at org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:3570)
... 13 common frames omitted

avatar
Explorer

Thanks for the answer. following is the complete stack trace log.

2023-10-10 14:01:01,542 INFO [main] o.e.jetty.server.handler.ContextHandler Started o.e.j.w.WebAppContext@15e0fe05{nifi-api,/nifi-api,file:///opt/exgw/nifi-1.17.0/work/jetty/nifi-web-api-1.17.0.war/webapp/,AVAILABLE}{./work/nar/extensions/nifi-server-nar-1.17.0.nar-unpacked/NAR-INF/bundled-dependencies/nifi-web-api-1.17.0.war}
2023-10-10 14:01:01,703 ERROR [Timer-Driven Process Thread-1] o.a.nifi.processors.standard.InvokeHTTP InvokeHTTP[id=22ec0a77-b91f-3a2a-e19b-dab6e46e0717] Request Processing failed: StandardFlowFileRecord[uuid=893fd559-fd28-475b-b2d1-e94fbf566d86,claim=,offset=0,name=893fd559-fd28-475b-b2d1-e94fbf566d86,size=0]
org.apache.nifi.processor.exception.FlowFileAccessException: Failed to import data from buffer(ResponseBodySource(okhttp3.internal.http1.Http1ExchangeCodec$ChunkedSource@1de64fd6)).inputStream() for StandardFlowFileRecord[uuid=f4327acc-d1ea-4450-a5ad-89723bfafec6,claim=,offset=0,name=893fd559-fd28-475b-b2d1-e94fbf566d86,size=0] due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable to create ContentClaim due to java.io.EOFException
at org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:3580)
at org.apache.nifi.processors.standard.InvokeHTTP.onTrigger(InvokeHTTP.java:1008)
at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1356)
at org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:246)
at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:102)
at org.apache.nifi.engine.FlowEngine$2.run(FlowEngine.java:110)
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:750)
Caused by: org.apache.nifi.processor.exception.FlowFileAccessException: Unable to create ContentClaim due to java.io.EOFException
at org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:3573)
... 13 common frames omitted
Caused by: java.io.EOFException: null
at okio.RealBufferedSource.require(RealBufferedSource.kt:199)
at okio.RealBufferedSource.readHexadecimalUnsignedLong(RealBufferedSource.kt:381)
at okhttp3.internal.http1.Http1ExchangeCodec$ChunkedSource.readChunkSize(Http1ExchangeCodec.kt:429)
at okhttp3.internal.http1.Http1ExchangeCodec$ChunkedSource.read(Http1ExchangeCodec.kt:408)
at okhttp3.internal.connection.Exchange$ResponseBodySource.read(Exchange.kt:276)
at okio.RealBufferedSource$inputStream$1.read(RealBufferedSource.kt:158)
at java.io.InputStream.read(InputStream.java:101)
at org.apache.nifi.controller.repository.io.TaskTerminationInputStream.read(TaskTerminationInputStream.java:62)
at org.apache.nifi.stream.io.StreamUtils.copy(StreamUtils.java:35)
at org.apache.nifi.controller.repository.FileSystemRepository.importFrom(FileSystemRepository.java:837)
at org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:3570)
... 13 common frames omitted

avatar
Explorer
@cotopaul Please help here. @Nifi @Apache  @ApacheNifi  . above is the stack trace

avatar

@AhmedParvez, have a look on what I told you in the previous post. EOF means that most likely you are sending the API call somehow wrong and you need to have a look at it. Try making that same exact API call from Postman or from Python (or actually anything you know how to use) and see if you encounter the same problem. Unfortunately this is not a NiFi Problem but a configuration problem and as you are very reluctant in providing all the details, nobody will be able to help you with your request 😞

Set your processor on debug and see what you can get extra from there as well. Maybe it will provide you with the necessary info to find your error.