[mythtvnz] MythTV 0.29 and HDHomeRun
Mark van Dijk
mark.van.dijk.74 at gmail.com
Wed Nov 1 20:15:55 GMT 2017
---------- Forwarded message ----------
From: Stephen Worthington <stephen_agent at jsw.gen.nz>
To: MythTV in NZ <mythtvnz at lists.ourshack.com>
Cc:
Bcc:
Date: Wed, 01 Nov 2017 13:29:21 +1300
Subject: Re: [mythtvnz] MythTV 0.29 and HDHomeRun
On Wed, 1 Nov 2017 11:15:31 +1300, you wrote:
>If you set up MythTV to use the external IP address of the PC (as you
>do if you are using external frontends), then in v29 that problem
>should go away. I suspect that you are just using localhost
>(127.0.0.1) to connect to the backend, and the localhost interface
>comes up virtually instantly compared to the real interfaces like
>Ethernet cards. In 0.28 and before, if you used the external address
>of the PC, then mythbackend could come up before it was ready and
>would decided to drop back to using localhost. In v29 that should
>have been fixed and it will wait quite a long time for the specified
>IP address to become available to bind to.
>
>In 0.28 and before, the normal fix on Ubuntu with systemd was to
>create a systemd override file for mythtv-backend.service to make it
>wait for NetworkManager to be running. NetworkManager normally only
>signals it is running after the Ethernet interfaces are up. There are
>threads on the mythtv-users mailing list that tell you how to do that
>- it is a bit involved. But try just changing to using the external
>IP address of the box first.
>
>If mythbackend ever comes up before a tuner is ready, then it will
>mark the tuner as unavailable and will not use it. So if you have
>tuners that are slow to come up, it can be a good idea to have a
>systemd override file for mythtv-backend.service that tells it to wait
>for those tuners before starting mythbackend. I do not know of any
>way to do that with HDHomerun tuners, so you will need to make sure
>they are on and fully up before mythbackend gets started. For
>internal tuners, you create a /etc/udev/rules.d/99-tuner.rules file
>containing this:
>
>#
># Create systemd device units for capture devices
>#
>SUBSYSTEM=="video4linux", TAG+="systemd"
>SUBSYSTEM=="dvb", TAG+="systemd"
>SUBSYSTEM=="firewire", TAG+="systemd"
>
>and then in your systemd override file you put things like this in the
>[Unit] section:
>
>Wants=dev-dvb-adapter0-frontend0.device
>After=dev-dvb-adapter0-frontend0.device
>Wants=dev-dvb-adapter1-frontend0.device
>After=dev-dvb-adapter1-frontend0.device
>
>A Wants line tells systemd that this unit wants that other unit
>started. An After line tells systemd to wait until that other unit
>signals it is started before starting this unit.
Thanks very much Stephen! This is really useful. I have now verified (via
mythbackend.log and kern.log) that the mythbackend is definitely trying to
connect to the HDHomeRun before the eth0 interface is ready.
As you suggest, I changed the IP address in my MythBackend setup to point
to the real IP address rather than 127.0.0.1. I had to modify the MYSQL
config file to bind to 0.0.0.0 rather than 127.0.0.1 so that the backend
could actually connect. Unfortunate there was no change – the issue
persists and the backend is still trying to connect to the HDHomeRun before
the network is up.
I shall have a hunt around online to see how I can delay the mythbackend
via systemmd.
Cheers
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ourshack.com/pipermail/mythtvnz/attachments/20171102/642cd534/attachment.html>
More information about the mythtvnz
mailing list