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:01 tinc.XXX[403]: tincd 1.0.31 starting, debug level 5 2017-02-13 11:34:01 tinc.XXX[403]: /dev/net/tun is a Linux tun/tap device (tun mode) 2017-02-13 11:34:01 tinc.XXX[403]: Executing script tinc-up 2017-02-13 11:34:02 tinc.XXX[403]: Listening on 0.0.0.0 port 655 2017-02-13 11:34:02 tinc.XXX[403]: Ready 2017-02-13 11:34:02 tinc.XXX[403]: Error looking up XXX.net port 2300: Temporary failure in name resolution 2017-02-13 11:34:02 tinc.XXX[403]: Could not set up a meta connection to XXXVPN 2017-02-13 11:34:02 tinc.XXX[403]: Trying to re-establish outgoing connection in 5 seconds 2017-02-13 11:34:02 tinc.XXX[403]: Purging unreachable nodes 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. Do you have an idea how to find/solve the problem? Thanks, Sandro
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? 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. If that doesn't help, it could be that libc doesn't reload /etc/resolv.conf after the network connection came up. Tinc has code to force glibc to reload that file every time it wants to do a hostname lookup. Did you compile tinc yourself? If so, can you send us a copy of the config.h file? In any case, which Linux distribution are you using? -- Met vriendelijke groet / with kind regards, Guus Sliepen <guus at tinc-vpn.org> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20170217/47acd0b9/attachment.sig>
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
Apparently Analagous Threads
- Tinc hangs if started with network disconnected
- Tinc hangs if started with network disconnected
- Tinc hangs if started with network disconnected
- The reconnect timer can be adjusted in 1.0.31?
- Tincd fails to resolve domain names before it is started name resolution becomes available.