sm0svx / svxlink

Advanced repeater system software with EchoLink support for Linux including a GUI, Qtel - the Qt EchoLink client
http://svxlink.org/
Other
435 stars 173 forks source link

ReflectorLogic, no reconnect after IP failure #589

Closed dl8bby closed 2 years ago

dl8bby commented 2 years ago

With recent versions of the client software (e.g. v1.7.99.68/69), there is no reconnection to the reflector server after an IP failure, if the IP address is entered for HOSTS instead of the hostname. Typical entry in the log file:

24.06.2022 18:00:08: ReflectorLogic: Heartbeat timeout 24.06.2022 18:00:08: ReflectorLogic: Disconnected from 192.168.1.55:5300: Locally ordered disconnect 24.06.2022 18:01:08: ReflectorLogic: Connecting to service 24.06.2022 18:01:08: ReflectorLogic: Disconnected from 192.168.1.55:5300: Network is unreachable 24.06.2022 18:01:09: ReflectorLogic: Disconnected from 192.168.1.55:5300: Network is unreachable

After that, no further connection attemps (Connecting to ..., Disconnected ...)

After the return of the IP connection, logging into the Echolink server and APRS is no problem, but there are no further messages from the ReflectorLogic and the connection to the server is not reestablished.

The problem has already been described on groups.io by IK4NZD. So far, there is no viable solution. The tip "use the hostname für HOST instead" is not feasible in every network.

73 de DL8BBY, Matthias

sm0svx commented 2 years ago

I cannot replicate the problem when setting HOSTS to one IP address. The node still reconnect after a network failure. Try to activate some more debugging printouts by uncommenting #define ASYNC_STATE_MACHINE_DEBUG and recompile. https://github.com/sm0svx/svxlink/blob/master/src/async/core/AsyncTcpPrioClientBase.cpp#L53

It would help a lot if you could find a way, a step by step instruction, that I can use here to replicate the problem.

dl8bby commented 2 years ago

I updated an old Siemens Futro (Debian 9 Stretch) to v1.7.99.69 today and it doesn't seem to have any issues after a 5 minute IP drop. All further tests therefore only apply to Svxlink on Raspberry pi.


For my installations on Raspberry pi I use Gunnar's instructions "InstallSrcHwRpi" from github, there are no special additions. Alternatively, I'm using an image from ThueringenLink with the same results.

The connection to the reflector server runs either

To simulate the IP failure, I disconnect the connection between the Svx client and the local router or mobile hotspot for about 5 minutes (> 1 minute).

Here are the extended log entries after I unplugged the LAN connector, HOSTS=IP address

03.07.2022 13:58:01: sendto in UdpSocket::write: Network is unreachable
03.07.2022 13:58:06: ReflectorLogic: Heartbeat timeout
03.07.2022 13:58:06: ### StateMachine: Top(disconnectEvent)
03.07.2022 13:58:06: ### StateMachine: ConnectedHighestPrio -> Disconnected
03.07.2022 13:58:06: ReflectorLogic: Disconnected from 192.168.2.39:5313: Locally ordered disconnect
03.07.2022 13:59:06: ### StateMachine: Top(disconnectEvent)
03.07.2022 13:59:06: ReflectorLogic: Connecting to service
03.07.2022 13:59:06: ### StateMachine: Disconnected(connectEvent)
03.07.2022 13:59:06: ### StateMachine: Disconnected -> ConnectingSRVLookup
03.07.2022 13:59:06: ### StateMachine: ConnectingSRVLookup(dnsResultsReadyEvent)
03.07.2022 13:59:06: ### Found 1 records
03.07.2022 13:59:06: ### static 0       IN      SRV     100 100 5313 192.168.2.39
03.07.2022 13:59:06: ### StateMachine: ConnectingSRVLookup -> ConnectingTryConnect
03.07.2022 13:59:06: ### Connecting to 192.168.2.39:5313
03.07.2022 13:59:06: ReflectorLogic: Disconnected from 192.168.2.39:5313: Network is unreachable
03.07.2022 13:59:06: ### StateMachine: ConnectingTryConnect(disconnectedEvent)
03.07.2022 13:59:06: ### StateMachine: ConnectingTryConnect -> ConnectingIdle
03.07.2022 13:59:09: ### StateMachine: ConnectingIdle(timeoutEvent)
03.07.2022 13:59:09: ### StateMachine: ConnectingIdle -> ConnectingSRVLookup
03.07.2022 13:59:09: ### StateMachine: ConnectingSRVLookup(dnsResultsReadyEvent)
03.07.2022 13:59:09: ### Found 1 records
03.07.2022 13:59:09: ### static 0       IN      SRV     100 100 5313 192.168.2.39
03.07.2022 13:59:09: ### StateMachine: ConnectingSRVLookup -> ConnectingTryConnect
03.07.2022 13:59:09: ### Connecting to 192.168.2.39:5313
03.07.2022 13:59:09: ReflectorLogic: Disconnected from 192.168.2.39:5313: Network is unreachable
03.07.2022 13:59:09: ### StateMachine: ConnectingTryConnect(disconnectedEvent)
03.07.2022 13:59:09: ### StateMachine: ConnectingTryConnect -> ConnectingIdle

The client is still disconnected from the router for a few minutes, but there are no more entries from the RepeaterLogic in the log until I restart svxlink.


If I use a real hostname for HOSTS or a self-defined hostname in /etc/hosts, further messages are continuously added to the log. Once the IP connection is back there is no problem reconnecting to the reflector server.

73 de DL8BBY, Matthias

sm0svx commented 2 years ago

Fixed in SvxLink 1.7.99.71