wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Tomcat cluster in 2 different machine 2 pvt IP on same subnet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat cluster in 2 different machine 2 pvt IP on same subnet" Watch "Tomcat cluster in 2 different machine 2 pvt IP on same subnet" New topic
Author

Tomcat cluster in 2 different machine 2 pvt IP on same subnet

Masudul Haque
Greenhorn

Joined: Oct 04, 2012
Posts: 5
I have two tomcat instances running in Clustered Environment into 2 servers.

Assume we have test.jsp is there in both Instances.

I want hit one single real IP which will be take service from tomcat1 or tomcat 2.

How can we do that?

any one please help me on this issue. I have already setup the cluster but session is not replicating......also for the above issue how can we done in realtime scenario like i want to hit cluster.test.me then it will be server by node1/node2...how can i set the IP setting...
here is the error am getting from log: Oct 3, 2012 6:24:35 PM org.apache.catalina.ha.session.DeltaManager getAllClusterSessions
INFO: Manager [localhost#/examples]: skipping state transfer. No members active in cluster group.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16103
    
  21

To do that you need some sort of proxy server ahead of the Tomcats. The proxy server presents 1 IP address, then routes requests to one or the other of the Tomcats via their private IP addresses.

Proxy servers are available in many forms, both as dedicated hardware units and as software applications for general-purpose server systems.


Customer surveys are for companies who didn't pay proper attention to begin with.
Masudul Haque
Greenhorn

Joined: Oct 04, 2012
Posts: 5
Tim Holloway wrote:To do that you need some sort of proxy server ahead of the Tomcats. The proxy server presents 1 IP address, then routes requests to one or the other of the Tomcats via their private IP addresses.

Proxy servers are available in many forms, both as dedicated hardware units and as software applications for general-purpose server systems.


Thanks.

What about the error am getting from log: Oct 3, 2012 6:24:35 PM org.apache.catalina.ha.session.DeltaManager getAllClusterSessions
INFO: Manager [localhost#/examples]: skipping state transfer. No members active in cluster group.

What is the solution about that.

BR,
Masud
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16103
    
  21

All of the Tomcat servers in a cluster have to have their own unique port/IP address combination.

Beyond that, your latest question is so distinct from the one you originally asked that you should ask it in its own message thread. Otherwise a lot of people who might know the answer won't see it.
Masudul Haque
Greenhorn

Joined: Oct 04, 2012
Posts: 5
Tim Holloway wrote:All of the Tomcat servers in a cluster have to have their own unique port/IP address combination.

Beyond that, your latest question is so distinct from the one you originally asked that you should ask it in its own message thread. Otherwise a lot of people who might know the answer won't see it.


Thanks Tim.

Can you help me the proxy server thing, how can we do that with hit the proxy single IP, then it will take service either from pvt ip1 or pvt ip2??

BR,
Masud
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16103
    
  21


To do that you need some sort of proxy server ahead of the Tomcats. The proxy server presents 1 IP address, then routes requests to one or the other of the Tomcats via their private IP addresses.


You configure the addresses and ports of the backend Tomcat servers in the proxy server configuration file. You might also set up load-balancing and session-sharing rules here. What goes into the proxy configuration file and where the configuration is stored will depend on what software (or hardware) you decide to use to be the proxy.
 
GeeCON Prague 2014
 
subject: Tomcat cluster in 2 different machine 2 pvt IP on same subnet