On Thu, Jul 02, 2015 at 03:44:37PM -0600, AJ ONeal (Home) wrote: > > It looks like you have 2 haproxy processes listening on port 64443. Can > > you verify that the pid 18887 is not a previous haproxy process still > > running, with an older configuration routing to foo_bk_default ? > > Maybe you should kill it and relaunch your tests. > > > > > Bahhhh!!!! that was it! > > sudo killall haproxy > sudo haproxy -db -f /etc/haproxy/haproxy.cfg > > It was simply a leftover process from a time when I ran haproxy without > `-db` > > curl https://localhost.daplie.com:64443 > Default on 1443 > > curl --insecure https://bar.example.com:64443 > bar on 2443 > > curl --insecure https://baz.example.com:64443 > baz on 3443 > > Works every single time! > > Curse you `SO_REUSEADDR`!!!
and SO_REUSEPORT. > Well, I suppose it's desired behavior, it's just not the behavior I > expected. I'm used to the default being EADDRINUSE and an option for > turning SO_RESUADDR on. I actually got trapped a few times during development with it. For prod it's the desired behaviour since it allows you to quickly rebind and even to reload without stopping the old process. But when debugging it's annoying. I've already considered options to disable it in some cases, but nothing seems to be both convenient and simple. Well, thinking about it now, I didn't consider the idea that the debug mode could actually force it to be disabled. That wouldn't solve all situations but would be a good start. For your case it would require a separate option. Willy

