What does haproxy tells you when you start it manually? haproxy -d -f haproxy.cfg ?
cheers On Tue, Dec 13, 2011 at 8:27 AM, Avinash <[email protected]> wrote: > Hi Willy, > > My default section is => > > defaults > log global > mode http > option httplog > option dontlognull > retries 3 > option redispatch > maxconn 2000 > contimeout 5000 > clitimeout 50000 > srvtimeout 50000 > > My iptable rules => sudo iptables -L > > Chain INPUT (policy ACCEPT) > target prot opt source destination > > Chain FORWARD (policy ACCEPT) > target prot opt source destination > > Chain OUTPUT (policy ACCEPT) > target prot opt source destination > > netstat status => netstat --tcp --listening -n -p > (Not all processes could be identified, non-owned process info > will not be shown, you would have to be root to see it all.) > Active Internet connections (only servers) > Proto Recv-Q Send-Q Local Address Foreign Address State > PID/Program name > tcp 0 0 127.0.0.1:8005 0.0.0.0:* LISTEN > 12303/java > tcp 0 0 0.0.0.0:8009 0.0.0.0:* LISTEN > 12303/java > tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN > - > tcp 0 0 0.0.0.0:6379 0.0.0.0:* LISTEN > 1646/redis-server > tcp 0 0 10.211.154.49:80 0.0.0.0:* LISTEN > - > tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN > 12303/java > tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN > - > tcp6 0 0 :::8081 :::* LISTEN > - > tcp6 0 0 :::22 :::* LISTEN > - > > Firewall status =>sudo ufw status > Status: inactive > > Problem is even after shutting down haproxy, req for 80 getting forwarded to > 8080, that means request is getting diverted before it reaches to haproxy. > But in actual no one listening to port 80 except haproxy. My tomcat is > running on 8080 (server.xml) > > > > On Tue, Dec 13, 2011 at 11:58 AM, Willy Tarreau <[email protected]> wrote: >> >> Hi, >> >> On Tue, Dec 13, 2011 at 12:27:25AM +0530, Avinash wrote: >> > Hi, >> > >> > We have a Linux machine on which are installed 2 servers (tomcat @ 8080, >> > lighthttpd @ 8081). I am using HAProxy ( @ 80 ) to perform domain base >> > routing to these servers. >> > >> > After a reboot, we restarted the apps(haproxy, lighthttpd, tomcat) and >> > found that haproxy is no longer able to perform routing. Before reboot >> > things were working fine and we did not perform any config/software >> > changes >> > from our end. >> > >> > Here are our haproxy settings : >> > >> > >> > - frontend http_proxy >> > - bind 10.211.154.49:80 <http://10.211.154.49/> >> > - option forwardfor >> > - acl is_resource hdr_dom(host) -i resource.qureka.com >> > - acl is_app hdr_dom(host) -i www.qureka.com >> > - use_backend resource_cluster if is_resource >> > - use_backend app_cluster if is_app >> > >> > backend resource_cluster >> > server server1 127.0.0.1:8081 >> > >> > backend app_cluster >> > server server1 127.0.0.1:8080 >> >> What does your defaults section look like ? Maybe you accidentely >> removed a line and are not running in HTTP mode anymore ? >> >> Also, one thing which often starts at boot is the firewall. Maybe >> you were running a firewall on the machine which you manually disabled >> and forgot to remove it from startup. So after a reboot it starts again >> and prevents haproxy from connecting to your servers. >> >> Those are just a few guesses of course, as it's not very clear what >> changed during the reboot. >> >> Regards, >> Willy >> >

