Thank you so much for the quick response! It sounds like you have the
issue totally under control, but I'm replying to confirm that I am
experiencing the same problem based on the strace.
It happens with both the -sf and -st flags:
# strace /opt/haproxy/haproxy -f /etc/haproxy.cfg -p /var/run/
haproxy.pid -V -d -st 2985
...(cut)...
setsockopt(4, SOL_SOCKET, 0xf /* SO_??? */, [1], 4) = -1 ENOPROTOOPT
(Protocol not available)
bind(4, {sa_family=AF_INET, sin_port=htons(80),
sin_addr=inet_addr("10.253.10.32")}, 16) = -1 EADDRINUSE (Address
already in use)
close(4) = 0 exit_group(1) = ?Process 32016 detached
# strace /opt/haproxy/haproxy -f /etc/haproxy.cfg -p /var/run/
haproxy.pid -V -d -sf 2985
..(cut)...
setsockopt(4, SOL_SOCKET, 0xf /* SO_??? */, [1], 4) = -1 ENOPROTOOPT
(Protocol not available)
bind(4, {sa_family=AF_INET, sin_port=htons(80),
sin_addr=inet_addr("10.253.10.32")}, 16) = -1 EADDRINUSE (Address
already in use)
close(4) = 0 exit_group(1) = ?Process 32022 detached
So my trace matches yours almost exactly, with both -sf and -st, although I am binding to a single IP address.
Let me know if there is anything I can do - if you do need further information or would like me to try the patched version in my environment.
Thanks again,
Justin
On Dec 20, 2007, at 9:26 PM, Willy Tarreau wrote:
> Hello Justin,
>
> On Thu, Dec 20, 2007 at 08:35:04PM +0000, Justin Santa Barbara wrote:
>> I can't get dynamic reconfiguration to work. I want to add a
>> webserver to the haproxy load-balancer, so I edit the config file,
>> and
>> issue a -st command. However, haproxy doesn't bring the new server
>> into the rotation, no messages are logged, and essentially nothing
>> happens. An exit code of 1 is returned. If I kill haproxy and
>> relaunch it, the new webserver does enter the rotation, so I don't
>> believe the config is to blame.
>>
>> I've experimented with all sorts of combinations, but I've included
>> some attempts demonstrating what I'm doing at the end here - haproxy
>> just seems to exit.
>
> That's not expected, and your tests look correct. Have you tried
> with "-sf"
> instead of "-st" ? I ask this because I very rarely use "-st" so I
> may have
> introduced an undetected bug.
>
> Also, could you run the new process through strace and post the
> trace ?
> Just use "strace -o log_file haproxy -f ..." for this.
>
> I've just tried right now with the same binary and both -sf and -st
> work
> as expected *on my machine*. My return code is correct (0).
>
> Uh oh... It looks like it correcly works only on my machine, as I can
> reproduce the problem on another one :
>
> # ./haproxy-1.3.14-pcre-40kses-splice-linux-i586.notstripped -V -db -
> f test-time.cfg -st 1339
> [WARNING] 001/141150 (1340) : parsing [test-time.cfg:17] :
> overwriting client timeout which was already specified
> Available polling systems :
> sepoll : pref=400, test result OK
> epoll : pref=300, test result OK
> poll : pref=200, test result OK
> select : pref=150, test result OK
> Total: 4 (4 usable), will use sepoll.
> Using sepoll() as the polling mechanism.
> root#dhcp22:tmp# echo $?
> 1
>
> Hmmm the problem comes from the listeners :
>
> socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 4
> fcntl64(4, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
> setsockopt(4, SOL_TCP, TCP_NODELAY, [1], 4) = 0
> setsockopt(4, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
> setsockopt(4, SOL_SOCKET, 0xf /* SO_??? */, [1], 4) = -1 ENOPROTOOPT
> (Protocol not available)
> bind(4, {sa_family=AF_INET, sin_port=htons(8000),
> sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EADDRINUSE (Address already
> in use)
> close(4) = 0
> munmap(0x6fe8e000, 4096) = 0
> _exit(1) = ?
> Process 1342 detached
>
> OK, I'm checking this deeper and come back to you ASAP with a fix if
> possible.
>
> Regards,
> Willy
>
Received on 2007/12/21 00:02
This archive was generated by hypermail 2.2.0 : 2007/12/21 00:15 CET