Tinc hangs if started with network disconnected
Sandro Stiller
sandro.stiller at elfin.de
Fri Feb 17 13:20:59 CET 2017
Am 17.02.2017 um 10:59 schrieb Guus Sliepen:
> On Fri, Feb 17, 2017 at 09:55:26AM +0100, Sandro Stiller wrote:
>
>> On my system, tinc is started on bootup.
>> If the Network cable is not connected, tincd hangs forever after these messages:
> [...]
>> 2017-02-13 11:34:02 tinc.XXX[403]: Error looking up XXX.net port 2300: Temporary failure in name resolution
> [...]
>> Even if I reconnect the interface, tinc does not continue.
>> If I restart the service manually, everything works fine, even with disconnected network interface (it tries again and again until internet connection works).
>> I think, there is some kind of boot-time race condition.
>> It's the same problem with version 1.0.28 and 1.0.31.
>
> Does it not log anything anymore after those messages? Or does it
> continue giving the "Error looking up..." message periodically?
It stops working completely.
>
> In the first case, try sending tinc the ALRM and/or HUP signal (tincd -n
> <netname> -kALRM). This should cause tinc to retry outgoing connections
> immediately.
After that, it continues trying.
I think, I found the cause of the problem:
Is tinc using a monotonic / steady clock for timeouts or is it using the system time?
If the system time is set during boot using the RTC (after the start of tincd), tincd stops retrying.
I tested it by starting tincd with disconnected network, waited for 1 or 2 retries and then set the system clock to 1 hour earlier.
Tincd printed one more message and then stopped the connection attempts.
> Did you compile tinc yourself? If so, can you send us a copy of
> the config.h file?
I guess, it's not needed anymore, but here it is:
http://pastebin.com/JWbMGXvi
> In any case, which Linux distribution are you using?
It's an OpenEmbedded-based distribution for embedded devices
More information about the tinc
mailing list