LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] LVS with Tomcat application server

To: Joseph Mack NA3T <jmack@xxxxxxxx>, "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] LVS with Tomcat application server
From: John Little <jlittle_97@xxxxxxxxx>
Date: Thu, 15 Nov 2007 06:16:27 -0800 (PST)
Hi Joe

Thank you for your help.  Please see below..
 
----- Original Message ----
> From: Joseph Mack NA3T <jmack@xxxxxxxx>
> To: John Little <jlittle_97@xxxxxxxxx>; LinuxVirtualServer.org users mailing 
> list. <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
> Sent: Wednesday, November 14, 2007 8:49:07 PM
> Subject: Re: [lvs-users] LVS with Tomcat application server
> 
> On Wed, 14 Nov 2007, John Little wrote:
> 
> > Hi all
> >
> > I am testing LVS using a tomcat server (real server) to 
> > pass hl7 (medical) messages to an end application.  The 
> > setup looks like this:
>   _                                  _          _
> |_| Medical information  server -> |_| LVS -> |_| tomcat ->
>   _
> |_  -> |_| end user application
> 
> | -> ->  |_|   tomcat ->
> 
> I fiddled with the ascii art but couldn't make anything 
> sensible of it.
Sorry about the ascii are.  I wasn't sure how that would turn out.
 >You have a medical information server, which 
> I assume is a realserver. Then you have 
> ->tomcat->application->tomcat. Later you seem to say that 
> the medical server is a client. This is too many layers deep 
> to be sensible.

Medical server ip: 128.1.6.3
LVS RIP: 128.1.247.72 eth0
LVS VIP:  128.1.247.167 eth0:1
Real Srv RIP (Tomcat):   128.1.247.51 eth0
Real Srv VIP (Tomcat): 128.1.247.167 lo0:67

Netmask is 255.255.0.0. except on lo:67 which is 255.255.255.255

Routing table:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
128.1.247.167   *   255.255.255.255 UH    0      0        0 lo
128.1.0.0       *      255.255.0.0     U     0      0        0 eth0
link-local      *        255.255.0.0     U     0      0        0 eth0
loopback        *      255.0.0.0       U     0      0        0 lo
default   128.1.7.7  0.0.0.0         UG    0      0        0 eth0

The setup is:

Medical info. server -> LVS -> Real Server (Tomcat) -> end user server

> Still none of it seems to bear on your 
> problem.

ok

> 
> 
> > The question/problem:  The tomcat server must return an 
> > acknowledgement to the medical information server.  On the 
> > three ports that I am testing the ports are going into a 
> > close_wait state on the real server.  I believe it is 
> > because the acknoweldgement is either not getting to the 
> > medical information server or that it is receiving it from 
> > the real ip of the LVS router.
> 
> I assume this all works with a single standalone server.

Please see above.

> 
> If the client is connecting to the VIP, then the realserver 
> will be contacted on the VIP. If the application is replying 

The medical info. server connects to the VIP on the LVS router

> on the RIP, then there is something wrong with the 
> application. If so you aren't the first one to find this. 
> rsh does the same thing (see the HOWTO).
> 
> You can check for this problem with tcpdump (netstat on the 
> realserver will show IPs and ports, check with `netstat -p 
> prog_name`).

netstat output from the real server:
tcp        1      0 ieng-repo-dev.hrh.:8325 128.1.247.72%720:54364  CLOSE_WAIT  
11968/is_domain2    
tcp        1      0 ieng-repo-dev.hrh.:8325 128.1.247.72%720:54356  CLOSE_WAIT  
11968/is_domain2    
tcp        1      0 ieng-repo-dev.hrh.:8325 128.1.247.72%720:54348  CLOSE_WAIT  
11968/is_domain2
=>snip

As you can see from the above the tomcat server is connecting back to the RIP 
on the LVS router and going into a CLOSE_WAIT state.
I believe that this is something wrong with my setup but I'm not sure.  Can you 
tell from the information that I've provided?

> 
> Make sure the application is not listening/running/attached 
> to the RIP (at least for testing that your LVS works).

It isn't.

> 
> If the realserver is replying from the VIP and the reply is 
> not getting to the client, then there is a problem with your 
> routing (`ipvsadm` will show InActConn without an ActConn). 
> You can check your routing by running telnet as your LVS'ed 
> service to see if this behaves.
This works ok.
> 
> Joe
> 
> -- 
> Joseph Mack NA3T EME(B,D), FM05lw North Carolina
> jmack (at) wm7d (dot) net - azimuthal equidistant map
> generator at http://www.wm7d.net/azproj.shtml
> Homepage http://www.austintek.com/ It's GNU/Linux!
> 
Thanks,
John



      
____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs


<Prev in Thread] Current Thread [Next in Thread>