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: Fri, 16 Nov 2007 06:29:01 -0800 (PST)
All..
 
---- 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. 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. 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.
> 
> If the client is connecting to the VIP, then the realserver 
> will be contacted on the VIP. If the application is replying 
> 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`).
> 
> Make sure the application is not listening/running/attached 
> to the RIP (at least for testing that your LVS works).
> 
> 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.
> 
> Joe

Having tested this some more I have discovered that the Tomcat (real) server on 
startup is listening on port 8325 as it should without any connections in the 
close_wait state.

Immediately on starting LVS it appears that the LVS router establishes a 
connection to the real server using the RIP of the LVS router and the RIP of 
the real server.  This is without any data passing through the LVS router to 
the real server.

Is this normal behavior or can someone tell me where to start looking for what 
I have setup incorrectly?

Netstat and tcpdump output is shown below.

Thanks,
John




Output of netstat:
ieng-repo-dev-lh2:/opt/JavaCAPS # netstat -aln |grep 8325
tcp        0      0 :::8325                 :::*                    LISTEN      
tcp        1      0 128.1.247.52:8325       128.1.247.72:52570      CLOSE_WAIT 
(128.1.247.52 =real server RIP)
tcp        1      0 128.1.247.52:8325       128.1.247.72:52562      CLOSE_WAIT 
(128.1.247.72 =LVS RIP)



The output of tcpdump indicates that they are communicating over this ports as 
well:

09:26:57.662346 IP (tos 0x0, ttl  64, id 0, offset 0, flags [DF], length: 44) 
ieng-repo-dev-lh2.hrh.org.8325 > 128.1.247.72.54719: S [tcp sum ok] 
1087972898:1087972898(0) ack 4189165685 win 5840 <mss 1460>
09:26:57.662953 IP (tos 0x0, ttl  64, id 20036, offset 0, flags [DF], length: 
40) 128.1.247.72.54719 > ieng-repo-dev-lh2.hrh.org.8325: . [tcp sum ok] 1:1(0) 
ack 1 win 5840
09:26:57.663371 IP (tos 0x0, ttl  64, id 20038, offset 0, flags [DF], length: 
40) 128.1.247.72.54719 > ieng-repo-dev-lh2.hrh.org.8325: F [tcp sum ok] 1:1(0) 
ack 1 win 5840
09:26:57.663790 IP (tos 0x0, ttl  64, id 61228, offset 0, flags [DF], length: 
40) ieng-repo-dev-lh2.hrh.org.8325 > 128.1.247.72.54719: . [tcp sum ok] 1:1(0) 
ack 2 win 5840



      
____________________________________________________________________________________
Get easy, one-click access to your favorites. 
Make Yahoo! your homepage.
http://www.yahoo.com/r/hs 


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