LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-12-2008, 06:39 PM   #1
Kiwisnow
LQ Newbie
 
Registered: May 2008
Posts: 4

Rep: Reputation: 0
Inconsistent connections with ipvsadm


I'm having a weird problem with ipvsadm.

When I first configured it, it worked fine. But after about a minute of no activity, it refuses to load balance and continually goes to one server.

Here is my setup:
VIP: 10.10.10.199

Real Server 1: 10.10.10.155
Real Server 2: 10.10.10.236
Director: 10.10.10.112

I have all these running on VMs. They're all connected to the same network (I'm testing this out on a local network). On each VM, I also allow HTTP access on the firewall.

On the Director:
I start off by editing the /etc/sysctl.conf file to allow ip forwarding.
Then I type in
Quote:
sysctl -p
ifconfig eth0:0 10.10.10.199 netmask 255.255.0.0. broadcast 172.17.255.255
ipvsadm -A -t 10.10.10.199:80 -s rr
ipvsadm -a -t 10.10.10.199:80 -r 10.10.10.155:80 -g
ipvsadm -a -t 10.10.10.199:80 -r 10.10.10.236:80 -g
After that, I try typing in ipvsadm to check it to make sure I have it all set up properly.

On the real servers, I do the same for both.

I go into the file /etc/sysctl.conf and I add in these lines:
net.ipv4.conf.eth0:0.arp_ignore = 1
net.ipv4.conf.eth0:0.arp_announce = 2
net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2

I add an index.html text file to /var/www/html (my DocumentRoot for apache) with just the server IP address. I start httpd.

Then on my computer (not on the VMs), I type in 10.10.10.199, and refresh it a good number of times. Each time I refresh, it gives me the other server, which is GREAT, right?

WRONG.

I go to document what I did to get it working on my notebook. Then I go into the sysctl.conf file again to see exactly what it was I typed in there. Then I refresh my browser again... AND IT STOPS WORKING.

Instead of load balancing, it keeps taking me to the first server. When I pause the first server on my VM, IE keeps showing that html page.

I then figured maybe it had to do with IE, and it would work on firefox. WRONG AGAIN.

On Firefox, it doesn't even load anything. I get an error "The connection has timed out".

I KNOW that Real Server 2 is running. I typed in the IP address into the browser and it came up with the proper HTML page. I have no idea what went wrong.

Does this have something to do with me doing this on a local network?
Does it have something to do with my internet browsers?
Is there maybe something wrong with my director server?

Can somebody please help me ?
 
Old 05-12-2008, 06:44 PM   #2
Kiwisnow
LQ Newbie
 
Registered: May 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Two minutes later:
I resume the first server and start refreshing 10.10.10.199 again.

Now it works.

But it doesn't work on another computer.

I want to cry.
 
Old 05-12-2008, 07:03 PM   #3
Kiwisnow
LQ Newbie
 
Registered: May 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Twenty minutes later:
It's not working again.

Would it have something to do with server idle time?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Inconsistent Compilation GlassEyeSlim Linux - Newbie 1 02-21-2006 01:37 PM
problem while installing ipvsadm package--------- pal Linux - Newbie 3 01-05-2005 01:30 AM
inconsistent X server? rgiggs Mandriva 3 05-11-2004 10:32 PM
IPVSADM problem Y0unGcLusT3rM4N Linux - Networking 2 08-07-2003 03:16 PM
ipvsadm problem Y0unGcLusT3rM4N Linux - Newbie 0 08-07-2003 08:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration