LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-20-2015, 07:07 AM   #1
kha.t.nguyen
LQ Newbie
 
Registered: Feb 2011
Posts: 9

Rep: Reputation: 0
haproxy: issues failing over


I have a setup as follows:
- There's one 1 haproxy server that points to primary and secondary apache servers
- The primary apache server is A, and secondary is B.
- B should become the primary only if A is unavailable.
- A will return to the primary when it becomes available again.

To test, I stop apache on A, and haproxy points to B as expected.

The problem I'm having is: when I edit the IP address of A in /etc/hosts (on the haproxy server) to make A seem unavailable, haproxy does not point to B.

How can I accomplish this?

Thanks!


My haproxy.cfg is:


global
log 127.0.0.1 local1 debug
maxconn 2000
user haproxy
group haproxy
defaults
log global
mode http
option httplog
option http-no-delay
option dontlognull
retries 3
option redispatch
option http-use-proxy-header
timeout connect 1000
timeout client 1000
timeout server 1000
listen appname haproxy-01:8080
mode http
option httpchk
stats enable
stats uri /haproxy?stats
stats realm Strictly\ Private
stats auth adminassword
stats auth Another_Userasswd
balance static-rr
option httpclose
#option forwardfor

server lamp1 sandbox-01:80 check inter 2s fall 2 rise 2
server lamp2 sandbox-02:80 check backup inter 2s fall 2 rise 2
 
Old 05-21-2015, 01:14 PM   #2
kha.t.nguyen
LQ Newbie
 
Registered: Feb 2011
Posts: 9

Original Poster
Rep: Reputation: 0
Apparently editing /etc/hosts isn't a valid test. i ended up blocking ports via iptables and simulating latency via tc, and that seemd to allow haproxy to work as expected.

Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Slackware 14.1 x64 -- Qt 5.2.1 -- Failing to compile 32bit code. KDE applets issues. hitormiss Slackware 7 04-04-2014 10:09 AM
booting / lvm / failing hard drive issues (ubuntu server) ericthefish Linux - Newbie 15 08-09-2009 11:32 AM
cron failing do to path/permission issues azwebco Programming 1 08-04-2006 06:25 AM
eth1 failing on boot, IEEE firewire card driver failing, help jackuss_169 Linux - Laptop and Netbook 5 03-05-2005 07:34 AM
kernel failing loading unnessary modules && issues upgrading to kde 3.2.2 promark Slackware 2 06-09-2004 04:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:39 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