[jboss-user] [Clustering/JBoss] - IP binding, Multicast, and Mod_jk loadbalancing

clauseng do-not-reply at jboss.com
Mon Sep 8 11:22:13 EDT 2008


I have two Jboss 4.2.3 servers running on two Linux boxes in the same subnet.  According to documentation, for them to cluster, all I had to do was start them with -c all, but when I did, they always bound to 127.0.0.1, which is internal IP and not mulitcast, so they couldn't see each other.  It took me awhile, but found by starting them with -b <IP of primary ethernet> -c all, they would see each other (makes sense).

I have configured mod_jk 1.2.23 with apache 2.2.3 and no matter what I do, I can't get them to connect to the right IP.  My workers.properties file has both nodes listed according to documentation with the IP address of the primary ethernet of each server, but when apache is started, the mod_jk.log file shows it trying to connect to the 127.0.0.1 IP address, and Jboss can't run there for clustered environments for obvious reasons.  Here is the mod_jk.log error:

 ajp_connect_to_endpoint::jk_ajp_common.c (876): Failed opening socket to (127.0.0.1:8009) (errno=111)

When mod_jk tries to connect to the second node, the following error is specified:

ajp_send_request::jk_ajp_common.c (1273): (node2) error connecting to the backend server (errno=111)

Here is my workers.properties:

# Define list of workers that will be used
# for mapping requests
worker.list=loadbalancer,status

# Define Node1
# modify the host as your host IP or DNS name.
worker.node1.port=8009
worker.node1.host=node1 
worker.node1.type=ajp13
worker.node1.lbfactor=1
worker.node1.cachesize=10

# Define Node2
# modify the host as your host IP or DNS name.
worker.node2.port=8009
worker.node2.host=node2
worker.node2.type=ajp13
worker.node2.lbfactor=1
worker.node2.cachesize=10

# Load-balancing behaviour
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=node1,node2
worker.loadbalancer.sticky_session=1
worker.list=loadbalancer

# Status worker for managing load balancer
worker.status.type=status

I have tried replacing "node1" and "node2" with the local IPs of the servers with no change in results.  Mod_jk still tries to connect to the local host on 127.0.0.1 and fails to connect to the second host as indicated above.  Also, I get "deprecated" warnings for the "cachesize" setting, but I copied this workers.properties file right from the documentation.

Both Jboss servers are verified as running ok via the logs.

Is this all a version matching problem?  I have to have the perfect match of apache, mod_jk and jboss for all of this to work?  Right now I have Apache 2.2.3, mod_jk 1.2.23, and jboss 4.2.3.

Thanks for any help you can give.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175086#4175086

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4175086



More information about the jboss-user mailing list