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

Yun Gao commented on FLINK-21952:
---------------------------------

Hi [~pnowojski] sorry I also do not come up with one solution that does not 
rely on the Netty implementation. The method come to me is to add another 
condition specially: 
{code:java}
if ((cause instanceof IOException
                && cause.getMessage().equals("Connection reset by peer"))
        || (cause instanceof Errors.NativeIoException
                && cause.getMessage().contains("Connection reset by peer"))) {
   ...
}{code}
I checked other possible netty native errors, in addition to "connection reset 
by peer", the ones related to network also includes "connection refused" and 
"network is unreachable", but they should only happen during connection 
establishment. 

 

 

> Make all the "Connection reset by peer" exception wrapped as 
> RemoteTransportException
> -------------------------------------------------------------------------------------
>
>                 Key: FLINK-21952
>                 URL: https://issues.apache.org/jira/browse/FLINK-21952
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / Network
>            Reporter: Yun Gao
>            Priority: Major
>              Labels: stale-major
>
> In CreditBasedPartitionRequestClientHandler#exceptionCaught, the IOException 
> or the exception with exact message "Connection reset by peer" are marked as 
> RemoteTransportException. 
> However, with the current Netty implementation, sometimes it might throw 
> {code:java}
> org.apache.flink.shaded.netty4.io.netty.channel.unix.Errors$NativeIoException:
>  readAddress(..) failed: Connection reset by peer
> {code}
> in some case. It would be also wrapped as LocalTransportException, which 
> might cause some confusion. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to