Uploaded image for project: 'mod_cluster'
  1. mod_cluster
  2. MODCLUSTER-155

jboss.mod_cluster.proxyList: invalid hosts cause mod-cluster startup to be delayed

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 1.1.0.CR2
    • Component/s: None
    • Labels:
      None

      Description

      When I set jbss.mod_cluster.proxyList (e.g.) to "http1.dyndns.org:8000,1.2.3.4:8000", mod-cluster does connect to http1.dyndns.org:8000 (assuming it's running), but blocks for 10 minutes trying to connect to 1.2.3.4:8000.

      It eventually times out connecting to 1.2.3.4, and then seems to default to 127.0.0.1 !

      A better mechanism would be to connect via a timeout (see code below), and to simply skip unreachable httpd instances. The reconnect mechanism can always add httpds (which become reachable) later.

      The code to connect to a socket with a timeout would be:
      Socket sock=new Socket(new InetSocketAddress("1.2.3.4", 8000), 1000);

      This call blocks until it has connected to 1.2.3.4:8000, or until 1 sec has elapsed, whichever occurs first.

      In any case, it doesn't block until the OS defined socket connect timeout kicks in; this might be up to 10 mins !

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                pferraro Paul Ferraro
                Reporter:
                belaban Bela Ban
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: