[jira] [Commented] (NIFI-4959) HandleHttpRequest processor doesn't close/release incomplete message error

2018-05-10 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16470584#comment-16470584
 ] 

ASF subversion and git services commented on NIFI-4959:
---

Commit 8a97e3eb774755c07d1f40b474f2f8c800fdf362 in nifi's branch 
refs/heads/HDF-3.1-maint from [~mgaido]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=8a97e3e ]

NIFI-4959: Remove flowfiles and close connection for Bad Requests causing 
IOException

This closes #2544.

Signed-off-by: Mark Payne 


> HandleHttpRequest processor doesn't close/release incomplete message error
> --
>
> Key: NIFI-4959
> URL: https://issues.apache.org/jira/browse/NIFI-4959
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Affects Versions: 1.5.0
> Environment: Linux, all versions of nifi-1.X
>Reporter: Wynner
>Priority: Major
> Fix For: 1.6.0
>
>
> I am doing some testing with the HandleHttpRequest processor. My specific 
> test, involves sending an incomplete request and closing the connection from 
> the sending system.  Initially, it throws the error I expect, but it keeps 
> throwing the error over and over based on the request expiration configured 
> in the StandardHttpContextMap controller service.
>  The only way to stop the error message is to stop the processor. In my test, 
> I saw one failed request throw an error six times before I stopped the 
> processor.
> It doesn't seems to terminate the request on the NiFi side.
> Sample HTTP request
>  
> POST/ HTTP/ 1.1
> Host: foo.com
> Content-Type: text/plain
> Content-Length: 130
> say=Hi
>  
> I use the telnet command to connect to the system with the processor 
> listening, post the message above , close the connection, and then the 
> processor starts throws the following error indefinitely
> 2018-03-10 01:36:37,111 ERROR [Timer-Driven Process Thread-6] 
> o.a.n.p.standard.HandleHttpRequest 
> HandleHttpRequest[id=0d8547f7-0162-1000-9b84-129af2382259] 
> HandleHttpRequest[id=0d8547f7-0162-1000-9b84-129af2382259] failed to process 
> session due to org.apache.nifi.processor.exception.FlowFileAccessException: 
> Failed to import data from 
> HttpInputOverHTTP@46e7d12e[c=15,q=0,[0]=null,s=EARLY_EOF] for 
> StandardFlowFileRecord[uuid=32bb182d-f619-4b98-b6f8-c1ed50c2736a,claim=,offset=0,name=9714775822613527,size=0]
>  due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable 
> to create ContentClaim due to org.eclipse.jetty.io.EofException: Early EOF: {}
>  org.apache.nifi.processor.exception.FlowFileAccessException: Failed to 
> import data from HttpInputOverHTTP@46e7d12e[c=15,q=0,[0]=null,s=EARLY_EOF] 
> for 
> StandardFlowFileRecord[uuid=32bb182d-f619-4b98-b6f8-c1ed50c2736a,claim=,offset=0,name=9714775822613527,size=0]
>  due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable 
> to create ContentClaim due to org.eclipse.jetty.io.EofException: Early EOF
>  at 
> org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:2942)
>  at 
> org.apache.nifi.processors.standard.HandleHttpRequest.onTrigger(HandleHttpRequest.java:517)
>  at 
> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
>  at 
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1123)
>  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:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:745)
>  Caused by: org.apache.nifi.processor.exception.FlowFileAccessException: 
> Unable to create ContentClaim due to org.eclipse.jetty.io.EofException: Early 
> EOF
>  at 
> org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:2935)
>  ... 13 common frames omitted
>  Caused by: org.eclipse.jetty.io.EofException: Early EOF
>  at org.eclipse.jetty.server.HttpInput$3.getError(HttpInput.java:1104)
>  at 

[jira] [Commented] (NIFI-4959) HandleHttpRequest processor doesn't close/release incomplete message error

2018-03-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16402209#comment-16402209
 ] 

ASF GitHub Bot commented on NIFI-4959:
--

Github user mgaido91 commented on the issue:

https://github.com/apache/nifi/pull/2544
  
Thanks for your help @markap14


> HandleHttpRequest processor doesn't close/release incomplete message error
> --
>
> Key: NIFI-4959
> URL: https://issues.apache.org/jira/browse/NIFI-4959
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Affects Versions: 1.5.0, 1.6.0
> Environment: Linux, all versions of nifi-1.X
>Reporter: Wynner
>Priority: Major
> Fix For: 1.6.0
>
>
> I am doing some testing with the HandleHttpRequest processor. My specific 
> test, involves sending an incomplete request and closing the connection from 
> the sending system.  Initially, it throws the error I expect, but it keeps 
> throwing the error over and over based on the request expiration configured 
> in the StandardHttpContextMap controller service.
>  The only way to stop the error message is to stop the processor. In my test, 
> I saw one failed request throw an error six times before I stopped the 
> processor.
> It doesn't seems to terminate the request on the NiFi side.
> Sample HTTP request
>  
> POST/ HTTP/ 1.1
> Host: foo.com
> Content-Type: text/plain
> Content-Length: 130
> say=Hi
>  
> I use the telnet command to connect to the system with the processor 
> listening, post the message above , close the connection, and then the 
> processor starts throws the following error indefinitely
> 2018-03-10 01:36:37,111 ERROR [Timer-Driven Process Thread-6] 
> o.a.n.p.standard.HandleHttpRequest 
> HandleHttpRequest[id=0d8547f7-0162-1000-9b84-129af2382259] 
> HandleHttpRequest[id=0d8547f7-0162-1000-9b84-129af2382259] failed to process 
> session due to org.apache.nifi.processor.exception.FlowFileAccessException: 
> Failed to import data from 
> HttpInputOverHTTP@46e7d12e[c=15,q=0,[0]=null,s=EARLY_EOF] for 
> StandardFlowFileRecord[uuid=32bb182d-f619-4b98-b6f8-c1ed50c2736a,claim=,offset=0,name=9714775822613527,size=0]
>  due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable 
> to create ContentClaim due to org.eclipse.jetty.io.EofException: Early EOF: {}
>  org.apache.nifi.processor.exception.FlowFileAccessException: Failed to 
> import data from HttpInputOverHTTP@46e7d12e[c=15,q=0,[0]=null,s=EARLY_EOF] 
> for 
> StandardFlowFileRecord[uuid=32bb182d-f619-4b98-b6f8-c1ed50c2736a,claim=,offset=0,name=9714775822613527,size=0]
>  due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable 
> to create ContentClaim due to org.eclipse.jetty.io.EofException: Early EOF
>  at 
> org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:2942)
>  at 
> org.apache.nifi.processors.standard.HandleHttpRequest.onTrigger(HandleHttpRequest.java:517)
>  at 
> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
>  at 
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1123)
>  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:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:745)
>  Caused by: org.apache.nifi.processor.exception.FlowFileAccessException: 
> Unable to create ContentClaim due to org.eclipse.jetty.io.EofException: Early 
> EOF
>  at 
> org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:2935)
>  ... 13 common frames omitted
>  Caused by: org.eclipse.jetty.io.EofException: Early EOF
>  at org.eclipse.jetty.server.HttpInput$3.getError(HttpInput.java:1104)
>  at org.eclipse.jetty.server.HttpInput$3.noContent(HttpInput.java:1093)
>  at org.eclipse.jetty.server.HttpInput.read(HttpInput.java:307)
>  at java.io.InputStream.read(InputStream.java:101)
>  at 

[jira] [Commented] (NIFI-4959) HandleHttpRequest processor doesn't close/release incomplete message error

2018-03-16 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16402127#comment-16402127
 ] 

ASF subversion and git services commented on NIFI-4959:
---

Commit 86f162b611f89a483a95e362cac32153a055f057 in nifi's branch 
refs/heads/master from [~mgaido]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=86f162b ]

NIFI-4959: Remove flowfiles and close connection for Bad Requests causing 
IOException

This closes #2544.

Signed-off-by: Mark Payne 


> HandleHttpRequest processor doesn't close/release incomplete message error
> --
>
> Key: NIFI-4959
> URL: https://issues.apache.org/jira/browse/NIFI-4959
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Affects Versions: 1.5.0, 1.6.0
> Environment: Linux, all versions of nifi-1.X
>Reporter: Wynner
>Priority: Major
> Fix For: 1.6.0
>
>
> I am doing some testing with the HandleHttpRequest processor. My specific 
> test, involves sending an incomplete request and closing the connection from 
> the sending system.  Initially, it throws the error I expect, but it keeps 
> throwing the error over and over based on the request expiration configured 
> in the StandardHttpContextMap controller service.
>  The only way to stop the error message is to stop the processor. In my test, 
> I saw one failed request throw an error six times before I stopped the 
> processor.
> It doesn't seems to terminate the request on the NiFi side.
> Sample HTTP request
>  
> POST/ HTTP/ 1.1
> Host: foo.com
> Content-Type: text/plain
> Content-Length: 130
> say=Hi
>  
> I use the telnet command to connect to the system with the processor 
> listening, post the message above , close the connection, and then the 
> processor starts throws the following error indefinitely
> 2018-03-10 01:36:37,111 ERROR [Timer-Driven Process Thread-6] 
> o.a.n.p.standard.HandleHttpRequest 
> HandleHttpRequest[id=0d8547f7-0162-1000-9b84-129af2382259] 
> HandleHttpRequest[id=0d8547f7-0162-1000-9b84-129af2382259] failed to process 
> session due to org.apache.nifi.processor.exception.FlowFileAccessException: 
> Failed to import data from 
> HttpInputOverHTTP@46e7d12e[c=15,q=0,[0]=null,s=EARLY_EOF] for 
> StandardFlowFileRecord[uuid=32bb182d-f619-4b98-b6f8-c1ed50c2736a,claim=,offset=0,name=9714775822613527,size=0]
>  due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable 
> to create ContentClaim due to org.eclipse.jetty.io.EofException: Early EOF: {}
>  org.apache.nifi.processor.exception.FlowFileAccessException: Failed to 
> import data from HttpInputOverHTTP@46e7d12e[c=15,q=0,[0]=null,s=EARLY_EOF] 
> for 
> StandardFlowFileRecord[uuid=32bb182d-f619-4b98-b6f8-c1ed50c2736a,claim=,offset=0,name=9714775822613527,size=0]
>  due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable 
> to create ContentClaim due to org.eclipse.jetty.io.EofException: Early EOF
>  at 
> org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:2942)
>  at 
> org.apache.nifi.processors.standard.HandleHttpRequest.onTrigger(HandleHttpRequest.java:517)
>  at 
> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
>  at 
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1123)
>  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:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:745)
>  Caused by: org.apache.nifi.processor.exception.FlowFileAccessException: 
> Unable to create ContentClaim due to org.eclipse.jetty.io.EofException: Early 
> EOF
>  at 
> org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:2935)
>  ... 13 common frames omitted
>  Caused by: org.eclipse.jetty.io.EofException: Early EOF
>  at org.eclipse.jetty.server.HttpInput$3.getError(HttpInput.java:1104)
>  at 

[jira] [Commented] (NIFI-4959) HandleHttpRequest processor doesn't close/release incomplete message error

2018-03-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16402128#comment-16402128
 ] 

ASF GitHub Bot commented on NIFI-4959:
--

Github user markap14 commented on the issue:

https://github.com/apache/nifi/pull/2544
  
@mgaido91 all looks good to me. Thanks for addressing this! I've merged it 
to master.


> HandleHttpRequest processor doesn't close/release incomplete message error
> --
>
> Key: NIFI-4959
> URL: https://issues.apache.org/jira/browse/NIFI-4959
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Affects Versions: 1.5.0, 1.6.0
> Environment: Linux, all versions of nifi-1.X
>Reporter: Wynner
>Priority: Major
> Fix For: 1.6.0
>
>
> I am doing some testing with the HandleHttpRequest processor. My specific 
> test, involves sending an incomplete request and closing the connection from 
> the sending system.  Initially, it throws the error I expect, but it keeps 
> throwing the error over and over based on the request expiration configured 
> in the StandardHttpContextMap controller service.
>  The only way to stop the error message is to stop the processor. In my test, 
> I saw one failed request throw an error six times before I stopped the 
> processor.
> It doesn't seems to terminate the request on the NiFi side.
> Sample HTTP request
>  
> POST/ HTTP/ 1.1
> Host: foo.com
> Content-Type: text/plain
> Content-Length: 130
> say=Hi
>  
> I use the telnet command to connect to the system with the processor 
> listening, post the message above , close the connection, and then the 
> processor starts throws the following error indefinitely
> 2018-03-10 01:36:37,111 ERROR [Timer-Driven Process Thread-6] 
> o.a.n.p.standard.HandleHttpRequest 
> HandleHttpRequest[id=0d8547f7-0162-1000-9b84-129af2382259] 
> HandleHttpRequest[id=0d8547f7-0162-1000-9b84-129af2382259] failed to process 
> session due to org.apache.nifi.processor.exception.FlowFileAccessException: 
> Failed to import data from 
> HttpInputOverHTTP@46e7d12e[c=15,q=0,[0]=null,s=EARLY_EOF] for 
> StandardFlowFileRecord[uuid=32bb182d-f619-4b98-b6f8-c1ed50c2736a,claim=,offset=0,name=9714775822613527,size=0]
>  due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable 
> to create ContentClaim due to org.eclipse.jetty.io.EofException: Early EOF: {}
>  org.apache.nifi.processor.exception.FlowFileAccessException: Failed to 
> import data from HttpInputOverHTTP@46e7d12e[c=15,q=0,[0]=null,s=EARLY_EOF] 
> for 
> StandardFlowFileRecord[uuid=32bb182d-f619-4b98-b6f8-c1ed50c2736a,claim=,offset=0,name=9714775822613527,size=0]
>  due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable 
> to create ContentClaim due to org.eclipse.jetty.io.EofException: Early EOF
>  at 
> org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:2942)
>  at 
> org.apache.nifi.processors.standard.HandleHttpRequest.onTrigger(HandleHttpRequest.java:517)
>  at 
> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
>  at 
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1123)
>  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:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:745)
>  Caused by: org.apache.nifi.processor.exception.FlowFileAccessException: 
> Unable to create ContentClaim due to org.eclipse.jetty.io.EofException: Early 
> EOF
>  at 
> org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:2935)
>  ... 13 common frames omitted
>  Caused by: org.eclipse.jetty.io.EofException: Early EOF
>  at org.eclipse.jetty.server.HttpInput$3.getError(HttpInput.java:1104)
>  at org.eclipse.jetty.server.HttpInput$3.noContent(HttpInput.java:1093)
>  at org.eclipse.jetty.server.HttpInput.read(HttpInput.java:307)
>  at 

[jira] [Commented] (NIFI-4959) HandleHttpRequest processor doesn't close/release incomplete message error

2018-03-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16402130#comment-16402130
 ] 

ASF GitHub Bot commented on NIFI-4959:
--

Github user asfgit closed the pull request at:

https://github.com/apache/nifi/pull/2544


> HandleHttpRequest processor doesn't close/release incomplete message error
> --
>
> Key: NIFI-4959
> URL: https://issues.apache.org/jira/browse/NIFI-4959
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Affects Versions: 1.5.0, 1.6.0
> Environment: Linux, all versions of nifi-1.X
>Reporter: Wynner
>Priority: Major
> Fix For: 1.6.0
>
>
> I am doing some testing with the HandleHttpRequest processor. My specific 
> test, involves sending an incomplete request and closing the connection from 
> the sending system.  Initially, it throws the error I expect, but it keeps 
> throwing the error over and over based on the request expiration configured 
> in the StandardHttpContextMap controller service.
>  The only way to stop the error message is to stop the processor. In my test, 
> I saw one failed request throw an error six times before I stopped the 
> processor.
> It doesn't seems to terminate the request on the NiFi side.
> Sample HTTP request
>  
> POST/ HTTP/ 1.1
> Host: foo.com
> Content-Type: text/plain
> Content-Length: 130
> say=Hi
>  
> I use the telnet command to connect to the system with the processor 
> listening, post the message above , close the connection, and then the 
> processor starts throws the following error indefinitely
> 2018-03-10 01:36:37,111 ERROR [Timer-Driven Process Thread-6] 
> o.a.n.p.standard.HandleHttpRequest 
> HandleHttpRequest[id=0d8547f7-0162-1000-9b84-129af2382259] 
> HandleHttpRequest[id=0d8547f7-0162-1000-9b84-129af2382259] failed to process 
> session due to org.apache.nifi.processor.exception.FlowFileAccessException: 
> Failed to import data from 
> HttpInputOverHTTP@46e7d12e[c=15,q=0,[0]=null,s=EARLY_EOF] for 
> StandardFlowFileRecord[uuid=32bb182d-f619-4b98-b6f8-c1ed50c2736a,claim=,offset=0,name=9714775822613527,size=0]
>  due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable 
> to create ContentClaim due to org.eclipse.jetty.io.EofException: Early EOF: {}
>  org.apache.nifi.processor.exception.FlowFileAccessException: Failed to 
> import data from HttpInputOverHTTP@46e7d12e[c=15,q=0,[0]=null,s=EARLY_EOF] 
> for 
> StandardFlowFileRecord[uuid=32bb182d-f619-4b98-b6f8-c1ed50c2736a,claim=,offset=0,name=9714775822613527,size=0]
>  due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable 
> to create ContentClaim due to org.eclipse.jetty.io.EofException: Early EOF
>  at 
> org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:2942)
>  at 
> org.apache.nifi.processors.standard.HandleHttpRequest.onTrigger(HandleHttpRequest.java:517)
>  at 
> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
>  at 
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1123)
>  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:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:745)
>  Caused by: org.apache.nifi.processor.exception.FlowFileAccessException: 
> Unable to create ContentClaim due to org.eclipse.jetty.io.EofException: Early 
> EOF
>  at 
> org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:2935)
>  ... 13 common frames omitted
>  Caused by: org.eclipse.jetty.io.EofException: Early EOF
>  at org.eclipse.jetty.server.HttpInput$3.getError(HttpInput.java:1104)
>  at org.eclipse.jetty.server.HttpInput$3.noContent(HttpInput.java:1093)
>  at org.eclipse.jetty.server.HttpInput.read(HttpInput.java:307)
>  at java.io.InputStream.read(InputStream.java:101)
>  at org.apache.nifi.stream.io.StreamUtils.copy(StreamUtils.java:35)
>  at 
> 

[jira] [Commented] (NIFI-4959) HandleHttpRequest processor doesn't close/release incomplete message error

2018-03-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16402114#comment-16402114
 ] 

ASF GitHub Bot commented on NIFI-4959:
--

Github user markap14 commented on the issue:

https://github.com/apache/nifi/pull/2544
  
@mgaido91 i agree, i addressed the JMS tests on master. Will take a look at 
this now. Thanks!~


> HandleHttpRequest processor doesn't close/release incomplete message error
> --
>
> Key: NIFI-4959
> URL: https://issues.apache.org/jira/browse/NIFI-4959
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Affects Versions: 1.5.0, 1.6.0
> Environment: Linux, all versions of nifi-1.X
>Reporter: Wynner
>Priority: Major
>
> I am doing some testing with the HandleHttpRequest processor. My specific 
> test, involves sending an incomplete request and closing the connection from 
> the sending system.  Initially, it throws the error I expect, but it keeps 
> throwing the error over and over based on the request expiration configured 
> in the StandardHttpContextMap controller service.
>  The only way to stop the error message is to stop the processor. In my test, 
> I saw one failed request throw an error six times before I stopped the 
> processor.
> It doesn't seems to terminate the request on the NiFi side.
> Sample HTTP request
>  
> POST/ HTTP/ 1.1
> Host: foo.com
> Content-Type: text/plain
> Content-Length: 130
> say=Hi
>  
> I use the telnet command to connect to the system with the processor 
> listening, post the message above , close the connection, and then the 
> processor starts throws the following error indefinitely
> 2018-03-10 01:36:37,111 ERROR [Timer-Driven Process Thread-6] 
> o.a.n.p.standard.HandleHttpRequest 
> HandleHttpRequest[id=0d8547f7-0162-1000-9b84-129af2382259] 
> HandleHttpRequest[id=0d8547f7-0162-1000-9b84-129af2382259] failed to process 
> session due to org.apache.nifi.processor.exception.FlowFileAccessException: 
> Failed to import data from 
> HttpInputOverHTTP@46e7d12e[c=15,q=0,[0]=null,s=EARLY_EOF] for 
> StandardFlowFileRecord[uuid=32bb182d-f619-4b98-b6f8-c1ed50c2736a,claim=,offset=0,name=9714775822613527,size=0]
>  due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable 
> to create ContentClaim due to org.eclipse.jetty.io.EofException: Early EOF: {}
>  org.apache.nifi.processor.exception.FlowFileAccessException: Failed to 
> import data from HttpInputOverHTTP@46e7d12e[c=15,q=0,[0]=null,s=EARLY_EOF] 
> for 
> StandardFlowFileRecord[uuid=32bb182d-f619-4b98-b6f8-c1ed50c2736a,claim=,offset=0,name=9714775822613527,size=0]
>  due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable 
> to create ContentClaim due to org.eclipse.jetty.io.EofException: Early EOF
>  at 
> org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:2942)
>  at 
> org.apache.nifi.processors.standard.HandleHttpRequest.onTrigger(HandleHttpRequest.java:517)
>  at 
> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
>  at 
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1123)
>  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:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:745)
>  Caused by: org.apache.nifi.processor.exception.FlowFileAccessException: 
> Unable to create ContentClaim due to org.eclipse.jetty.io.EofException: Early 
> EOF
>  at 
> org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:2935)
>  ... 13 common frames omitted
>  Caused by: org.eclipse.jetty.io.EofException: Early EOF
>  at org.eclipse.jetty.server.HttpInput$3.getError(HttpInput.java:1104)
>  at org.eclipse.jetty.server.HttpInput$3.noContent(HttpInput.java:1093)
>  at org.eclipse.jetty.server.HttpInput.read(HttpInput.java:307)
>  at java.io.InputStream.read(InputStream.java:101)
>  at 

[jira] [Commented] (NIFI-4959) HandleHttpRequest processor doesn't close/release incomplete message error

2018-03-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16402048#comment-16402048
 ] 

ASF GitHub Bot commented on NIFI-4959:
--

Github user mgaido91 commented on the issue:

https://github.com/apache/nifi/pull/2544
  
the test error is unrelated:
```
[INFO] --- maven-remote-resources-plugin:1.5:process 
(process-resource-bundles) @ nifi-hive-processors ---
[ERROR] Tests run: 4, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 
13.251 s <<< FAILURE! - in org.apache.nifi.jms.processors.PublishJMSTest
[ERROR] 
validateSuccessfulPublishAndTransferToSuccessWithEL(org.apache.nifi.jms.processors.PublishJMSTest)
  Time elapsed: 10.007 s  <<< ERROR!
org.junit.runners.model.TestTimedOutException: test timed out after 1 
milliseconds
at 
org.apache.nifi.jms.processors.PublishJMSTest.validateSuccessfulPublishAndTransferToSuccessWithEL(PublishJMSTest.java:103)
```


> HandleHttpRequest processor doesn't close/release incomplete message error
> --
>
> Key: NIFI-4959
> URL: https://issues.apache.org/jira/browse/NIFI-4959
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Affects Versions: 1.5.0, 1.6.0
> Environment: Linux, all versions of nifi-1.X
>Reporter: Wynner
>Priority: Major
>
> I am doing some testing with the HandleHttpRequest processor. My specific 
> test, involves sending an incomplete request and closing the connection from 
> the sending system.  Initially, it throws the error I expect, but it keeps 
> throwing the error over and over based on the request expiration configured 
> in the StandardHttpContextMap controller service.
>  The only way to stop the error message is to stop the processor. In my test, 
> I saw one failed request throw an error six times before I stopped the 
> processor.
> It doesn't seems to terminate the request on the NiFi side.
> Sample HTTP request
>  
> POST/ HTTP/ 1.1
> Host: foo.com
> Content-Type: text/plain
> Content-Length: 130
> say=Hi
>  
> I use the telnet command to connect to the system with the processor 
> listening, post the message above , close the connection, and then the 
> processor starts throws the following error indefinitely
> 2018-03-10 01:36:37,111 ERROR [Timer-Driven Process Thread-6] 
> o.a.n.p.standard.HandleHttpRequest 
> HandleHttpRequest[id=0d8547f7-0162-1000-9b84-129af2382259] 
> HandleHttpRequest[id=0d8547f7-0162-1000-9b84-129af2382259] failed to process 
> session due to org.apache.nifi.processor.exception.FlowFileAccessException: 
> Failed to import data from 
> HttpInputOverHTTP@46e7d12e[c=15,q=0,[0]=null,s=EARLY_EOF] for 
> StandardFlowFileRecord[uuid=32bb182d-f619-4b98-b6f8-c1ed50c2736a,claim=,offset=0,name=9714775822613527,size=0]
>  due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable 
> to create ContentClaim due to org.eclipse.jetty.io.EofException: Early EOF: {}
>  org.apache.nifi.processor.exception.FlowFileAccessException: Failed to 
> import data from HttpInputOverHTTP@46e7d12e[c=15,q=0,[0]=null,s=EARLY_EOF] 
> for 
> StandardFlowFileRecord[uuid=32bb182d-f619-4b98-b6f8-c1ed50c2736a,claim=,offset=0,name=9714775822613527,size=0]
>  due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable 
> to create ContentClaim due to org.eclipse.jetty.io.EofException: Early EOF
>  at 
> org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:2942)
>  at 
> org.apache.nifi.processors.standard.HandleHttpRequest.onTrigger(HandleHttpRequest.java:517)
>  at 
> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
>  at 
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1123)
>  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:1142)
>  at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  at java.lang.Thread.run(Thread.java:745)
>  Caused by: 

[jira] [Commented] (NIFI-4959) HandleHttpRequest processor doesn't close/release incomplete message error

2018-03-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16401830#comment-16401830
 ] 

ASF GitHub Bot commented on NIFI-4959:
--

Github user mgaido91 commented on a diff in the pull request:

https://github.com/apache/nifi/pull/2544#discussion_r175079382
  
--- Diff: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/HandleHttpRequest.java
 ---
@@ -520,6 +521,27 @@ public void onTrigger(final ProcessContext context, 
final ProcessSession session
 new Object[]{request.getRemoteAddr(), e});
 session.remove(flowFile);
 return;
+} catch (final FlowFileAccessException e) {
+// some bad requests can produce a IOException on the HTTP 
stream, which makes a FlowFileAccessException to
+// be thrown. We should handle these cases here, while other 
FlowFileAccessException are re-thrown
+if (!(e.getCause() != null && e.getCause() instanceof 
FlowFileAccessException
--- End diff --

yes, thank you very much for your comment and your help @markap14 . I am 
updating the PR accordingly. Thanks.


> HandleHttpRequest processor doesn't close/release incomplete message error
> --
>
> Key: NIFI-4959
> URL: https://issues.apache.org/jira/browse/NIFI-4959
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Affects Versions: 1.5.0, 1.6.0
> Environment: Linux, all versions of nifi-1.X
>Reporter: Wynner
>Priority: Major
>
> I am doing some testing with the HandleHttpRequest processor. My specific 
> test, involves sending an incomplete request and closing the connection from 
> the sending system.  Initially, it throws the error I expect, but it keeps 
> throwing the error over and over based on the request expiration configured 
> in the StandardHttpContextMap controller service.
>  The only way to stop the error message is to stop the processor. In my test, 
> I saw one failed request throw an error six times before I stopped the 
> processor.
> It doesn't seems to terminate the request on the NiFi side.
> Sample HTTP request
>  
> POST/ HTTP/ 1.1
> Host: foo.com
> Content-Type: text/plain
> Content-Length: 130
> say=Hi
>  
> I use the telnet command to connect to the system with the processor 
> listening, post the message above , close the connection, and then the 
> processor starts throws the following error indefinitely
> 2018-03-10 01:36:37,111 ERROR [Timer-Driven Process Thread-6] 
> o.a.n.p.standard.HandleHttpRequest 
> HandleHttpRequest[id=0d8547f7-0162-1000-9b84-129af2382259] 
> HandleHttpRequest[id=0d8547f7-0162-1000-9b84-129af2382259] failed to process 
> session due to org.apache.nifi.processor.exception.FlowFileAccessException: 
> Failed to import data from 
> HttpInputOverHTTP@46e7d12e[c=15,q=0,[0]=null,s=EARLY_EOF] for 
> StandardFlowFileRecord[uuid=32bb182d-f619-4b98-b6f8-c1ed50c2736a,claim=,offset=0,name=9714775822613527,size=0]
>  due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable 
> to create ContentClaim due to org.eclipse.jetty.io.EofException: Early EOF: {}
>  org.apache.nifi.processor.exception.FlowFileAccessException: Failed to 
> import data from HttpInputOverHTTP@46e7d12e[c=15,q=0,[0]=null,s=EARLY_EOF] 
> for 
> StandardFlowFileRecord[uuid=32bb182d-f619-4b98-b6f8-c1ed50c2736a,claim=,offset=0,name=9714775822613527,size=0]
>  due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable 
> to create ContentClaim due to org.eclipse.jetty.io.EofException: Early EOF
>  at 
> org.apache.nifi.controller.repository.StandardProcessSession.importFrom(StandardProcessSession.java:2942)
>  at 
> org.apache.nifi.processors.standard.HandleHttpRequest.onTrigger(HandleHttpRequest.java:517)
>  at 
> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
>  at 
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1123)
>  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 
> 

[jira] [Commented] (NIFI-4959) HandleHttpRequest processor doesn't close/release incomplete message error

2018-03-15 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16401072#comment-16401072
 ] 

ASF GitHub Bot commented on NIFI-4959:
--

Github user markap14 commented on a diff in the pull request:

https://github.com/apache/nifi/pull/2544#discussion_r174922021
  
--- Diff: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/HandleHttpRequest.java
 ---
@@ -520,6 +521,27 @@ public void onTrigger(final ProcessContext context, 
final ProcessSession session
 new Object[]{request.getRemoteAddr(), e});
 session.remove(flowFile);
 return;
+} catch (final FlowFileAccessException e) {
+// some bad requests can produce a IOException on the HTTP 
stream, which makes a FlowFileAccessException to
+// be thrown. We should handle these cases here, while other 
FlowFileAccessException are re-thrown
+if (!(e.getCause() != null && e.getCause() instanceof 
FlowFileAccessException
--- End diff --

This logic seems very specific to me. I'm afraid that it's also quite 
brittle, as well, because the wrapping of those exceptions could change at any 
time. I *think* the idea here is "If you hit an IOException when reading from 
the HTTP Request, then send back a BAD REQUEST status code. Else, rethrow the 
Exception." Correct?

If so, we could make this a little cleaner and more stable, IMO, if we 
change the logic above a little bit. Instead of calling 
`ProcessSession.importFrom(InputStream, FlowFile)` (which would throw 
FlowFileAccessException if any IOException is thrown), we can change it to 
something like:

```
try (OutputStream flowFileOut = session.write(flowFile)) {
  StreamUtils.copy(request.getInputStream(), flowFileOut);
} catch (IOException ioe) {
  // this will occur only if an IOException is thrown from reading the 
InputStream. If an IOException is thrown from
  // the OutputStream, the OutputStream will always wrap it with a 
FlowFileAccessException because this is
  // a "special case" where we are writing to the Content Repo.

  //  ... new logic here to remove flowfile and send back bad request 
status code
}
```


> HandleHttpRequest processor doesn't close/release incomplete message error
> --
>
> Key: NIFI-4959
> URL: https://issues.apache.org/jira/browse/NIFI-4959
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Affects Versions: 1.5.0, 1.6.0
> Environment: Linux, all versions of nifi-1.X
>Reporter: Wynner
>Priority: Major
>
> I am doing some testing with the HandleHttpRequest processor. My specific 
> test, involves sending an incomplete request and closing the connection from 
> the sending system.  Initially, it throws the error I expect, but it keeps 
> throwing the error over and over based on the request expiration configured 
> in the StandardHttpContextMap controller service.
>  The only way to stop the error message is to stop the processor. In my test, 
> I saw one failed request throw an error six times before I stopped the 
> processor.
> It doesn't seems to terminate the request on the NiFi side.
> Sample HTTP request
>  
> POST/ HTTP/ 1.1
> Host: foo.com
> Content-Type: text/plain
> Content-Length: 130
> say=Hi
>  
> I use the telnet command to connect to the system with the processor 
> listening, post the message above , close the connection, and then the 
> processor starts throws the following error indefinitely
> 2018-03-10 01:36:37,111 ERROR [Timer-Driven Process Thread-6] 
> o.a.n.p.standard.HandleHttpRequest 
> HandleHttpRequest[id=0d8547f7-0162-1000-9b84-129af2382259] 
> HandleHttpRequest[id=0d8547f7-0162-1000-9b84-129af2382259] failed to process 
> session due to org.apache.nifi.processor.exception.FlowFileAccessException: 
> Failed to import data from 
> HttpInputOverHTTP@46e7d12e[c=15,q=0,[0]=null,s=EARLY_EOF] for 
> StandardFlowFileRecord[uuid=32bb182d-f619-4b98-b6f8-c1ed50c2736a,claim=,offset=0,name=9714775822613527,size=0]
>  due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable 
> to create ContentClaim due to org.eclipse.jetty.io.EofException: Early EOF: {}
>  org.apache.nifi.processor.exception.FlowFileAccessException: Failed to 
> import data from HttpInputOverHTTP@46e7d12e[c=15,q=0,[0]=null,s=EARLY_EOF] 
> for 
> StandardFlowFileRecord[uuid=32bb182d-f619-4b98-b6f8-c1ed50c2736a,claim=,offset=0,name=9714775822613527,size=0]
>  due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable 
> to create ContentClaim due to org.eclipse.jetty.io.EofException: Early EOF
>  at 
> 

[jira] [Commented] (NIFI-4959) HandleHttpRequest processor doesn't close/release incomplete message error

2018-03-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-4959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16398756#comment-16398756
 ] 

ASF GitHub Bot commented on NIFI-4959:
--

GitHub user mgaido91 opened a pull request:

https://github.com/apache/nifi/pull/2544

NIFI-4959: Remove flowfiles and close connection for Bad Requests causing 
IOException



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?
- [ ] Have you written or updated unit tests to verify your changes? Tested 
manually
- [ ] 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)? NA
- [ ] If applicable, have you updated the LICENSE file, including the main 
LICENSE file under nifi-assembly? NA
- [ ] If applicable, have you updated the NOTICE file, including the main 
NOTICE file found under nifi-assembly? NA
- [ ] If adding new Properties, have you added .displayName in addition to 
.name (programmatic access) for each of the new properties? NA

### For documentation related changes:
- [ ] 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/mgaido91/nifi NIFI-4959

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/nifi/pull/2544.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 #2544


commit 15f0a04a1b2b4600ccf2b43b83f0ec157dbfd500
Author: Marco Gaido 
Date:   2018-03-14T15:27:17Z

NIFI-4959: Remove flowfiles and close connection for Bad Requests causing 
IOException




> HandleHttpRequest processor doesn't close/release incomplete message error
> --
>
> Key: NIFI-4959
> URL: https://issues.apache.org/jira/browse/NIFI-4959
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Affects Versions: 1.5.0, 1.6.0
> Environment: Linux, all versions of nifi-1.X
>Reporter: Wynner
>Priority: Major
>
> I am doing some testing with the HandleHttpRequest processor. My specific 
> test, involves sending an incomplete request and closing the connection from 
> the sending system.  Initially, it throws the error I expect, but it keeps 
> throwing the error over and over based on the request expiration configured 
> in the StandardHttpContextMap controller service.
>  The only way to stop the error message is to stop the processor. In my test, 
> I saw one failed request throw an error six times before I stopped the 
> processor.
> It doesn't seems to terminate the request on the NiFi side.
> Sample HTTP request
>  
> POST/ HTTP/ 1.1
> Host: foo.com
> Content-Type: text/plain
> Content-Length: 130
> say=Hi
>  
> I use the telnet command to connect to the system with the processor 
> listening, post the message above , close the connection, and then the 
> processor starts throws the following error indefinitely
> 2018-03-10 01:36:37,111 ERROR [Timer-Driven Process Thread-6] 
> o.a.n.p.standard.HandleHttpRequest 
> HandleHttpRequest[id=0d8547f7-0162-1000-9b84-129af2382259] 
> HandleHttpRequest[id=0d8547f7-0162-1000-9b84-129af2382259] failed to process 
> session due to org.apache.nifi.processor.exception.FlowFileAccessException: 
> Failed to import data from 
> HttpInputOverHTTP@46e7d12e[c=15,q=0,[0]=null,s=EARLY_EOF] for 
> StandardFlowFileRecord[uuid=32bb182d-f619-4b98-b6f8-c1ed50c2736a,claim=,offset=0,name=9714775822613527,size=0]
>  due to org.apache.nifi.processor.exception.FlowFileAccessException: Unable 
> to create ContentClaim due to org.eclipse.jetty.io.EofException: Early EOF: {}
>