Hello,
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);
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).
cheers,
lukas