[SOLVED] TVH unstable/keeps restarting after latest update

Hi guys,

TVHeadend keeps restarting after latest (March) update.
Can I just reload the last version?

Here are logs…

osmc@osmc-Cavendish:~$ grab-logs -A

Logs successfully uploaded.

https://paste.osmc.tv/kisifacayu


There seems to be a problem with the live update feed from Tvheadend. Trying to reconnect...

Reconnected to Tvheadend

2020-05-08 22:21:26.182 htsp: Got connection from 192.168.1.114

2020-05-08 22:21:26.182 htsp: Got connection from 192.168.1.150

2020-05-08 22:21:26.182 htsp: 192.168.1.114: Welcomed client software: Kodi Media Center (HTSPv34)

2020-05-08 22:21:26.182 htsp: Got connection from 127.0.0.1

2020-05-08 22:21:26.182 htsp: Got connection from 192.168.1.150

2020-05-08 22:21:26.182 htsp: 192.168.1.150: Welcomed client software: Kodi Media Center (HTSPv34)

2020-05-08 22:21:26.182 htsp: 192.168.1.150 [ Kodi Media Center ]: Disconnected

2020-05-08 22:21:26.183 htsp: 192.168.1.114 [ Kodi Media Center ]: Disconnected

2020-05-08 22:21:26.183 htsp: 127.0.0.1: Welcomed client software: Kodi Media Center (HTSPv34)

2020-05-08 22:21:26.183 htsp: 192.168.1.150: Welcomed client software: Kodi Media Center (HTSPv34)

2020-05-08 22:21:26.183 htsp: 127.0.0.1 [ Kodi Media Center ]: Disconnected

2020-05-08 22:21:26.183 htsp: 192.168.1.150 [ Kodi Media Center ]: Disconnected

2020-05-08 22:21:26.183 htsp: Got connection from 127.0.0.1

2020-05-08 22:21:26.183 htsp: 127.0.0.1: Welcomed client software: Kodi Media Center (HTSPv34)

2020-05-08 22:21:26.183 htsp: 127.0.0.1 [ Kodi Media Center ]: Disconnected

There seems to be a problem with the live update feed from Tvheadend. Trying to reconnect...

Reconnected to Tvheadend

There seems to be a problem with the live update feed from Tvheadend. Trying to reconnect...

It seems to start, and then stop, and then start again…

osmc@osmc-Cavendish:~$ sudo service tvheadend status
● tvheadend.service - TVHeadend Server
   Loaded: loaded (/lib/systemd/system/tvheadend.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2020-05-09 15:06:07 IST; 4s ago
  Process: 24966 ExecStop=/bin/rm /run/tvheadend.pid (code=exited, status=0/SUCCESS)
  Process: 24977 ExecStart=/usr/bin/tvheadend -f -p /run/tvheadend.pid -C -u osmc -g video (code=exited, status=0/SU
  Process: 24969 ExecStartPre=/bin/sleep 10 (code=exited, status=0/SUCCESS)
 Main PID: 24979 (tvheadend)
   CGroup: /system.slice/tvheadend.service
           └─24979 /usr/bin/tvheadend -f -p /run/tvheadend.pid -C -u osmc -g video

Beal 09 15:05:57 osmc-Cavendish systemd[1]: Starting TVHeadend Server...
Beal 09 15:06:07 osmc-Cavendish tvheadend[24979]: main: Log started
Beal 09 15:06:07 osmc-Cavendish systemd[1]: Started TVHeadend Server.
Beal 09 15:06:07 osmc-Cavendish tvheadend[24979]: tcp: No systemd socket: creating a new one
Beal 09 15:06:07 osmc-Cavendish tvheadend[24979]: http: Starting HTTP server 0.0.0.0:9981
Beal 09 15:06:07 osmc-Cavendish tvheadend[24979]: tcp: No systemd socket: creating a new one
Beal 09 15:06:07 osmc-Cavendish tvheadend[24979]: htsp: Starting HTSP server 0.0.0.0:9982
Beal 09 15:06:07 osmc-Cavendish tvheadend[24979]: config: loaded
Beal 09 15:06:07 osmc-Cavendish tvheadend[24979]: config: scanfile (re)initialization with path <none>
Beal 09 15:06:10 osmc-Cavendish tvheadend[24979]: linuxdvb: adapter added /dev/dvb/adapter1

one minute later …

osmc@osmc-Cavendish:~$ sudo service tvheadend status
● tvheadend.service - TVHeadend Server
   Loaded: loaded (/lib/systemd/system/tvheadend.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2020-05-09 15:06:07 IST; 54s ago
  Process: 24966 ExecStop=/bin/rm /run/tvheadend.pid (code=exited, status=0/SUCCESS)
  Process: 24977 ExecStart=/usr/bin/tvheadend -f -p /run/tvheadend.pid -C -u osmc -g video (code=exited, status=0/SU
  Process: 24969 ExecStartPre=/bin/sleep 10 (code=exited, status=0/SUCCESS)
 Main PID: 24979 (tvheadend)
   CGroup: /system.slice/tvheadend.service
           └─24979 /usr/bin/tvheadend -f -p /run/tvheadend.pid -C -u osmc -g video

Beal 09 15:07:00 osmc-Cavendish tvheadend[24979]: htsp: 192.168.1.150 [ Kodi Media Center ]: Disconnected
Beal 09 15:07:00 osmc-Cavendish tvheadend[24979]: htsp: Got connection from 192.168.1.150
Beal 09 15:07:00 osmc-Cavendish tvheadend[24979]: htsp: 192.168.1.150: Welcomed client software: Kodi Media Center (
Beal 09 15:07:00 osmc-Cavendish tvheadend[24979]: htsp: 192.168.1.150 [ Kodi Media Center ]: Disconnected
Beal 09 15:07:00 osmc-Cavendish tvheadend[24979]: htsp: Got connection from 192.168.1.150
Beal 09 15:07:00 osmc-Cavendish tvheadend[24979]: htsp: 192.168.1.150: Welcomed client software: Kodi Media Center (
Beal 09 15:07:00 osmc-Cavendish tvheadend[24979]: htsp: 192.168.1.150 [ Kodi Media Center ]: Disconnected
Beal 09 15:07:00 osmc-Cavendish tvheadend[24979]: htsp: Got connection from 192.168.1.150
Beal 09 15:07:00 osmc-Cavendish tvheadend[24979]: htsp: 192.168.1.150: Welcomed client software: Kodi Media Center (
Beal 09 15:07:00 osmc-Cavendish tvheadend[24979]: htsp: 192.168.1.150 [ Kodi Media Center ]: Disconnected

TVH server throws tons of errors like

Beal 09 09:17:36 osmc-Cavendish tvheadend[1036]: dvr: unable to stat file '/media/PSSPRTFAT32/RecordedTV/...

and

Beal 09 09:17:39 osmc-Cavendish tvheadend[1036]: dvr: unable to stat file '/mnt/tvhdisk/RecordedTV/

not sure whether this is related to your issue. Looks like the tvheadend server is not reachable anymore.

What’s the ouput of sudo systemctl status tvheadend?

Why do you think it stops? I see alwas the same process id 24979 in both of your snippets?

so, from my point of view the tvheadend server is busy trying to reach files on paths which are not available anymore … and for that it does not react on requests from kodi’s local htsp client and other devices with ips 192.168.1.114 and 192.168.1.150.

I’ve no idea why it stops. This wasn’t happening before I did the update.

The files are TVH PVR recordings on a SMB mounted drive.
The drive is mounted, and there’s no problem accessing them…

osmc@osmc-Cavendish:~$ df
Córas comhaid                 1K-bloc    Ídithe  Ar Fáil Úsáid% Curtha suas ar
devtmpfs                       774712         0   774712     0% /dev
tmpfs                          899232     87408   811824    10% /run
/dev/vero-nand/root          14616956   3953300  9898116    29% /
tmpfs                          899232         0   899232     0% /dev/shm
tmpfs                            5120         0     5120     0% /run/lock
tmpfs                          899232         0   899232     0% /sys/fs/cgroup
//192.168.1.150/PSSPRTFAT32 976490656 912412352 64078304    94% /mnt/tvhdisk
tmpfs                          179844         0   179844     0% /run/user/1000
osmc@osmc-Cavendish:~$

Can you reboot and upload a full log?

Sam

Thanks. I had changed the locale to Gaeilge (Irish language). Not sure if that was a causing an issue, so I’ve changed it back again

osmc@osmc-Cavendish:~$ grab-logs -A

Logs successfully uploaded.

Logs available at https://paste.osmc.tv/umahogosel

But tvheadend looks at /media/PSSPRTFAT32/
While you mounted it at /mnt/tvhdisk

they are references to some deleted files which are in the recordings db in TVH.
I don’t think that’s any issue… it wasn’t before the update anyway

where is this log

May 09 17:48:56 osmc-Cavendish systemd[1]: Started TVHeadend Server.

May 09 17:48:56 osmc-Cavendish tvheadend[11311]: **main: Log started**

May 09 17:48:56 osmc-Cavendish tvheadend[11311]: tcp: No systemd socket: creating a new on

I think you’re right: the process is stopping because it can’t access those files.
It’s strange because it was never a problem before.
Does anyone know how to clear out the TVH recording dB, and just start an empty one?
Thanks

thanks everyone!
The service was restarting due to missing PVR recordings.
I delete the PVR config, and just started it again.

All good now!
Míle buíochas (many thanks!)

2 Likes