[mythtv-users] Fwd: MythTV backend service started before network is functional

R Kannan rk111810 at gmail.com
Mon Aug 5 19:09:22 UTC 2019


Apparently this went to the wrong group.



-------- Forwarded Message --------
Subject: 	MythTV backend service started before network is functional
Date: 	Sun, 4 Aug 2019 10:30:24 -0400
From: 	R Kannan <rk111810 at gmail.com>
To: 	mythtv-users-request at mythtv.org



All,

This is a followup to my issues with the backend starting before network 
is operational, causing the backend not able to tune into HDHR network 
tuner.

On Sat, 20 Jul 2019 08:38:22 -0400, Stephen Worthington 
<stephen_agent at jsw.gen.nz>wrote:

> And those are the exact symptoms of this race condition.  It does not
> always happen, depending on the timing of the startup of mythbackend.
> When it does, mythbackend is unable to see the tuner at startup and
> marks it bad.  If you later use other software to talk to the tuner,
> by then the network is up and it works.  Did you try the test for
> this, restarting mythbackend?  If you manually restart mythbackend and
> it then can use the tuner, that is pretty good diagnostic information
> that says it was the race condition that caused this problem.  Let me
> be very clear here.  ANYONE WHO IS USING NETWORK TUNERS NEEDS TO DO
> THIS FIX!  Or some other variant of it - there are different ways to
> do this.  So if you do not have a fix in place, please put one in
> place.
>
> And also ANYONE WHO IS USING REMOTE FRONTENDS NEEDS TO DO THIS FIX.
> When mythbackend starts up before the Ethernet interface(s) are up, it
> will not bind the IP addresses on the Ethernet interfaces.  So it will
> not be listening for remote frontends talking to it, as it is unable
> to talk to the network outside the local PC.  Unlike some software
> (such as MySQL/MariaDB), mythbackend does not check for changes to the
> network interfaces that happen after it starts up.  What it sees when
> it starts is what it uses to work with.  If the IP address(es) for the
> Ethernet interfaces are not available when it starts, it will never
> see them until it is started again.
>
> The same applies if you want to access Webfrontend or the MythTV
> Service APIs from outside the backend PC - you need to do this fix.
>
> MythWeb is unaffected as that is run by Apache, which is like
> MySQL/MariaDB and will see changes that happen on the network
> interfaces after it starts up.
>
Stephen,

A few questions.

1) Why doesn't stopping and stopping mythtv-backend' service fix this 
issue? Is the tuner permanently marked as 'bad' barring a reboot. Note 
that the reboot runs into the same issue.

2) I have ubuntu 14.04 (upgraded from 12.04) and it seems to be half way 
into systemd and so 'systemctl' is unavailable. The backend seems to ave 
been stopped and started with 'service mythtv-backend start'. 
'NetworkManager-wait-online.service' you refer to in your solution seems 
to be unavailable as well. I see that the 
'/etc/init/mythtv-backend.conf' has the following line....

start on (local-filesystems and *net-device-up IFACE!=lo *and started 
udev-finish)

Doesn't this ensure that network access to all non-loopback devices are 
up before mythtv-backend is started? Why is there a need for the 
additional checks in your solution. Am I missing something?

Thanks again for your help

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20190805/89f2f88b/attachment.html>


More information about the mythtv-users mailing list