Changeset: a4e33a8b2504 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/a4e33a8b2504
Modified Files:
        tools/merovingian/daemon/client.c
Branch: Dec2025
Log Message:

Suppress monetdbd error when incoming connection is immediately closed

        2026-03-04 10:17:53 ERR merovingian[2626359]: client error: client 
127.0.0.1:45794 challenge error:

When customers use TCP-based health checks, their merovingian.log is
flooded with messages like the above.
It's better to consider such an immediately closed connection a success
and not log anything.

Fixes #7839


diffs (20 lines):

diff --git a/tools/merovingian/daemon/client.c 
b/tools/merovingian/daemon/client.c
--- a/tools/merovingian/daemon/client.c
+++ b/tools/merovingian/daemon/client.c
@@ -142,7 +142,15 @@ handleClient(void *data)
 #endif
                        MONETDB5_PASSWDHASH
                        );
-       mnstr_flush(fout, MNSTR_FLUSH_DATA);
+       if (mnstr_flush(fout, MNSTR_FLUSH_DATA) != 0) {
+               /* We succesfully accepted a connection but writing to it failed
+                * immediately. This is likely to be a TCP-based health check 
that
+                * closed the connection as soon as it was accepted. */
+               close_stream(fout);
+               close_stream(fdin);
+               self->dead = true;
+               return NO_ERR;
+       }
 
        /* get response */
        buf[0] = '\0';
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to