Hello Mike,<br><br>Now your network and config file looks perfectly ok.<br><br>As you are using direct routing so your real server (kiwidev4) has two options.<br><br>1st - Use iptables to redirect traffic destined by linux director to real server.<br>
2nd - Use arptables_jf method. (yum install arptables_jf).<br><br>As you told that you can not modify iptables rules as kiwidev4 machine is being used for other purpose as well so you have to use method 2 (arptables_jf).<br>
<br>Below are the steps which you need to performed on real server/servers only:<br><br>1. Install arptables_jf rpm from redhat distribution cd or from internet into kiwidev4.<br>2. arptables -A IN -d 192.168.3.40 -j DROP<br>
3. arptables -A OUT -d 192.168.3.40 -j mangle --mangle-ip-s 192.168.3.38<br>4. service arptables_jf save<br>5. chkconfig arptables_jf on<br>6. ifconfig eth0:1 192.168.3.40 netmask 255.255.248.0 broadcast 192.168.3.255 up<br>
(For subsequent reboot, you will have to create a file under /etc/sysconfig/network-scripts/ifcfg-eth0:1) and need to put values for vip (192.168.3.40) address.<br><br>Then restart httpd service in kiwidev4 and let me know if it works.<br>
<br>Please also post ipvsadm -L -n output after this... :)<br><br>Regards<br>Tapan <br>India<br><br><div class="gmail_quote">On Fri, Nov 6, 2009 at 12:23 AM, mojorising <span dir="ltr"><<a href="mailto:moj0rising@aim.com">moj0rising@aim.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Okay. It seems I missed a critical piece of my config file when I<br>
copy/pasted it to you. Sorry about that.<br>
<br>
So here is my <a href="http://ha.cf" target="_blank">ha.cf</a> file now<br>
<br>
[root@omsbuild ~]# cat /etc/sysconfig/ha/<a href="http://lvs.cf" target="_blank">lvs.cf</a><br>
<div class="im">serial_no = 93<br>
primary = 192.168.3.28<br>
service = lvs<br>
backup = 0.0.0.0<br>
heartbeat = 1<br>
heartbeat_port = 539<br>
keepalive = 6<br>
deadtime = 18<br>
network = direct<br>
debug_level = NONE<br>
virtual test1 {<br>
     active = 1<br>
     address = 192.168.3.40 eth0:1<br>
     vip_nmask = 255.255.248.0<br>
     port = 80<br>
     expect = "HTTP"<br>
     use_regex = 0<br>
     load_monitor = none<br>
     scheduler = lc<br>
     protocol = tcp<br>
     timeout = 6<br>
     reentry = 15<br>
     quiesce_server = 0<br>
</div>     server kiwidev4 {<br>
         address = 192.168.3.38<br>
<div class="im">         active = 1<br>
         port = 80<br>
         weight = 1<br>
     }<br>
}<br>
<br>
<br>
</div>I took out those other machines because I can not change their IPs<br>
(I'm just using them for testing). So in their place, I put a machine<br>
(kiwidev4) that happens to be on the same subnet as the LVS box.<br>
kiwidev4 was always there and active but that part of the config file<br>
was accidentally clipped off from my message.  :(<br>
<br>
I can not change those iptables rules at this time because that<br>
kiwidev4 box may be in use for some other testing at the moment. Can<br>
we do this without making the specified changes to iptables? It seems<br>
we shouldn't need to do that. I will eventually be using LVS to<br>
balance traffic to Windows machines as well so I need to be able to do<br>
without iptables for that reason also.<br>
<br>
<br>
Mike<br>
<div><div></div><div class="h5"><br>
<br>
On 04/11/2009, Tapan Thapa <<a href="mailto:tapan.thapa2000@gmail.com">tapan.thapa2000@gmail.com</a>> wrote:<br>
> Hello Mike,<br>
><br>
> Now your network status looks good.<br>
><br>
> But still i can not see any real server on the same network. i.e.<br>
> 192.168.3.x.<br>
><br>
> As per your <a href="http://lvs.cf" target="_blank">lvs.cf</a>, you have configured two real servers. First one is<br>
> server Speedy and second one is server test1 and currently both are not<br>
> active. (active = 0) They should be (active = 1).<br>
><br>
> And also your real servers are not in right subnet.<br>
><br>
> Your real server should be on same 192.168.3.x network.<br>
><br>
> Your example <a href="http://lvs.cf" target="_blank">lvs.cf</a> should look like:<br>
><br>
> serial_no = 93<br>
> primary = 192.168.3.28<br>
> service = lvs<br>
> backup = 0.0.0.0<br>
> heartbeat = 1<br>
> heartbeat_port = 539<br>
> keepalive = 6<br>
> deadtime = 18<br>
> network = direct<br>
> debug_level = NONE<br>
> virtual test1 {<br>
>     active = 1<br>
>      address = 192.168.3.40 eth0:1<br>
>     vip_nmask = 255.255.248.0<br>
>     port = 80<br>
>     expect = "HTTP"<br>
>     use_regex = 0<br>
>     load_monitor = none<br>
>     scheduler = lc<br>
>     protocol = tcp<br>
>     timeout = 6<br>
>     reentry = 15<br>
>     quiesce_server = 0<br>
>     server Speedy {<br>
>         address = 192.168.3.29<br>
>         active = 1<br>
>         port = 80<br>
>         weight = 1<br>
>     }<br>
>     server test1 {<br>
>         address = 192.168.3.30<br>
>         active = 1<br>
>         port = 80<br>
>         weight = 1<br>
>     }<br>
><br>
> Please change the ip address of Speedy server to 192.168.3.29 and test1<br>
> server to 192.168.3.30 with subnet mask of 255.255.248.0 and restart<br>
> network<br>
> and httpd service.<br>
><br>
> then fire below mentioned commands in both real servers (Not in lvs<br>
> server):<br>
><br>
> chkconfig iptables on<br>
> iptables -F<br>
> iptables -t nat -A PREROUTING -p tcp --dport 80 -d 192.168.3.40 -j REDIRECT<br>
> service iptables save<br>
><br>
> then please restart pulse service at linux director server (lvs server) and<br>
> wait for 2 minutes. and then check the status of ipvsadm -L -n command and<br>
> let me know in case any issues.<br>
><br>
><br>
> Regards<br>
> Tapan Thapa<br>
> India<br>
><br>
><br>
><br>
> On Thu, Nov 5, 2009 at 1:25 AM, mojorising <<a href="mailto:moj0rising@aim.com">moj0rising@aim.com</a>> wrote:<br>
><br>
>> Tapan, sorry for confusing you. I overlooked my virtual IP and<br>
>> accidedntally left it with an IP on the wrong net. This is now<br>
>> corrected.<br>
>><br>
>> Those real servers on other nets are still in my configuration but<br>
>> they are "down," as they were before. I do have one real server up on<br>
>> the proper net --       192.168.3.38.<br>
>><br>
>><br>
>> My present network interface set-up:<br>
>><br>
>> eth0      Link encap:Ethernet  HWaddr 00:50:56:AE:14:E3<br>
>>          inet addr:192.168.3.28  Bcast:192.168.7.255  Mask:255.255.248.0<br>
>>          inet6 addr: fe80::250:56ff:feae:14e3/64 Scope:Link<br>
>>          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br>
>>           RX packets:36180876 errors:1122 dropped:1234 overruns:0 frame:0<br>
>>          TX packets:8729361 errors:0 dropped:0 overruns:0 carrier:0<br>
>>          collisions:0 txqueuelen:1000<br>
>>          RX bytes:72196093 (68.8 MiB)  TX bytes:610192805 (581.9 MiB)<br>
>>           Interrupt:177 Base address:0x1400<br>
>><br>
>> eth0:1    Link encap:Ethernet  HWaddr 00:50:56:AE:14:E3<br>
>>           inet addr:192.168.3.40  Bcast:192.168.7.255  Mask:255.255.248.0<br>
>>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br>
>>          Interrupt:177 Base address:0x1400<br>
>><br>
>><br>
>> A problem is that I am still getting those error messages from nanny:<br>
>><br>
>> Nov  4 11:06:52 omsbuild nanny[16919]: READ to <a href="http://192.168.3.38:80" target="_blank">192.168.3.38:80</a> timed out<br>
>> Nov  4 11:06:53 omsbuild nanny[20548]: READ to <a href="http://192.168.3.38:80" target="_blank">192.168.3.38:80</a> timed out<br>
>> Nov  4 11:07:04 omsbuild nanny[16919]: READ to <a href="http://192.168.3.38:80" target="_blank">192.168.3.38:80</a> timed out<br>
>> Nov  4 11:07:05 omsbuild nanny[20548]: READ to <a href="http://192.168.3.38:80" target="_blank">192.168.3.38:80</a> timed out<br>
>><br>
>><br>
>> My <a href="http://lvs.cf" target="_blank">lvs.cf</a> file now:<br>
>><br>
>> serial_no = 93<br>
>> primary = 192.168.3.28<br>
>> service = lvs<br>
>> backup = 0.0.0.0<br>
>> heartbeat = 1<br>
>> heartbeat_port = 539<br>
>> keepalive = 6<br>
>> deadtime = 18<br>
>> network = direct<br>
>> debug_level = NONE<br>
>> virtual test1 {<br>
>>     active = 1<br>
>>      address = 192.168.3.40 eth0:1<br>
>>      vip_nmask = 255.255.248.0<br>
>>     port = 80<br>
>>     expect = "HTTP"<br>
>>     use_regex = 0<br>
>>     load_monitor = none<br>
>>     scheduler = lc<br>
>>     protocol = tcp<br>
>>     timeout = 6<br>
>>     reentry = 15<br>
>>     quiesce_server = 0<br>
>>     server Speedy {<br>
>>         address = 192.168.18.29<br>
>>         active = 0<br>
>>         port = 80<br>
>>         weight = 1<br>
>>     }<br>
>>     server test1 {<br>
>>         address = 65.39.179.197<br>
>>         active = 0<br>
>>         port = 80<br>
>>         weight = 1<br>
>>     }<br>
>><br>
>><br>
>><br>
>> Mike<br>
>><br>
>><br>
>> On 03/11/2009, Tapan Thapa <<a href="mailto:tapan.thapa2000@gmail.com">tapan.thapa2000@gmail.com</a>> wrote:<br>
>> > Hello Mike,<br>
>> ><br>
>> > Thanks for providing helpful information.<br>
>> ><br>
>> > Now as i understood from your configuration, you have two networks on<br>
>> eth0.<br>
>> ><br>
>> > 1. 192.168.3.x (on eth0)<br>
>> > 2. 192.168.0.x (on eth0:1).. (Is it map with any external ip address?)<br>
>> > (Please provide netstat -rn output here.)<br>
>> ><br>
>> > Your one of real server is on completely new network subnet<br>
>> (192.168.18.x)<br>
>> > and your second real server is on public ip 65.39.179.197 and currently<br>
>> > none<br>
>> > of them are active.<br>
>> ><br>
>> > I don't think this configuration will work.<br>
>> ><br>
>> > Your configuration should be like:<br>
>> ><br>
>> > 1. Any network like 192.168.0.x on (eth0)<br>
>> > 2. Floating IP Address/Virtual IP Address 192.168.0.254 on (eth0:1) and<br>
>> it<br>
>> > must be map with any pubic ip address in case you want to access this<br>
>> > VIP<br>
>> > from outside of your network. During testing it is not required to map<br>
>> > it<br>
>> > with any public ip address.<br>
>> > 3. Your real server should be on the same network 192.168.0.x (I.e.<br>
>> > <a href="http://192.168.0.1/2/3" target="_blank">192.168.0.1/2/3</a>).<br>
>> ><br>
>> > If you are planning to use Linux Director in Direct Mode then their<br>
>> > must<br>
>> be<br>
>> > an existing gateway available.<br>
>> ><br>
>> > All real servers and Linux Director should point to their gateway<br>
>> > towards<br>
>> > that router/gateway.<br>
>> ><br>
>> > As far as your listing of port/service question is concern, If your<br>
>> > linux<br>
>> > director works properly, still your linux director will not listen on<br>
>> port<br>
>> > 80 but your load balancing will work. (I was also confused on this for<br>
>> > 2<br>
>> > days and after 2 days i realize that load balancing is working although<br>
>> > port<br>
>> > 80 is not listing.)<br>
>> ><br>
>> > Note: Please stick with one configuration as when you post your<br>
>> > problem,<br>
>> > your linux directory was working under Direct mode and now it is<br>
>> > working<br>
>> in<br>
>> > tunnel mode. (I have no experience of tunnel mode but i can help you on<br>
>> > direct and nat mode.)<br>
>> ><br>
>> > Regards<br>
>> > Tapan Thapa<br>
>> > India<br>
>> ><br>
>> > On Wed, Nov 4, 2009 at 1:16 AM, mojorising <<a href="mailto:moj0rising@aim.com">moj0rising@aim.com</a>> wrote:<br>
>> ><br>
>> >> Thanks for your offers of help!<br>
>> >><br>
>> >> I have made some changes since reading your message saying the servers<br>
>> >> should all be on the same net -- now I have one real server and it is<br>
>> >> on the same network as the load balancer. The output of the ipvsadmn<br>
>> >> command you requested is below.<br>
>> >><br>
>> >> [root@omsbuild ~]# ipvsadm -L -n<br>
>> >> IP Virtual Server version 1.2.1 (size=4096)<br>
>> >> Prot LocalAddress:Port Scheduler Flags<br>
>> >>  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn<br>
>> >> TCP  <a href="http://192.168.0.69:80" target="_blank">192.168.0.69:80</a> lc<br>
>> >><br>
>> >> NIC/IP information:<br>
>> >><br>
>> >> [root@omsbuild ~]# ifconfig -a<br>
>> >> eth0      Link encap:Ethernet  HWaddr 00:50:56:AE:14:E3<br>
>> >>          inet addr:192.168.3.28  Bcast:192.168.7.255<br>
>> >> Mask:255.255.248.0<br>
>> >>          inet6 addr: fe80::250:56ff:feae:14e3/64 Scope:Link<br>
>> >>          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br>
>> >>          RX packets:35121740 errors:1120 dropped:1231 overruns:0<br>
>> >> frame:0<br>
>> >>          TX packets:8682408 errors:0 dropped:0 overruns:0 carrier:0<br>
>> >>          collisions:0 txqueuelen:1000<br>
>> >>          RX bytes:4182471094 (3.8 GiB)  TX bytes:606337720 (578.2 MiB)<br>
>> >>          Interrupt:177 Base address:0x1400<br>
>> >><br>
>> >> eth0:1    Link encap:Ethernet  HWaddr 00:50:56:AE:14:E3<br>
>> >>          inet addr:192.168.0.69  Bcast:192.168.7.255<br>
>> >> Mask:255.255.248.0<br>
>> >>          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br>
>> >>          Interrupt:177 Base address:0x1400<br>
>> >><br>
>> >><br>
>> >> I'm still getting the same errors from nanny even though the real<br>
>> >> server is now on the same net as the load balancer:<br>
>> >><br>
>> >> Nov  3 10:44:22 omsbuild nanny[16919]: READ to <a href="http://192.168.3.38:80" target="_blank">192.168.3.38:80</a> timed<br>
>> out<br>
>> >><br>
>> >> As represented in eth0:1, my virtual server is listening on<br>
>> >> <a href="http://192.168.0.69:80" target="_blank">192.168.0.69:80</a>. If I do netstat, do a port/service check from a<br>
>> >> workstation to that IP or similar, shouldn't I see the load balancer<br>
>> >> listening on 80? Right now, I do not see the load balancer waiting for<br>
>> >> connections on port 80.<br>
>> >><br>
>> >> Here is what my lvs.conf file looks like now:<br>
>> >><br>
>> >> serial_no = 89<br>
>> >> primary = 192.168.3.28<br>
>> >> service = lvs<br>
>> >> backup = 0.0.0.0<br>
>> >> heartbeat = 1<br>
>> >> heartbeat_port = 539<br>
>> >> keepalive = 6<br>
>> >> deadtime = 18<br>
>> >> network = tunnel<br>
>> >> debug_level = NONE<br>
>> >> virtual test1 {<br>
>> >>     active = 1<br>
>> >>     address = 192.168.0.69 eth0:1<br>
>> >>     vip_nmask = 255.255.248.0<br>
>> >>      port = 80<br>
>> >>      expect = "HTTP"<br>
>> >>     use_regex = 0<br>
>> >>     load_monitor = none<br>
>> >>     scheduler = lc<br>
>> >>     protocol = tcp<br>
>> >>     timeout = 6<br>
>> >>     reentry = 15<br>
>> >>     quiesce_server = 0<br>
>> >>     server Speedy {<br>
>> >>         address = 192.168.18.29<br>
>> >>         active = 0<br>
>> >>         port = 80<br>
>> >>         weight = 1<br>
>> >>     }<br>
>> >>     server test1 {<br>
>> >>          address = 65.39.179.197<br>
>> >>         active = 0<br>
>> >>         port = 80<br>
>> >>         weight = 1<br>
>> >>     }<br>
>> >> :<br>
>> >><br>
>> >><br>
>> >> Mike<br>
>> >><br>
>> >><br>
>> >> On 02/11/2009, Tapan Thapa <<a href="mailto:tapan.thapa2000@gmail.com">tapan.thapa2000@gmail.com</a>> wrote:<br>
>> >> > Hello Mike,<br>
>> >> ><br>
>> >> > I am not an expert in IPVS but recently i have setup IPVS with the<br>
>> help<br>
>> >> of<br>
>> >> > Piranha and i am quite comfortable with IPVS.<br>
>> >> ><br>
>> >> > Please let me know your Network diagram and also the output of below<br>
>> >> > mentioned command.<br>
>> >> ><br>
>> >> > ipvsadm -L -n<br>
>> >> ><br>
>> >> > ----------------------------------------<br>
>> >> > I think your network diagram should be---<br>
>> >> ><br>
>> >> > Linux Director ----(One NIC)--->First Real Server (One NIC)<br>
>> >> >                                        --->Second Real Server (One<br>
>> NIC)<br>
>> >> > ----------------------------------------------<br>
>> >> ><br>
>> >> > Your Linux Director and Your real server should be on the same<br>
>> >> > network<br>
>> >> > segment. Please also post your Linux Director's (Where you have<br>
>> >> > installed<br>
>> >> > Piranha) Network cards ip information.<br>
>> >> ><br>
>> >> ><br>
>> >> > Regards<br>
>> >> > Tapan Thapa<br>
>> >> > India<br>
>> >> ><br>
>> >> > On Tue, Nov 3, 2009 at 6:09 AM, mojorising <<a href="mailto:moj0rising@aim.com">moj0rising@aim.com</a>><br>
>> wrote:<br>
>> >> ><br>
>> >> >> Hello!<br>
>> >> >><br>
>> >> >> I have set up a test load balancer with IPVS and Piranha-GUI. For<br>
>> some<br>
>> >> >> reason, when I attempt to connect to one of the two web servers I<br>
>> have<br>
>> >> >> set-up via the load balancer's virtual IP, the load balancer does<br>
>> >> >> not<br>
>> >> >> seem to pass those requests on to the real servers.<br>
>> >> >><br>
>> >> >> The firewall on the Piranha box is off and I can successfully<br>
>> >> >> establish HTTP sessions with netcat and telnet from the Piranha box<br>
>> as<br>
>> >> >> well as from my workstation. So the web services are running and<br>
>> >> >> connectivity to them is good.<br>
>> >> >><br>
>> >> >> The error I'm getting in /var/log/messages is (public IP changed<br>
>> >> >> for<br>
>> >> >> privacy):<br>
>> >> >><br>
>> >> >> Nov  2 14:28:09 omsbuild nanny[13583]: READ to 65.39.169.xxx:80<br>
>> >> >> timed<br>
>> >> out<br>
>> >> >> Nov  2 14:28:10 omsbuild nanny[13582]: READ to<br>
>> >> >> 192.168.18.29:80timed<br>
>> >> out<br>
>> >> >><br>
>> >> >> It looks like nanny can't talk to the web servers but I can't<br>
>> >> >> figure<br>
>> >> >> out why. That may not be the only problem I have here but it's<br>
>> >> >> probably one of them. All the other services are up and seem to be<br>
>> >> >> running fine.<br>
>> >> >><br>
>> >> >> I've googled around quite a bit and checked the documentation but I<br>
>> >> >> haven't found anything in those places that gets me to a solution.<br>
>> >> >><br>
>> >> >> Can anyone out there give me a little push in the right direction<br>
>> >> >> as<br>
>> >> >> to what the problem might be?<br>
>> >> >><br>
>> >> >><br>
>> >> >> Thank you!<br>
>> >> >><br>
>> >> >> Mike<br>
>> >> >><br>
>> >> >><br>
>> >> >> My lvs.conf file:<br>
>> >> >><br>
>> >> >> serial_no = 76<br>
>> >> >> primary = 192.168.3.28<br>
>> >> >> service = lvs<br>
>> >> >> backup = 0.0.0.0<br>
>> >> >> heartbeat = 1<br>
>> >> >> heartbeat_port = 539<br>
>> >> >> keepalive = 6<br>
>> >> >> deadtime = 18<br>
>> >> >> network = direct<br>
>> >> >> debug_level = NONE<br>
>> >> >> virtual test1 {<br>
>> >> >>     active = 1<br>
>> >> >>     address = 192.168.0.69 eth0:1<br>
>> >> >>     vip_nmask = 255.255.248.0<br>
>> >> >>     port = 3128<br>
>> >> >>     expect = "HTTP"<br>
>> >> >>     use_regex = 0<br>
>> >> >>     load_monitor = none<br>
>> >> >>     scheduler = lc<br>
>> >> >>     protocol = tcp<br>
>> >> >>     timeout = 6<br>
>> >> >>     reentry = 15<br>
>> >> >>     quiesce_server = 0<br>
>> >> >>     server Speedy {<br>
>> >> >>         address = 192.168.18.29<br>
>> >> >>         active = 1<br>
>> >> >>         port = 80<br>
>> >> >>         weight = 1<br>
>> >> >>     }<br>
>> >> >>     server test1 {<br>
>> >> >>         address = 65.39.169.xxx<br>
>> >> >>         active = 1<br>
>> >> >>         port = 80<br>
>> >> >>         weight = 1<br>
>> >> >>     }<br>
>> >> >><br>
>> >> >> _______________________________________________<br>
>> >> >> Piranha-list mailing list<br>
>> >> >> <a href="mailto:Piranha-list@redhat.com">Piranha-list@redhat.com</a><br>
>> >> >> <a href="https://www.redhat.com/mailman/listinfo/piranha-list" target="_blank">https://www.redhat.com/mailman/listinfo/piranha-list</a><br>
>> >> >><br>
>> >> ><br>
>> >><br>
>> >> _______________________________________________<br>
>> >> Piranha-list mailing list<br>
>> >> <a href="mailto:Piranha-list@redhat.com">Piranha-list@redhat.com</a><br>
>> >> <a href="https://www.redhat.com/mailman/listinfo/piranha-list" target="_blank">https://www.redhat.com/mailman/listinfo/piranha-list</a><br>
>> >><br>
>> ><br>
>><br>
>> _______________________________________________<br>
>> Piranha-list mailing list<br>
>> <a href="mailto:Piranha-list@redhat.com">Piranha-list@redhat.com</a><br>
>> <a href="https://www.redhat.com/mailman/listinfo/piranha-list" target="_blank">https://www.redhat.com/mailman/listinfo/piranha-list</a><br>
>><br>
><br>
<br>
_______________________________________________<br>
Piranha-list mailing list<br>
<a href="mailto:Piranha-list@redhat.com">Piranha-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/piranha-list" target="_blank">https://www.redhat.com/mailman/listinfo/piranha-list</a><br>
</div></div></blockquote></div><br>