Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 21st March 2010, 21:50
lifeisboost lifeisboost is offline
Senior Member
 
Join Date: Feb 2006
Posts: 122
Thanks: 0
Thanked 2 Times in 2 Posts
Default Debian load balancers with Ultra monkey

I setup 2 load balancers following this tutorial

http://www.howtoforge.com/high_avail...che_cluster_p2


The load balancers work great, but i cannot get Apache to server the website. Im using Fedora for the nodes and they are showing online. I have reduced the node to just one server to make sure i am connecting to just one to figure this out

i have added

net.ipv4.ip_nonlocal_bind = 1

to the node to allow Apache to bind to the address.


Code:
checktimeout=10
checkinterval=2
autoreload=no
logfile="local0"
quiescent=yes

virtual=192.168.1.120:80
        real=192.168.1.241:80 gate
        real=192.168.1.244:80 gate
        fallback=127.0.0.1:80 gate
        service=http
        request="ldirector.html"
        receive="Test Page"
        scheduler=rr
        protocol=tcp
        checktype=negotiate
basic virtual host on Apache.

Code:
<VirtualHost 192.168.1.120:80>
DocumentRoot "/var/www/test"
<Directory "/var/www/test">
allow from all
Options +Indexes
</Directory>
</VirtualHost>

Code:
lb1a:~# /sbin/ipvsadm -L -n
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  192.168.1.120:80 rr
  -> 192.168.1.244:80             Route   0      0          0
  -> 192.168.1.241:80             Route   1      0          0

Code:
eth0      Link encap:Ethernet  HWaddr 00:80:AD:40:78:00
          inet addr:192.168.1.126  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::280:adff:fe40:7800/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:22719 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7293 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4289562 (4.0 MiB)  TX bytes:1230432 (1.1 MiB)
          Interrupt:3 Base address:0xd800

eth0:1    Link encap:Ethernet  HWaddr 00:80:AD:40:78:00
          inet addr:192.168.1.128  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:3 Base address:0xd800

eth0:2    Link encap:Ethernet  HWaddr 00:80:AD:40:78:00
          inet addr:192.168.1.241  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
          Interrupt:3 Base address:0xd800

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:517 errors:0 dropped:0 overruns:0 frame:0
          TX packets:517 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:47256 (46.1 KiB)  TX bytes:47256 (46.1 KiB)


so when i browse now to 192.168.1.120 i get a timeout error, so i know Apache is not answering and a net stat only shows the load balancer connections.
Reply With Quote
Sponsored Links
  #2  
Old 3rd April 2010, 06:08
lifeisboost lifeisboost is offline
Senior Member
 
Join Date: Feb 2006
Posts: 122
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Got a little time to work on this tonight. if i creat a Vhost on the node box with an IP set on one of the nics. Apache shows the website. so its like it is not getting the forwarded requests from the load balancer's.
Reply With Quote
  #3  
Old 3rd April 2010, 12:37
King Sami King Sami is offline
Junior Member
 
Join Date: Apr 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

When you have two ISPs you may want to make your linux machine balance the load of your internet access, you can use ip route
Reply With Quote
  #4  
Old 3rd April 2010, 19:10
lifeisboost lifeisboost is offline
Senior Member
 
Join Date: Feb 2006
Posts: 122
Thanks: 0
Thanked 2 Times in 2 Posts
 
Default

little more, i have put everything on separate sub nets with no change. still no packets are being sent to the real servers and the inactconn on the balancers just count up
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[debian 5 + ispconfig 3] Unable to send mail tanakskool HOWTO-Related Questions 6 4th November 2009 19:20
Booting On PXE And On A Customized Debian System sebastienp HOWTO-Related Questions 7 30th July 2009 22:13
Bind Failed christoph2k HOWTO-Related Questions 4 28th April 2007 01:57
Howto suggestion suse PhP ver 4 + Ver 5 wwparrish Suggest HOWTO 11 7th August 2006 14:29
e-mail problem!!! Debian 3.1 maroonworks Installation/Configuration 18 6th December 2005 15:42


All times are GMT +2. The time now is 16:27.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.