LinuxQuestions.org
Review your favorite Linux distribution.
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 09-07-2011, 06:13 PM   #1
sethusubbiah
Member
 
Registered: Jul 2010
Posts: 36

Rep: Reputation: 2
Issue with load balancer


I am using haproxy to loadbalance between two webservers. I have a client generator which generates 100 threads per second and browses through the information in this webserver. When there is only one webserver behind the loadbalancer everything goes fine, but when there are two servers on the backend, on the client side i often get

Thread UserSession34: Unable to open URL http://10.76.2.15:80/PHP/index.html (Cannot assign requested address)<br>


What is the general cause of this "cannot assign requested address" issue ? and how to solve it ?
 
Old 09-08-2011, 01:38 PM   #2
mulyadi.santosa
Member
 
Registered: Sep 2011
Posts: 96

Rep: Reputation: 14
hi

Quote:
Originally Posted by sethusubbiah View Post
Thread UserSession34: Unable to open URL http://10.76.2.15:80/PHP/index.html (Cannot assign requested address)<br>


What is the general cause of this "cannot assign requested address" issue ? and how to solve it ?
let me guess, this haproxy assign something like cluster address or "floating" IP address? meaning something like a "general" IP address that "cover" real IP addresses behind it?

If so, then maybe something is wrong during the masking or translation...but I could be wrong though...
 
Old 09-09-2011, 12:18 AM   #3
sethusubbiah
Member
 
Registered: Jul 2010
Posts: 36

Original Poster
Rep: Reputation: 2
I see this error on the client side, But take a look at my haproxy config file :

global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
#log loghost local0 info
maxconn 4096
#debug
#quiet
user haproxy
group haproxy

defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
maxconn 2000
contimeout 5000
clitimeout 50000
srvtimeout 50000

listen webfarm 10.76.2.15:80
mode http
stats enable
stats auth myuser:mypass
balance roundrobin
cookie JSESSIONID prefix
option httpclose
option forwardfor
option httpchk HEAD /check.txt HTTP/1.0
server webA 10.76.2.107:80 cookie A check
server webB 10.76.2.109:80 cookie B check
 
Old 09-09-2011, 03:10 PM   #4
mulyadi.santosa
Member
 
Registered: Sep 2011
Posts: 96

Rep: Reputation: 14
hi

Sorry, I never use haproxy before so I can't help much. However, I suggest to enable "debug" option and see if haproxy log provide a useful hint.

Just personal comment: I was suspecting that it has something to do with MAC address to IP cluster assignment. Somehow it "clashes", thus preventing the assignment of the cluster IP. Or maybe it has something to do with the internal load balancing mechanism itself.
 
  


Reply

Tags
haproxy, linux, loadbalancing, webserver


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
Issue with load balancer sethusubbiah Linux - Software 1 08-19-2011 12:08 AM
Apache Jboss load balancer issue say_hi_ravi Linux - Server 0 07-19-2010 05:26 AM
load balancer ? spx2 Linux - Networking 4 05-29-2007 03:00 AM
Load Balancer shane200_ Linux - Networking 1 09-16-2005 03:17 PM
Load Balancer shane200_ Mandriva 1 05-12-2005 12:59 PM


All times are GMT -5. The time now is 03:57 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration