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

ASF GitHub Bot commented on NIFI-3447:
--------------------------------------

GitHub user pvillard31 opened a pull request:

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

    NIFI-3447 - PutSplunk - force connection close

    - when the channel sender fails to send data, closing it to force the 
creation of a new one next time.
    - replace deprecated org.apache.nifi.stream.io by java.io equivalent in 
classes concerned by this PR.
    
    To reproduce the issue, it is easy to start a splunk/splunk:latest docker 
container and add a TCP receiver to listen on a given port. Start a GenerateFF 
and a PutSplunk processor, then stop the container, wait a bit to see some 
errors in NiFi, and start again the container. The processor won't be able to 
reconnect and will try again and again.
    
    ==================================================
    
    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:
    - [ ] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [ ] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number 
you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [ ] Has your PR been rebased against the latest commit within the target 
branch (typically master)?
    
    - [ ] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [ ] 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?
    - [ ] 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)? 
    - [ ] If applicable, have you updated the LICENSE file, including the main 
LICENSE file under nifi-assembly?
    - [ ] If applicable, have you updated the NOTICE file, including the main 
NOTICE file found under nifi-assembly?
    - [ ] If adding new Properties, have you added .displayName in addition to 
.name (programmatic access) for each of the new properties?
    
    ### 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/pvillard31/nifi splunk-broken-pipe

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

    https://github.com/apache/nifi/pull/1479.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 #1479
    
----
commit 6509d9b236e9cf756618f52d971e95e31b4dcc83
Author: Pierre Villard <[email protected]>
Date:   2017-02-07T13:23:57Z

    NIFI-3447 - PutSplunk - force connection close

----


> PutSplunk - Broken Pipe - Fails to reconnect
> --------------------------------------------
>
>                 Key: NIFI-3447
>                 URL: https://issues.apache.org/jira/browse/NIFI-3447
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.1.1
>            Reporter: Pierre Villard
>            Assignee: Pierre Villard
>
> PutSplunk processor is not able to recover from a connection loss: if the 
> Splunk server goes down, the processor will indefinitely fail sending data 
> when the server is back:
> {noformat}
> 2017-02-07 13:17:29,044 ERROR [Timer-Driven Process Thread-2] 
> o.a.nifi.processors.splunk.PutSplunk 
> PutSplunk[id=015a101d-be60-183a-7e7e-6437f7600da5] Failed to send 
> StandardFlowFileRecord[uuid=940bd376-adc1-4a7a-8f86-8a635fab621a,claim=StandardContentClaim
>  [resourceClaim=StandardResourceClaim[id=1485896025601-1, container=default, 
> section=1], offset=67695, 
> length=2963],offset=2582,name=nifi-app.27253-30216.log,size=128]; routing to 
> 'failure'; last failure reason reported was java.io.IOException: Broken 
> pipe;: java.io.IOException: Broken pipe
> 2017-02-07 13:17:29,045 ERROR [Timer-Driven Process Thread-2] 
> o.a.nifi.processors.splunk.PutSplunk
> java.io.IOException: Broken pipe
>       at sun.nio.ch.FileDispatcherImpl.write0(Native Method) ~[na:1.8.0_77]
>       at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47) 
> ~[na:1.8.0_77]
>       at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) 
> ~[na:1.8.0_77]
>       at sun.nio.ch.IOUtil.write(IOUtil.java:65) ~[na:1.8.0_77]
>       at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471) 
> ~[na:1.8.0_77]
>       at 
> org.apache.nifi.remote.io.socket.SocketChannelOutputStream.write(SocketChannelOutputStream.java:87)
>  ~[nifi-utils-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
>       at 
> org.apache.nifi.remote.io.socket.SocketChannelOutputStream.write(SocketChannelOutputStream.java:76)
>  ~[nifi-utils-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
>       at 
> org.apache.nifi.processor.util.put.sender.SocketChannelSender.write(SocketChannelSender.java:83)
>  ~[nifi-processor-utils-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
>       at 
> org.apache.nifi.processor.util.put.sender.ChannelSender.send(ChannelSender.java:83)
>  ~[nifi-processor-utils-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
>       at 
> org.apache.nifi.processors.splunk.PutSplunk.processSingleMessage(PutSplunk.java:202)
>  ~[nifi-splunk-processors-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
>       at 
> org.apache.nifi.processors.splunk.PutSplunk.onTrigger(PutSplunk.java:162) 
> ~[nifi-splunk-processors-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
>       at 
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1099)
>  [nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
>       at 
> org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136)
>  [nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
>       at 
> org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47)
>  [nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
>       at 
> org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132)
>  [nifi-framework-core-1.2.0-SNAPSHOT.jar:1.2.0-SNAPSHOT]
>       at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
> [na:1.8.0_77]
>       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) 
> [na:1.8.0_77]
>       at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
>  [na:1.8.0_77]
>       at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
>  [na:1.8.0_77]
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>  [na:1.8.0_77]
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>  [na:1.8.0_77]
>       at java.lang.Thread.run(Thread.java:745) [na:1.8.0_77]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to