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

To: Joseph Mack NA3T <jmack@xxxxxxxx>, " 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>; 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:
LVS RIP: eth0
LVS VIP: eth0:1
Real Srv RIP (Tomcat): eth0
Real Srv VIP (Tomcat): lo0:67

Netmask is except on lo:67 which is

Routing table:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface   * UH    0      0        0 lo       *     U     0      0        0 eth0
link-local      *     U     0      0        0 eth0
loopback        *       U     0      0        0 lo
default         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.


> > 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  CLOSE_WAIT  
tcp        1      0 ieng-repo-dev.hrh.:8325  CLOSE_WAIT  
tcp        1      0 ieng-repo-dev.hrh.:8325  CLOSE_WAIT  

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
> Homepage It's GNU/Linux!

Never miss a thing.  Make Yahoo your home page.

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