Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Issues if initial host unreachable

Vivek
2012-06-28
2013-06-24
  • Vivek
    Vivek
    2012-06-28

    Hi,

    For my project, there is a requirement for High Availability and Failover. So
    I installed same product on 2 servers and create one single group/cluster
    using jgroup of internal components from both servers. Another idea behind
    forming one group between 2 servers was load balancing and it worked as
    expected. In jgroup config, there 2 ip addresses in the initial hosts param.

    My question is when both servers are up then everything works fine. But if any
    server goes down (ip address not reachable) then nodes on other servers could
    not communicate between each other. Can see below errors


    Jun 28, 2012 8:43:38 PM org.jgroups.logging.JDKLogImpl warn

    WARNING: LA083963-18107: dropped message 7 from LA083963-24781 (sender not in
    table ), view=

    Jun 28, 2012 8:44:48 PM org.jgroups.logging.JDKLogImpl warn

    WARNING: LA083963-18107: dropped message 10 from LA083963-24781 (sender not in
    table ), view=


    Let me know if I am missing something. Also to debug it further , I kept 2nd
    ip address in initial hosts unreachable and tried to start 2 nodes from server
    1. But found that both nodes are not in same group and see above errors in the
    logs. So is there any configuration if ip address from initial hosts is not
    reachable then it should not affect the cluster?

    Jgroup version 2.10.0

    Java 1.6.0 update 27

    jgroupconfig.xml


    <config xmlns="urn:org:jgroups"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-2.8
    .xsd
    ">

    <TCP bind_port="7800"

    bind_addr="148.147.228.158"

    port_range="10"

    loopback="true"

    recv_buf_size="${tcp.recv_buf_size:20M}"

    send_buf_size="${tcp.send_buf_size:640K}"

    discard_incompatible_packets="true"

    max_bundle_size="64K"

    max_bundle_timeout="30"

    enable_bundling="true"

    sock_conn_timeout="10000"

    timer.num_threads="4"

    use_send_queues="true"

    thread_pool.enabled="true"

    thread_pool.min_threads="1"

    thread_pool.max_threads="25"

    thread_pool.keep_alive_time="5000"

    thread_pool.queue_enabled="false"

    thread_pool.queue_max_size="100"

    thread_pool.rejection_policy="run"

    oob_thread_pool.enabled="true"

    oob_thread_pool.min_threads="1"

    oob_thread_pool.max_threads="8"

    oob_thread_pool.keep_alive_time="5000"

    oob_thread_pool.queue_enabled="false"

    oob_thread_pool.queue_max_size="100"

    oob_thread_pool.rejection_policy="run"/>

    <TCPPING timeout="3000"

    initial_hosts="148.147.228.158,148.147.228.159"

    port_range="10"

    num_initial_members="2"/>

    <MERGE2 max_interval="100000"

    min_interval="20000"/>

    <FD_SOCK/>

    <FD timeout="10000" max_tries="5"/>

    <VERIFY_SUSPECT timeout="3000"/>

    <BARRIER/>

    <pbcast.NAKACK

    use_mcast_xmit="false" gc_lag="0"

    retransmit_timeout="300,600,1200,2400,4800"

    discard_delivered_msgs="true"/>

    <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"

    max_bytes="400K"/>

    <VIEW_SYNC avg_send_interval="60000"/>

    <pbcast.GMS print_local_addr="true" join_timeout="3000"

    view_bundling="true"/>

    <FC max_credits="2M"

    min_threshold="0.10"/>

    <FRAG2 frag_size="60K"/>

    <pbcast.STATE_TRANSFER/>

    </config>


    Thanks

     
  • Roman Schaller
    Roman Schaller
    2013-06-24

    Hi Vivek

    Did you try your configuration with the test program org.jgroups.demos.Draw? Why do you use TCP? To find the causes of your problem I would recommend you following actions:

    1. See if you can use a UDP configuration. With UDP you should use an internal dedicated network for your cluster. But you don't have to configure all your cluster nodes in the jgroupconfig.xml. If they share the same internal subnet, they will find and join the cluster on their own.

    2. Use the test program org.jgroups.demos.Draw as recommended by the jgroups team. To use your jgroupconfig.xml with Draw, start it like this:
      java -Djava.net.preferIPv4Stack=true -Djgroups.bind_addr=<IP-of-your-internal-subnet> -cp lib/jgroups.jar;lib/commons-logging.jar org.jgroups.demos.Draw -props jgroupconfig.xml

    3. If you figured out a correct configuration, transfer it to your own server.