tvheadend can't connect after reboot.
#1
Hello There,

I'm having issues with tvheadend. I've installed and configured it successfully and Kodi will connect to it. However, whenever I reboot the system Kodi loses the connection and I cannot connect to the web interface. Running dpkg-reconfigure solves the problem, but only until I restart the system again. Any idea on what the issue might be?

I'm running Ubuntu MATE 15.04 and started with tvheadend 4.0, after running into the problem I purged tvheadend and upgraded to the unstable 4.1, but it has exactly the same issues.

Thanks, Bez

EDIT: I found a solution posted here: https://tvheadend.org/boards/4/topics/10024?r=12959
but sadly this doesn't work for me as I still need to dpkg-reconfigure.
Reply
#2
I'd suggest some debug logs - both of client and server. What you see isn't normal (although you don't say which end is being rebooted - "the system" could be either - but it implies the server side).

I can reboot clients and server independently without problem FWIW. So, let's see what's going on on both ends...
Reply
#3
This to me from time to time on the RPi using OpenElec. I just SSH to the pi and type killall tvheadend
tvheadend will restart and xbmc will connect.
Reply
#4
@BezZeMad how did you install tvheadend?

@loggio: since you're using Openelec your issue is most likely different, I suggest you open a post on Openelec's forums about it.
Reply
#5
Sorry if my first post was a little confusing. I'm running both Kodi and tvheadend on the same machine, so it' both frontend and backend. tvheadend was installed using apt-get from the official repo selecting the stable and then unstable branches (same problem on both). tvheadend isn't actually loading on boot (I've now found), but when I manually start it the login screen hangs (when I enter login details it simply refreshes and asks me for them again).


As I can't get into tvheadend without reconfiguring, is there another way of getting debug logs?
Reply
#6
Edit /etc/default/theadend, set TVH_DEBUG=1 and restart the process.

You say "Ubuntu MATE", but I'm guessing it's actually Mint, yes? Or do you mean you've installed the Mate desktop onto Ubuntu? The latter shouldn't make any difference, as tvh isn't bothered by your desktop environment; the former might be relevant, as Mint has taken to sticking with the LTS Ubuntu base rather than updating alongside the 6-monthly Ubuntu releases. Either way, it should still auto-start, especially if installed from PPA, so that's clearly an issue.

I'm losing track of the various init systems, but do you have something in /etc/init/tvheadend.conf or in /etc/init.d/tvheadend?

EDIT

Google is your friend. Seems that Ubuntu Mate is an official Canonical distro now, with the Mate desktop bolted into Ubuntu instead of using Unity. There you go, I've learned something (that - let me guess - everyone else already knew!).

EDIT2

Thoroughly confused myself with systemd vs upstart now, so I'm giving up on that until Someone Who Understands comes along and can explain. I'm using 14.04 LTS, but I can't imagine you're the only tvh user on a systemd 'buntu release...
Reply
#7
Thanks for that, your post pointed me in the right direction. It turns out the issue was simply tvheadend not being in the systemd boot list, I've manually added it and everything is working fine! The issue with config files earlier was me running tvheadend from the terminal, instead of starting the service. This looks like it will be an issue for everyone running 15.04, but the fix is simply to type
Code:
sudo systemctl enable tvheadend.service
into the terminal after the install has finished.


Thanks for the help everyone, Bez
Reply
#8
Can you file a bug report about that on tvheadend.org? I take it not that many of us use systemd (yet atleast) so the installation scripts may still be a bit buggy.
Reply
#9
I've logged it at https://tvheadend.org/issues/3027 so it doesn't get lost.

BezZeMad - please add anything else that you think is relevant.
Reply
#10
Cheers for that. I was going log it myself, but I never got the registration email from tvheadend.org. That seems to about cover it, hopefully they get it sorted so nobody else has the same issues.
Reply

Logout Mark Read Team Forum Stats Members Help
tvheadend can't connect after reboot.0