Help required setting up TCP based cluster
mondrejko Jul 15, 2004 5:20 PMI am attempting to setup a simple two-node cluster using TCP/TCPPING on JBoss 3.2.3 (currently on Windows 2000, but we also develop for Linux and Solaris). Unfortunately, the nodes are not finding each other with my current cluster configuration (I have the nodes successfully finding each other using UDP).
I have read through the JBoss clustering document and the documentation on JGroups.org and believe that I have a reasonable configuration setup in cluster-server.xml. But, obviously not quite correct. The server log on startup for both nodes contains (seemingly indicating that the nodes do not know of one another):
14:49:08,549 INFO [DefaultPartition] Initializing 14:49:12,237 INFO [ClusterPartition] Starting channel 14:49:12,252 INFO [DefaultPartition] Number of cluster members: 1 14:49:12,252 INFO [DefaultPartition] Other members: 0 14:49:20,268 INFO [ClusterPartition] Started ClusterPartition: DefaultPartition 14:49:20,284 INFO [ClusterPartition] Started jboss:service=DefaultPartition
Also, when the node that an EJB client is connected to is taken down, upon next access the client receives a service unavailable exception (rather than the request switching to the alternate node).
Any help would be appreciated. Below is my cluster-service.xml config file used on both nodes- this is derived pretty much from the tcp.xml file included in jgroups.jar.
Thanks,
Michael
cluster-service.xml
----------------------
<?xml version="1.0" encoding="UTF-8"?> <server> <classpath codebase="lib" archives="jbossha.jar"/> <!-- ==================================================================== --> <!-- Cluster Partition: defines cluster --> <!-- ==================================================================== --> <mbean code="org.jboss.ha.framework.server.ClusterPartition" name="jboss:service=DefaultPartition"> <!-- Name of the partition being built --> <attribute name="PartitionName">DefaultPartition</attribute> <!-- Determine if deadlock detection is enabled --> <attribute name="DeadlockDetection">False</attribute> <!-- The JGroups protocol configuration --> <attribute name="PartitionConfig"> <Config> <TCP start_port="7800" bind_addr="localhost" loopback="true" /> <TCPPING initial_hosts="10.1.1.162[7800],10.1.1.15[7800]" num_initial_members="2" port_range="5" timeout="3000" /> <FD timeout="2500" max_tries="5" /> <VERIFY_SUSPECT timeout="3000" num_msgs="3" /> <pbcast.NAKACK gc_lag="100" retransmit_timeout="600,1200,2400,4800" /> <pbcast.STABLE desired_avg_gossip="20000" max_bytes="0" stability_delay="1000" up_thread="false" down_thread="false" /> <pbcast.GMS join_timeout="5000" join_retry_timeout="2000" shun="true" print_local_addr="false" /> </Config> </attribute> </mbean> <!-- ==================================================================== --> <!-- HA Session State Service for SFSB --> <!-- ==================================================================== --> <mbean code="org.jboss.ha.hasessionstate.server.HASessionStateService" name="jboss:service=HASessionState"> <depends>jboss:service=DefaultPartition</depends> <!-- Name of the partition to which the service is linked --> <attribute name="PartitionName">DefaultPartition</attribute> <!-- JNDI name under which the service is bound --> <attribute name="JndiName">/HASessionState/Default</attribute> <!-- Max delay before cleaning unreclaimed state. Defaults to 30*60*1000 => 30 minutes --> <attribute name="BeanCleaningDelay">0</attribute> </mbean> <!-- ==================================================================== --> <!-- HA JNDI --> <!-- ==================================================================== --> <mbean code="org.jboss.ha.jndi.HANamingService" name="jboss:service=HAJNDI"> <depends>jboss:service=DefaultPartition</depends> <!-- Name of the partition to which the service is linked --> <attribute name="PartitionName">DefaultPartition</attribute> <!-- bind address of HA JNDI RMI endpoint --> <attribute name="BindAddress">${jboss.bind.address}</attribute> <!-- RmiPort to be used by the HA-JNDI service once bound. 0 => auto. --> <attribute name="RmiPort">0</attribute> <!-- Port on which the HA-JNDI stub is made available --> <attribute name="Port">1100</attribute> <!-- Backlog to be used for client-server RMI invocations during JNDI queries --> <attribute name="Backlog">50</attribute> <!-- Multicast Address and Group used for auto-discovery --> <!-- Uncomment AutoDiscovery attributes for auto-discovery --> <attribute name="AutoDiscoveryAddress">230.0.0.4</attribute> <attribute name="AutoDiscoveryGroup">1102</attribute> <!-- IP Address to which should be bound: the Port, the RmiPort and the AutoDiscovery multicast socket. --> <!-- Client socket factory to be used for client-server RMI invocations during JNDI queries --> <!--attribute name="ClientSocketFactory">custom</attribute--> <!-- Server socket factory to be used for client-server RMI invocations during JNDI queries --> <!--attribute name="ServerSocketFactory">custom</attribute--> </mbean> <mbean code="org.jboss.invocation.jrmp.server.JRMPInvokerHA" name="jboss:service=invoker,type=jrmpha"> <attribute name="ServerAddress">${jboss.bind.address}</attribute> <!-- <attribute name="RMIObjectPort">0</attribute> <attribute name="RMIClientSocketFactory">custom</attribute> <attribute name="RMIServerSocketFactory">custom</attribute> --> </mbean> <!-- ==================================================================== --> <!-- Distributed cache invalidation --> <!-- ==================================================================== --> <mbean code="org.jboss.cache.invalidation.bridges.JGCacheInvalidationBridge" name="jboss.cache:service=InvalidationBridge,type=JavaGroups"> <depends>jboss:service=DefaultPartition</depends> <depends>jboss.cache:service=InvalidationManager</depends> <attribute name="InvalidationManager">jboss.cache:service=InvalidationManager</attribute> <attribute name="PartitionName">DefaultPartition</attribute> <attribute name="BridgeName">DefaultJGBridge</attribute> </mbean> </server>