Eth0 not connected- vpn setup issue?

Hi,

Nothing really stands out from the log. I suggest trying a vanilla kodi:

sudo systemctl stop mediacenter
sudo mv .kodi kodi.back
sudo systemctl start mediacenter

Try rebooting a few times and see if you can produce, If you can’t start enabing addons 1 at a time, till you find the cause.

You can restore back to current state with:

sudo systemctl stop mediacenter
sudo mv kodi.back .kodi
sudo systemctl start mediacenter 

Thanks Tom.

Thanks for the advice Tom. You were right. Rather embarrassingly, there was an offending addon - which I won’t mention in case it’s against forum rules- that was causing the issue. Connections on boot seem really stable now. I’ll monitor things over the coming days to see if the connection drops at all, and maybe we can look at a fix if this happens, given that dillthedog said the automatic restart would not occur if the VPN tunnel goes down or fails to connect, but only if the vpn process crashes. Cheers.

1 Like

Hi,

Been looking in to this again, since dill posted. I’m currently testing a solution, but my vpn is pretty solid; but simulating a drop; it worked. You could try this:

/etc/systemd/system/openvpn-watchdog.timer:

[Unit]
Description=OpenVPN Watchdog timer

[Timer]
OnCalendar=*:0/15

[Install]
WantedBy=timers.target

/etc/systemd/system/openvpn-watchdog.service:

[Unit]
Description=OpenVPN Watchdog service
ConditionPathExists=!/proc/sys/net/ipv4/conf/tun0

[Service]
ExecStart=/bin/systemctl restart openvpn@pia_Ireland

[Install]
WantedBy=multi-user.target

sudo systemctl start openvpn-watchdog.timer
sudo systemctl enable openvpn-watchdog.timer

Please take notice we are starting and enabling the timer here, not the service; won’t work if openvpn-watchdog.service is enabled.

The timer is just scedule for the watch dog service to run every 15 min. The server checks if /proc/sys/net/ipv4/conf/tun0 exists, if it does then the watch dog service does nothing and process is repeated in 15 min. If /proc/sys/net/ipv4/conf/tun0 doesn’t exist, it means the tunnel has dropped and restating the openvpn@ service should bring the vpn tunnel back up.

Based on this:

https://bbs.archlinux.org/viewtopic.php?id=234546

Thanks Tom.

This is awesome, thanks. I’ll give it a go. How did you simulate a drop? Assuming systemctl stop openvpn is not the way to do this.

Just to clarify this point. We were discussing the systemd Restart=xxxxx, so the specific issue was/is whether systemd would restart the process. However, that doesn’t preclude the possibility of OpenVPN restarting/resetting itself if a problem occurs – which it often does.

1 Like

Ah, understood. Thanks for clarifying.

Hi,

Actually that’s exactly what I did, couple of minutes before the timer started & waited to see if the vpn came up.

Tom.

Skills Tom! That worked for me too. Thanks a lot man.

2 Likes

Really glad to see you got this sorted in the end.

Thanks Sam. Blown away by the generosity and patience of this team.

1 Like