3 Replies Latest reply on Jul 16, 2009 3:56 PM by brian.stansberry

    Cluster connecting to localhost loopback

    mohitanchlia

      We are setting up new servers and these servers are not joining cluster. It looks like the multicast address is binding on the loopback interface. I am not sure why that is happening? I see the following in logs:

      2009-07-15 08:10:42,747 INFO [ha.jndi.DetachedHANamingService$AutomaticDiscovery] - Listening on /0.0.0.0:1102, group=228.1.2.13, HA-JNDI address=127.0.0.1:1100

      ---

      Why would cluster try to bind on loopback?

      <UDP mcast_addr="${efe.partition.udpGroup:228.1.2.3}"
      mcast_port="${jboss.hapartition.mcast_port:45566}"
      tos="8"
      ucast_recv_buf_size="20000000"
      ucast_send_buf_size="640000"
      mcast_recv_buf_size="25000000"
      mcast_send_buf_size="640000"
      loopback="false"
      discard_incompatible_packets="true"
      enable_bundling="false"
      max_bundle_size="64000"
      max_bundle_timeout="30"
      use_incoming_packet_handler="true"
      use_outgoing_packet_handler="false"
      ip_ttl="${jgroups.udp.ip_ttl:2}"
      down_thread="false" up_thread="false"/>
      <PING timeout="2000"
      down_thread="false" up_thread="false" num_initial_members="3"/>
      <MERGE2 max_interval="100000"
      down_thread="false" up_thread="false" min_interval="20000"/>
      <FD_SOCK down_thread="false" up_thread="false"/>
      <FD timeout="10000" max_tries="5" down_thread="false" up_thread="false" shun="true"/>
      <VERIFY_SUSPECT timeout="1500" down_thread="false" up_thread="false"/>
      <pbcast.NAKACK max_xmit_size="60000"
      use_mcast_xmit="false" gc_lag="0"
      retransmit_timeout="300,600,1200,2400,4800"
      down_thread="false" up_thread="false"
      discard_delivered_msgs="true"/>
      <UNICAST timeout="300,600,1200,2400,3600"
      down_thread="false" up_thread="false"/>
      <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
      down_thread="false" up_thread="false"
      max_bytes="400000"/>
      <pbcast.GMS print_local_addr="true" join_timeout="3000"
      down_thread="false" up_thread="false"
      join_retry_timeout="2000" shun="true"
      view_bundling="true"/>
      <FRAG2 frag_size="60000" down_thread="false" up_thread="false"/>
      <pbcast.STATE_TRANSFER down_thread="false" up_thread="false" use_flush="false"/>

        • 1. Re: Cluster connecting to localhost loopback
          brian.stansberry

          What AS version?

          • 2. Re: Cluster connecting to localhost loopback
            mohitanchlia

            AS 4.2

            • 3. Re: Cluster connecting to localhost loopback
              brian.stansberry

              What's being logged there is the value that will be returned to naming clients trying to discover HA-JNDI via multicast autodiscovery. Here's how the value is derived:

               String address = getBindAddress();
               /* An INADDR_ANY (0.0.0.0 || null) address is useless as the value
               sent to a remote client so check for this and use the local host
               address instead.
               */
               if (address == null || address.equals("0.0.0.0"))
               {
               address = InetAddress.getLocalHost().getHostAddress();
               }
              


              So, if you're starting with -b 0.0.0.0 it's going to try to use the default address for the host. Your machine must be configured such that that's the loopback address rather than some external address.

              Workarounds:

              1) Don't use -b 0.0.0.0
              2) Change your machine's network configuration such that InetAddress.getLocalHost().getHostAddress() doesn't return the loopback address.
              3) Change the HA-JNDI service's "BindAddress" config from ${jboss.bind.address} to some other system property and then use -D at startup to set that property to a non-loopback address.