Eth0 not connected- vpn setup issue?

That is correct.

Hi,

As an update…vpn remained connected overnight which is good. However, on reboot, an issue I’d been having prior to latest progress showed up- Kodi is connected to internet (system info- network) and vpn is connected (curl ipinfo.io/ip) but I can’t open any addons. Had to grab logs from command line as MyOSMC wouldn’t open.

https://paste.osmc.tv/nofoyelawu

FYI, throughout this process the vero has been assigned a static ip address via MyOSMC (192.168.0.2) outside of my router’s DHCP range (which I changed to start from 192.168.0.5) and has also had private internet access’ dns servers assigned to it via MyOSMC.

I can see from the log that ‘cannot resolve host address’ may suggest I shouldn’t be using name server in the pia_Ireland.conf file, but it’s been rock solid connecting via name server in recent days. This seemingly random behaviour (to a novice like me) makes me hesitant in pursuing a solution as these issues may be nothing to do with the Vero setup itself but more to do with my network environment/ rubbish router.

Really appreciate your help so far and would welcome any comments, but I’m conscious of taking up your time on this issue so may well admit defeat and throw in the towel. Cheers.

Hi,

Jul 07 16:02:52 osmc tvheadend[1314]: dvr: unable to stat file '/media/SD Card/Recordings/The Toy.ts'
Jul 07 16:02:52 osmc tvheadend[1314]: dvr: unable to stat file '/media/SD Card/Recordings/Absolutely Fabulous: The Movie.ts'
Jul 07 16:02:52 osmc tvheadend[1314]: dvr: unable to stat file '/media/SD Card/Recordings/Charlie Brooker's Antiviral Wipe.ts'
Jul 07 16:02:52 osmc tvheadend[1314]: dvr: unable to stat file '/media/SD Card/Recordings/Absolutely Fabulous: The Movie.ts'
Jul 07 16:02:52 osmc tvheadend[1314]: dvr: unable to stat file '/media/SD Card/Recordings/Absolutely Fabulous: The Movie.ts'
Jul 07 16:02:52 osmc tvheadend[1314]: dvr: unable to stat file '/media/SD Card/Recordings/Absolutely Fabulous: The Movie.ts'
Jul 07 16:02:52 osmc tvheadend[1314]: dvr: unable to stat file '/media/SD Card/Recordings/Absolutely Fabulous: The Movie.ts'
Jul 07 16:02:52 osmc tvheadend[1314]: dvr: unable to stat file '/media/SD Card/Recordings/Absolutely Fabulous: The Movie.ts'
Jul 07 16:02:52 osmc tvheadend[1314]: dvr: unable to stat file '/media/SD Card/Recordings/Absolutely Fabulous: The Movie.ts'

TVHeandend is having issues and the client is unable to connect. I suggest try temporarily setting the record path on the TVHeadend (http://192.168.0.2:9981) to something like /home/osmc/Movies and then rebooting and see if that resolves the issue. If it does that you will need to work out whats happened to the SD CARD.

Also Maxtor 1 drive is virtually full

/dev/sda1 3.7T 3.6T 49G 99% /media/Maxtor 1

Thanks Tom.

Hi Tom. Had no idea tvheadend could be playing a part in this. I actually reformatted the SD card recently and haven’t re-added the recording path. Ok will try. Cheers.

Set record path to /home/osmc. Every few reboots I’m still unable to launch any addons. https://paste.osmc.tv/netumapari

If you can’t see anything obvious I might just call it a day. Cheers Tom.

Hi,

2020-07-07 18:59:11.032 T:4071366656  NOTICE:   load skin from: /home/osmc/.kodi/addons/skin.arctic.horizon (version: 0.2.94)
2020-07-07 18:59:12.514 T:3969037024   ERROR: GetDirectory - Error getting include
2020-07-07 18:59:12.575 T:4071366656   ERROR: Previous line repeats 3 times.

Does the same thing occur with the OSMC skin?

Thanks Tom.

No. It’s simply that OpenVPN is starting before the network is up:

Jul 07 16:02:31 osmc ovpn-pia_Ireland[334]: RESOLVE: Cannot resolve host address: ireland.privateinternetaccess.com:1198 (Name or service not known)

Jul 07 16:02:32 osmc systemd[1]: Reached target Network is Online.

There is a separate issue, which is that the network then disconnects and reconnects but that’s not relevant to the “cannot resolve host address” message you see.

Ok, that’s good to know.

Yes, just got the osmc skin to do the same thing. Seems to work fine for a number of reboots then runs into the same problem.

https://paste.osmc.tv/oyomigeroy

Hi,

2020-07-07 21:54:44.914 T:3600540384   ERROR: GetDirectory - Error getting plugin://plugin.program.dnsleaktest/
2020-07-07 21:54:44.914 T:4069810176   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.program.dnsleaktest/) failed 

This error was also in the first log, but I was hoping it was being caused by TVheanded issue. I suggest disabling the dnsleaktest addon and see if you can reproduce the issue.

Thanks Tom.

Same issue with dns leak test addon disabled unfortunately. Probably not relevant but I’ve noticed my ping speed and download speed is significantly slower than usual when using speed tester addon. Don’t know if there’s some conflict happening that could be relevant to the network connection. Anyway, thanks guys. Amazed by your patience and willingness to help but totally fine to draw a line under this.

https://paste.osmc.tv/hokagowonu

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