bstansell / conserver

Logged, multi-user access to device consoles
https://www.conserver.com/
BSD 3-Clause "New" or "Revised" License
129 stars 38 forks source link

very odd EINPROGRESS error on macOS when connecting to a remote terminal server #87

Closed robohack closed 1 year ago

robohack commented 1 year ago

So I've been migrating from my old ancient macos desktop to a bright shiny new one running Monterey (12.5.1 at the moment), and in moving conserver I've stumbled on a new error -- the new build of 8.2.4 (from pkgsrc) can't connect to my terminal server:

[Fri Nov 25 17:42:25 2022] conserver (68114): DEBUG: [consent.c:916] [xenful]: trying hostname=controlling.local, ip=10.0.1.240, port=2003
[Fri Nov 25 17:42:25 2022] conserver (68114): ERROR: [xenful]: Unable to connect to 10.0.1.240:2003 Operation now in progress

On the new system:

$ conserver -V
conserver: conserver.com version 8.2.4
conserver: default access type `r'
conserver: default escape sequence `^Ec'
conserver: default configuration in `/etc/conserver.cf'
conserver: default password in `/etc/conserver.passwd'
conserver: default logfile is `/var/log/conserver'
conserver: default pidfile is `/var/run/conserver.pid'
conserver: default limit is 16 members per group
conserver: default primary port referenced as `782'
conserver: default secondary base port referenced as `0'
conserver: options: libwrap, openssl
conserver: openssl version: OpenSSL 1.1.1n  15 Mar 2022
conserver: built with `./configure --sysconfdir=/etc --with-master=localhost --with-port=782 --with-libwrap=/opt/pkg --with-logfile=/var/log/conserver --with-ipv6 --with-openssl=/opt/pkg --enable-static --enable-shared --disable-dependency-tracking --prefix=/opt/pkg --build=x86_64-apple-darwin21 --host=x86_64-apple-darwin21 --sysconfdir=/etc --localstatedir=/var --mandir=/opt/pkg/share/man --enable-option-checking=yes'

On the old system this binary is working fine:

$ /usr/local/sbin/conserver -V
conserver: conserver.com version 8.2.0
conserver: default access type `r'
conserver: default escape sequence `^Ec'
conserver: default configuration in `/usr/local/etc/conserver.cf'
conserver: default password in `/usr/local/etc/conserver.passwd'
conserver: default logfile is `/var/log/conserver'
conserver: default pidfile is `/var/run/conserver.pid'
conserver: default limit is 16 members per group
conserver: default primary port referenced as `782'
conserver: default secondary base port referenced as `0'
conserver: options: openssl
conserver: openssl version: OpenSSL 1.0.2p  14 Aug 2018
conserver: built with `./configure --with-master=localhost --with-port=782 --with-logfile=/var/log/conserver --with-openssl=/opt/pkg --prefix=/usr/local'

I'll do some more debugging as soon as I get a chance, but this has me mystified.

Note that GNU Telnet (also built using pkgsrc) has no trouble connecting to the terminal server:

$ telnet -V
telnet (GNU inetutils) 1.9.4
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by many authors.
19:00 [523] $ telnet controlling.local 2003
Trying 10.0.1.240...
Connected to controlling.local.
Escape character is '^]'.

xenful# 
telnet> q
Connection closed.
robohack commented 1 year ago

OK, so I updated my pkgsrc build to use the latest 8.7.2 release and the bug disappears!

However it seems that issue #56 still happens -- I cannot get the old config using IPv4 CIDR netmasks to work now with the new build using --with-ipv6 I'll try debugging that and open a new issue.

Also I'm now seeing the local consoles listed twice with console -u and console -x, and another weird error about failing to connect to 127.0.0.1:1. (This is using the same config file from the old system.)