TV Headend not loading on OSMC

Hi Friends,

Hoping to get to the final stages of setting up TV Headend.

I have the web portal set up showing active channels and I have enabled the add on in OSMC but when I go to “live TV PVR” it just hangs

PVR manager is starting up

I have tried both the default IP and the IP address I use to log in to TV Head end on the web, rebooting in between.

In the logs https://paste.osmc.tv/wugonizuvu it shows these errors

2022-08-30 18:26:49.822 T:2973 ERROR : AddOnLog: pvr.hts: unable to connect to 127.0.0.1:9971

2022-08-30 18:25:13.261 T:2812 ERROR : AddOnLog: pvr.hts: unable to connect to 192.168.1.12:9971

Suggest to enable debug logging and then try again and upload logs maybe they show why it can not connect.

IT didn’t like the couple of crashes from power cycling the tuner. A tv show moved folders in the library. I had to clean the library database and re scan it in . The Movies folder is empty but I can access them through Video>files anyway one thing at a time

Debug logging on and reboot
https://paste.osmc.tv/arixejecuy

Unfortunately no more details. Suggest to go to command line and check if the port is open.
netstat -tulnp | grep 9971

Details regarding how to access the command line interface can be found here on our Wiki: Accessing the command line - General - OSMC

osmc@localhost:~$ netstat -tulnp | grep 9971
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
osmc@localhost:~$

Have you entered the username and password in the client? (I think the defaults are osmc and osmc)

try
sudo netstat -tulnp and see if you can find tvheadend as program and/or 9971 as port.

Also check systemctl status tvheadend

Thanks @rick4k yes user and pass is set in the add on settings

osmc@localhost:~$ sudo netstat -tulnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2573/sshd
tcp 0 0 0.0.0.0:36666 0.0.0.0:* LISTEN 2696/kodi.bin
tcp 0 0 0.0.0.0:9981 0.0.0.0:* LISTEN 2867/tvheadend
tcp 0 0 0.0.0.0:9982 0.0.0.0:* LISTEN 2867/tvheadend
tcp 0 0 0.0.0.0:9090 0.0.0.0:* LISTEN 2696/kodi.bin
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/init
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 2696/kodi.bin
tcp6 0 0 :::22 :::* LISTEN 2573/sshd
tcp6 0 0 :::36666 :::* LISTEN 2696/kodi.bin
tcp6 0 0 :::9090 :::* LISTEN 2696/kodi.bin
tcp6 0 0 :::111 :::* LISTEN 1/init
tcp6 0 0 :::80 :::* LISTEN 2696/kodi.bin
udp 0 0 239.255.255.250:1900 0.0.0.0:* 2867/tvheadend
udp 0 0 0.0.0.0:111 0.0.0.0:* 1/init
udp 0 0 192.168.1.12:123 0.0.0.0:* 3007/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 3007/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 3007/ntpd
udp 0 0 0.0.0.0:5353 0.0.0.0:* 2446/avahi-daemon:
udp 0 0 0.0.0.0:60696 0.0.0.0:* 2867/tvheadend
udp 0 0 0.0.0.0:41672 0.0.0.0:* 2446/avahi-daemon:
udp6 0 0 :::111 :::* 1/init
udp6 0 0 ::1:123 :::* 3007/ntpd
udp6 0 0 :::123 :::* 3007/ntpd
udp6 0 0 :::5353 :::* 2446/avahi-daemon:
udp6 0 0 :::9777 :::* 2696/kodi.bin
udp6 0 0 :::57001 :::* 2446/avahi-daemon:
osmc@localhost:~$

osmc@localhost:~$ systemctl status tvheadend

  • tvheadend.service - TVHeadend Server
    Loaded: loaded (/lib/systemd/system/tvheadend.service; enabled; vendor prese
    Active: active (running) since Tue 2022-08-30 20:35:23 AEST; 25min ago
    Process: 2483 ExecStartPre=/bin/sleep 10 (code=exited, status=0/SUCCESS)
    Process: 2866 ExecStart=/usr/bin/tvheadend -f -p /run/tvheadend.pid -C -u osm
    Main PID: 2867 (tvheadend)
    Tasks: 30 (limit: 1620)
    Memory: 39.2M
    CGroup: /system.slice/tvheadend.service
    `-2867 /usr/bin/tvheadend -f -p /run/tvheadend.pid -C -u osmc -g vid

Aug 30 20:53:33 localhost tvheadend[2867]: subscription: 0008: “HTTP” unsubscri
Aug 30 20:53:35 localhost tvheadend[2867]: subscription: 0009: No input source
Aug 30 20:53:35 localhost tvheadend[2867]: webui: Couldn’t start streaming /str
Aug 30 20:53:35 localhost tvheadend[2867]: subscription: 0009: “HTTP” unsubscri
Aug 30 20:53:37 localhost tvheadend[2867]: subscription: 000A: No input source
Aug 30 20:53:37 localhost tvheadend[2867]: webui: Couldn’t start streaming /str
Aug 30 20:53:37 localhost tvheadend[2867]: subscription: 000A: “HTTP” unsubscri
Aug 30 20:53:39 localhost tvheadend[2867]: subscription: 000B: No input source
Aug 30 20:53:39 localhost tvheadend[2867]: webui: Couldn’t start streaming /str
Aug 30 20:53:39 localhost tvheadend[2867]: subscription: 000B: “HTTP” unsubscri
lines 1-21/21 (END)

Did you manually changed the port in the Client to 9971?

no I didn’t
Pretty sure its 9971 in the add on settings

Well this Wiki says default 9981/9982 which would match your tvheadend server.

https://kodi.wiki/view/Add-on:Tvheadend_HTSP_Client

Hmm ok
-changed ports to 9981/9982

osmc@localhost:~$ sudo netstat -tulnp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2524/sshd
tcp 0 0 0.0.0.0:36666 0.0.0.0:* LISTEN 2719/kodi.bin
tcp 0 0 0.0.0.0:9981 0.0.0.0:* LISTEN 2869/tvheadend
tcp 0 0 0.0.0.0:9982 0.0.0.0:* LISTEN 2869/tvheadend
tcp 0 0 0.0.0.0:9090 0.0.0.0:* LISTEN 2719/kodi.bin
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1/init
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 2719/kodi.bin
tcp6 0 0 :::22 :::* LISTEN 2524/sshd
tcp6 0 0 :::36666 :::* LISTEN 2719/kodi.bin
tcp6 0 0 :::9090 :::* LISTEN 2719/kodi.bin
tcp6 0 0 :::111 :::* LISTEN 1/init
tcp6 0 0 :::80 :::* LISTEN 2719/kodi.bin
udp 0 0 239.255.255.250:1900 0.0.0.0:* 2869/tvheadend
udp 0 0 0.0.0.0:111 0.0.0.0:* 1/init
udp 0 0 192.168.1.12:123 0.0.0.0:* 3036/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 3036/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 3036/ntpd
udp 0 0 0.0.0.0:5353 0.0.0.0:* 2431/avahi-daemon:
udp 0 0 0.0.0.0:53761 0.0.0.0:* 2869/tvheadend
udp 0 0 0.0.0.0:58080 0.0.0.0:* 2431/avahi-daemon:
udp6 0 0 :::111 :::* 1/init
udp6 0 0 ::1:123 :::* 3036/ntpd
udp6 0 0 :::123 :::* 3036/ntpd
udp6 0 0 :::5353 :::* 2431/avahi-daemon:
udp6 0 0 :::54578 :::* 2431/avahi-daemon:
udp6 0 0 :::9777 :::* 2719/kodi.bin
osmc@localhost:~$

Are you sure you changed and saved in the Addon?

AddOnLog: pvr.hts: connecting to 127.0.0.1:9971

I hit ok this time and the guide comes up in PVR / live TV but when I click on a running show and select switch to channel it says
TVheadend HTSP Client
No free adapter available

https://paste.osmc.tv/inabedareh

Well we are making progress.

Have you ensured all other clients are shutdown (e.g. webbrowser) and no recording is happening?

Yes - no recordings. I closed the TVH web and tried again after a reboot , same

https://paste.osmc.tv/cawazayuvu

Ok then I don’t have an idea. Hope someone with better tvheadend knowledge can help.
Did you tried if watching works in the TVH Web?

That doesn’t work it says “loading” for a long time then “an error occurred” but that was the case in the past even when I had it working on osmc

Has the adapter disabled itself? I find that TVHeadend can do that after a reboot sometimes.