I've just installed and configured Mythbuntu 16.04.3 LTS on an Intel NUC. It worked fine (I watched some TV through a separate Kodi front-end) until I restarted the NUC, at which point I can access http://localhost:6544/ from the NUC just fine, but cannot access it from another machine on my network. My understanding is that this is due to the service starting too soon (when networks are not yet up) and therefore not binding to make itself available on the network.
My problem now becomes: how do I fix this?
I have been trying to figure out whether the system is using systemd or upstart. Some web pages I was reading suggest the system should be using systemd by now, but I could not find a systemd config file for mythbackend. I did find a /etc/init/mythtv-backend.conf
file, which I think suggests upstart is in use...? However, when I try to control the service like this:
sudo initctl stop mythtv-backend
I get:
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
Even if I could control it, I'm not entirely sure how I should modify the /etc/init/mythtv-backend.conf
file to ensure networks are up before starting the service (frankly, I'd just settle for a 10 second timeout or something simple).
Can anyone help?
UPDATE: I can confirm systemd is in use. By executing sudo systemctl stop mythtv-backend.service
and then sudo systemctl start mythtv-backend.service
, everything works. So I need to figure out how to delay the systemd service.
UPDATE 2: following the instructions on the wiki has not worked for me. I just see an error message in the log when I attempt to start/stop mythbackend.service.
I'm going to add this as an answer, even though I'm not 100% sure I'm correct. Feedback so very welcome.
The wiki page on using systemd with mythbackend suggests creating a file called
/etc/systemd/system/mythbackend.service
. However, I finally noticed that this did not match the name of the existing service file,/lib/systemd/system/mythtv-backend.service
.I decided to try and rename
/etc/systemd/system/mythbackend.service
to/etc/systemd/system/mythtv-backend.service
. I moved the file, then had to jump through a few hoops, stopping/disabling the service, then re-enabling it again. Once I managed to enable it again without any error showing up, I restarted the machine and it is now accessible over the network.The wiki contains this warning at the top:
I was very confused by the wording. It really should make it very clear to check
/lib/systemd/system/
first to determine what file name you should use, then ensure you use the same name under/etc/systemd/system/
.