On 07/13/17 18:26, Lukas Tribus wrote:
Hello!


Am 29.06.2017 um 16:14 schrieb Philipp Kolmann:
Hi Lukas,

On 06/19/17 21:23, Lukas Tribus wrote:
Am 19.06.2017 um 11:27 schrieb Philipp Kolmann:
This config works in 1.5.8 but fails to tcp-check in 1.7.5.

The errors in the logfile look like this:

Jun 19 10:52:57 testha2 haproxy[5042]: Server mail-exchtest-smtp/mbx13a is DOWN, reason: 
Socket error, info: "No port available for the TCP connection", check duration: 
0ms. 3 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in 
queue.

Bug introduced  in 95db2bcfee ("MAJOR: check: find out which port to use
for health check at run time"), the AF check in line 1521 does not trigger
in this case ("tcp-check connect port" configuration).

Partially reverting the check to the old one appears to work, but that's
probably not the correct fix.


diff --git a/src/checks.c b/src/checks.c
index 1af862e..5a34609 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -1518,7 +1518,7 @@ static int connect_conn_chk(struct task *t)
           conn->addr.to = s->addr;
       }
   -       if ((conn->addr.to.ss_family == AF_INET) || (conn->addr.to.ss_family 
== AF_INET6)) {
+       if (check->port) {
           int i = 0;
             i = srv_check_healthcheck_port(check);
thanks for the patch. I added the changed line and rebuilt the debian Package.
Now the Ports come up again.

A quick config workaround, that reduces the check to a single port consist
in adding "port 25" to each server configuration (after the check keyword).
Adding the Port works for the SMTP Setup. For IMAP, where the Port is SSL 
enabled
it still fails:
With the patch above, does the IMAP/SSL check work?

Sorry for the late reply. I was busy with a major project...

With the above Check the IMAP/SSL check works, after removing the port setting in the server line.

So everything works as with 1.6 after your patch has been applied.

I test also 1.7.9 debian backported and it still fails.

Is my configuration so out of this world? I would prefer not to have a sepereate listener for every port I route through haproxy.

Thanks
Philipp



--
-----------------------------------------------------------------------
DI Mag. Philipp Kolmann              mail: [email protected]
Technische Universitaet Wien                  web: www.zid.tuwien.ac.at
Zentraler Informatikdienst (ZID)                 tel: +43(1)58801-42011
Wiedner Hauptstr. 8-10, A-1040 Wien                        DVR: 0005886
-----------------------------------------------------------------------


Reply via email to