Hadoop Common
  1. Hadoop Common
  2. HADOOP-3456

IPC.Client connect timeout should be configurable

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: 0.18.0
    • Fix Version/s: None
    • Component/s: ipc
    • Labels:
      None

      Description

      In ipc.Client.setupIOStreams, the connect timeout is hard-coded to 20 seconds

      // connection time out is 20s
      this.socket.connect(remoteId.getAddress(), 20000);

      This could be made configurable for deployments where a longer connect time is desired, or where a shorter connect time would detect failure faster.

        Issue Links

          Activity

          Hide
          steve_l added a comment -

          Reviewing this, the problem is still present in 0.22

          1. It is simple enough to add this as a new configuration parameter. Proposed: ipc.client.connect.timeout, keep 20000 as the default
          2. Testing: try to connect to a host whose hostname resolves, but doesn't have a live endpoint, with a timeout of 0. The obvious target is "localhost". Then look at the test time.

          The trouble with that test is that a localhost connect will probable fail with a connection refused exception, which may not stress the timeout. What we really want is a hostname that resolve (e.g. example.org) but which isn't running a live server, but nor is it rejecting connection requests outright.

          Thoughts?

          Show
          steve_l added a comment - Reviewing this, the problem is still present in 0.22 It is simple enough to add this as a new configuration parameter. Proposed: ipc.client.connect.timeout , keep 20000 as the default Testing: try to connect to a host whose hostname resolves, but doesn't have a live endpoint, with a timeout of 0. The obvious target is "localhost". Then look at the test time. The trouble with that test is that a localhost connect will probable fail with a connection refused exception, which may not stress the timeout. What we really want is a hostname that resolve (e.g. example.org) but which isn't running a live server, but nor is it rejecting connection requests outright. Thoughts?
          Hide
          Steve Loughran added a comment -

          marking as duplicate of HADOOP-7397 -that issue has code, so wins

          Show
          Steve Loughran added a comment - marking as duplicate of HADOOP-7397 -that issue has code, so wins

            People

            • Assignee:
              Steve Loughran
              Reporter:
              Steve Loughran
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development