Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspbian -systemd doesn't start tinc interface properly #168

Open
kjansik opened this issue Jan 17, 2018 · 4 comments
Open

Raspbian -systemd doesn't start tinc interface properly #168

kjansik opened this issue Jan 17, 2018 · 4 comments
Labels
1.0 Issue related to Tinc 1.0 bug Issues in which the users gave a clear indication to the causes of the unexpected behaviour

Comments

@kjansik
Copy link

kjansik commented Jan 17, 2018

Raspbian doesnt start tinc deamon on boot properly with Systemd:

tinc.service:
[Unit]
Description=Tinc VPN
After=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/true
ExecReload=/bin/true
WorkingDirectory=/etc/tinc

[Install]
WantedBy=multi-user.target

and [email protected]:
[Unit]
Description=Tinc net %i
PartOf=tinc.service
ReloadPropagatedFrom=tinc.service

[Service]
Type=simple
WorkingDirectory=/etc/tinc/%i
ExecStart=/usr/sbin/tincd -n %i -D -d3 --logfile
ExecReload=/usr/sbin/tincd -n %i -kHUP
TimeoutStopSec=5
Restart=always
RestartSec=60

[Install]
WantedBy=tinc.service

after boot is ifconfig status:
mojtinc: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet6 fe80::a94d:42fc:d57c:ad7a prefixlen 64 scopeid 0x20
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500
after tinc restart:
pi@raspberrypi:~ $ sudo systemctl restart tinc
pi@raspberrypi:~ $ ifconfig

mojtinc: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 192.168.1.5 netmask 255.255.0.0 destination 192.168.1.5
inet6 fe80::53ea:5266:7a5b:a660 prefixlen 64 scopeid 0x20
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500

I tried to change unit file:
[Unit]
Description=Tinc VPN
Wants=network-online.target
After=network-online.target

but without any success.
Any idea?

@kjansik
Copy link
Author

kjansik commented Jan 17, 2018

Workaround:
ExecStartPre=/bin/sleep 30,
helps little bit, but still problems: TINC interface is loosing IPV4 address silently after few hours:
mojtinc: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet6 fe80::9d64:576d:ec60:4735 prefixlen 64 scopeid 0x20
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC)
RX packets 434278 bytes 502381178 (479.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 340636 bytes 105683246 (100.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

@kjansik
Copy link
Author

kjansik commented Jan 18, 2018

jessie with same configuration works like a charm..... stretch sucks.

@gmacario
Copy link

gmacario commented May 3, 2018

@kjansik I totally second your comments - I have tinc installed on two Raspberry Pi, the one on jessie works flawlessly while I am still debugging the one on stretch.

On the other hand Raspbian stretch packages tinc 1.0.31-1, while jessie is still at 1.0.24-2.1 - not sure if the problem is in the OS or in tinc...

Have you done any progress with tinc on Raspbian stretch since your last comments in mid January?

@fangfufu fangfufu added the bug Issues in which the users gave a clear indication to the causes of the unexpected behaviour label Jun 23, 2021
@fangfufu
Copy link
Collaborator

fangfufu commented Jun 23, 2021

Does this bug still exist? I vaguely remember I seem to experienced similar thing whenever I start setting up tinc in new machine. I seem to occasionally end up deleting the systemd service file. I don't setup new tinc instances often, so I cannot confirm this bug personally right now.

@fangfufu fangfufu added the 1.0 Issue related to Tinc 1.0 label Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0 Issue related to Tinc 1.0 bug Issues in which the users gave a clear indication to the causes of the unexpected behaviour
Projects
None yet
Development

No branches or pull requests

3 participants