TIP: Click on subject to list as thread! ANSI
echo: synchronet
to: deon
from: Digital Man
date: 2021-03-14 13:49:00
subject: HAPROXY on Windows

  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
--- SBBSecho 3.13-Linux
                                                                                                                       
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)

SOURCE: echomail via QWK@pharcyde.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.