You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Robert Joseph Evans (Commented) (JIRA)" <ji...@apache.org> on 2012/02/01 16:21:00 UTC

[jira] [Commented] (HADOOP-7086) Retrying socket connection failure times can be made as configurable

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

Robert Joseph Evans commented on HADOOP-7086:
---------------------------------------------

I am sorry about my dumb questions.  Like I said before I am not that familiar with the IPC code, and all I did was a quick pass through the patch without digging to understand deeply how each part of the code that was changed was used by the client.  I mistakenly thought that ConnectionId was something that was sent from the server to the client when the connection was established.  So yes it does look like it is client side only.  Also sorry it took me so long to respond I have been very busy lately.  I will go through the patch again, and try to dig into the IPC code a little bit more right now.

Also I have one minor nit.  ipc.client.connect.max.retries.on.timeouts has an 's' on the end with timeouts instead of timeout, but all of the static constants that refer to it do not IPC_CLIENT_CONNECT_MAX_RETRIES_ON_TIMEOUT_KEY  Could you please make them consistent.
                
> Retrying socket connection failure times can be made as configurable
> --------------------------------------------------------------------
>
>                 Key: HADOOP-7086
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7086
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: conf
>         Environment: NA
>            Reporter: Devaraj K
>            Assignee: Devaraj K
>            Priority: Minor
>             Fix For: 0.24.0
>
>         Attachments: HADOOP-7086-1.patch, HADOOP-7086.patch, common-3899.patch
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> Retrying socket connection failure times are hard coded as 45 and it is giving the retryring message for 45 times as below. 
> 2011-01-04 15:14:30,700 INFO ipc.Client (Client.java:handleConnectionFailure(487)) - Retrying connect to server: /10.18.52.124:50020. Already tried 1 time(s).
> This can be made as configurable and also we can keep the default value as 45. If the user wants to decrease/increase,  they can add this configurable property otherwise it can continue with the default value.
> common\src\java\org\apache\hadoop\ipc\Client.java:
> -----------------------------------------------------------------------
> private synchronized void setupConnection() throws IOException {
>       short ioFailures = 0;
>       short timeoutFailures = 0;
>       while (true) {
>         try {
>           this.socket = socketFactory.createSocket();
>           this.socket.setTcpNoDelay(tcpNoDelay);
>           // connection time out is 20s
>           NetUtils.connect(this.socket, remoteId.getAddress(), 20000);
>           if (rpcTimeout > 0) {
>             pingInterval = rpcTimeout;  // rpcTimeout overwrites pingInterval
>           }
>           this.socket.setSoTimeout(pingInterval);
>           return;
>         } catch (SocketTimeoutException toe) {
>           /*
>            * The max number of retries is 45, which amounts to 20s*45 = 15
>            * minutes retries.
>            */
>           handleConnectionFailure(timeoutFailures++, 45, toe);
>         } catch (IOException ie) {
>           handleConnectionFailure(ioFailures++, maxRetries, ie);
>         }
>       }
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira