tinc starts too early on boot

Hamish Moffatt hamish at cloud.net.au
Mon Apr 16 01:10:02 CEST 2018


I have a bunch of Debian stretch machines with systemd where I find that 
tinc starts too early during boot, and fails to work.

Typically it is running, but printing out

Apr 14 00:53:41 db7 tinc[3077]: Can't write to Linux tun/tap device (tun 
mode) /dev/net/tun: Input/output error

regularly. Unfortunately because it is running systemd does not restart 
it, even though it's not actually working. Restarting it manually fixes 
this.


I just had another case where it didn't even start properly during boot; 
fortunately it exits so systemd tries again later and all is good.

Apr 16 06:54:43 dbtest3 tinc[3206]: tincd 1.1pre14 (JunĀ  5 2017 
01:24:43) starting, debug level 0
Apr 16 06:54:43 dbtest3 tinc[3206]: /dev/net/tun is a Linux tun/tap 
device (tun mode)
Apr 16 06:54:43 dbtest3 tinc[3206]: Error starting /usr/sbin/tincd
Apr 16 06:54:43 dbtest3 tinc[3206]: SIOCSIFADDR: No such device
Apr 16 06:54:43 dbtest3 tinc[3206]: rsvpn: ERROR while getting interface 
flags: No such device
Apr 16 06:54:43 dbtest3 tinc[3206]: SIOCSIFNETMASK: No such device
Apr 16 06:54:43 dbtest3 tinc[3206]: SIOCADDRT: No such device
Apr 16 06:54:43 dbtest3 tinc[3206]: SIOCADDRT: No such device
Apr 16 06:54:43 dbtest3 tinc[3311]: Cannot read greeting from control 
socket: Connection reset by peer
Apr 16 06:54:43 dbtest3 tinc[3311]: Could not send TERM signal to 
process with PID 3218: No such process


These machines are using DHCP configured in /etc/network/interfaces 
although I also have some using static IPs.


The tinc.service file says that tinc should start after networking 
(After=network.target). I wonder if After=network-online.target might be 
better? As defined by 
https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/

I changed my local copy and tinc came up on boot successfully.


Hamish



More information about the tinc mailing list