• HAPROXY on Windows

    From deon@VERT/ALTERANT to Digital Man on Sunday, March 14, 2021 22:34:58
    Hey DM,

    I've been using the haproxy on SBBS/Linux no problem at all. In my haproxy setup, I am using "check intr 60s" which has haproxy opening a TCP session (to check it is still there) and sending a check packet. My haproxy patch that I gave you consumes that check packet as well and closes the session. (If you have Debugging enabled it writes a "We are alive" message to the log.)

    I've just spun up a SBBS on Windows (from the zip files on your website a few days ago), and while haproxy is working OK - the check is failing.

    In the log, I see "Working out client address ..." (line 375 of xpdev/multisock.c), but then a failed to read socket, followed by "looking for version - failed []". (line 383).

    It seems the read_socket_line() is failing (381).

    So I'm not sure why haproxy is working when a user is logging in, but failing for the haproxy check. (And if I reconfig my haproxy to point to my linux machine - it works, but that is a build from 8 weeks ago in case that helps.)

    Here is an extract from the log on Windows:
    3/14 10:13:37p 1056 Working out client address from HAProxy PROTO
    3/14 10:13:37p 1056 multisock read_socket() - failed to read from socket. Got [-1] with error [An existing connection was forcibly closed by the remote host.]
    3/14 10:13:37p 1056 * HAPROXY looking for version - failed []

    And here is the log on linux:

    Mar 14 22:02:46 c-8-2 synchronet[1297558]: term 0012 Working out client address from HAProxy PROTO
    Mar 14 22:02:46 c-8-2 synchronet[1297558]: term 0012 * HAPROXY looking for version - 1st 2 bytes received [0d0a] of (2)
    Mar 14 22:02:46 c-8-2 synchronet[1297558]: term 0012 * HAPROXY PROTO v2
    Mar 14 22:02:46 c-8-2 synchronet[1297558]: term 0012 * HAPROXY Version [2]
    Mar 14 22:02:46 c-8-2 synchronet[1297558]: term 0012 * HAPROXY Command [0]
    Mar 14 22:02:46 c-8-2 synchronet[1297558]: term 0012 * HAPROXY health check - we are alive!

    I would try and debug this, but I dont have a windows dev environment and compiling on windows is out of my skill set anyway.

    Do you know why it would be failing? I am happy to give you a haproxy config (or point mine to yours) to give you some debugging data if you wanted to try and debug it. (Although I see it says the remote closed the session - but it works to a linux host... hmm...)

    ...ëîåï

    ... I shot an arrow into the air, and it stuck.

    ---
    þ Synchronet þ Alterant | an SBBS in Docker on Pi!
  • From Digital Man@VERT to deon on Sunday, March 14, 2021 13:49:24
    Re: HAPROXY on Windows
    By: deon to Digital Man on Sun Mar 14 2021 10:34 pm

    Hey DM,

    I've been using the haproxy on SBBS/Linux no problem at all. In my haproxy setup, I am using "check intr 60s" which has haproxy opening a TCP session (to check it is still there) and sending a check packet. My haproxy patch that I gave you consumes that check packet as well and closes the session. (If you have Debugging enabled it writes a "We are alive" message to the log.)

    I've just spun up a SBBS on Windows (from the zip files on your website a few days ago), and while haproxy is working OK - the check is failing.

    In the log, I see "Working out client address ..." (line 375 of xpdev/multisock.c), but then a failed to read socket, followed by "looking for version - failed []". (line 383).

    It seems the read_socket_line() is failing (381).

    So I'm not sure why haproxy is working when a user is logging in, but failing for the haproxy check. (And if I reconfig my haproxy to point to my linux machine - it works, but that is a build from 8 weeks ago in case that helps.)

    I would update the Linux build to the latest to make sure there wasn't a regression.

    Here is an extract from the log on Windows:
    3/14 10:13:37p 1056 Working out client address from HAProxy PROTO
    3/14 10:13:37p 1056 multisock read_socket() - failed to read from socket. Got [-1] with error [An existing connection was forcibly closed by the remote host.]
    3/14 10:13:37p 1056 * HAPROXY looking for version - failed []

    And here is the log on linux:

    Mar 14 22:02:46 c-8-2 synchronet[1297558]: term 0012 Working out client address from HAProxy PROTO
    Mar 14 22:02:46 c-8-2 synchronet[1297558]: term 0012 * HAPROXY looking for version - 1st 2 bytes received [0d0a] of (2)
    Mar 14 22:02:46 c-8-2 synchronet[1297558]: term 0012 * HAPROXY PROTO v2
    Mar 14 22:02:46 c-8-2 synchronet[1297558]: term 0012 * HAPROXY Version [2] Mar 14 22:02:46 c-8-2 synchronet[1297558]: term 0012 * HAPROXY Command [0] Mar 14 22:02:46 c-8-2 synchronet[1297558]: term 0012 * HAPROXY health check - we are alive!

    I would try and debug this, but I dont have a windows dev environment and compiling on windows is out of my skill set anyway.

    Do you know why it would be failing?

    Sorry, I don't know. I looked at the code but don't see anything obvious.

    I am happy to give you a haproxy config
    (or point mine to yours) to give you some debugging data if you wanted to try and debug it. (Although I see it says the remote closed the session - but it works to a linux host... hmm...)

    I don't use haproxy nor know of anyone but you that is (for Synchronet use).
    --
    digital man

    Sling Blade quote #24:
    Karl: Kaiser blade. I hit my mother upside the head with it. Mmm... Killed her. Norco, CA WX: 60.1øF, 57.0% humidity, 0 mph SSE wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From deon@VERT/ALTERANT to Digital Man on Tuesday, March 16, 2021 22:01:12
    Re: HAPROXY on Windows
    By: Digital Man to deon on Sun Mar 14 2021 01:49 pm

    Howdy,

    So I'm not sure why haproxy is working when a user is logging in, but failing for the haproxy check. (And if I reconfig my
    haproxy to point to my linux machine - it works, but that is a build from 8 weeks ago in case that helps.)

    I would update the Linux build to the latest to make sure there wasn't a regression.

    OK, I rebuilt linux and it is working fine.

    So dont understand why its failing on Windows. :(

    ...ëîåï

    ... If you don't go to people's funerals, they won't come to yours.

    ---
    þ Synchronet þ Alterant | an SBBS in Docker on Pi!