[mythtv-users] frontend fails

Stephen Worthington stephen_agent at jsw.gen.nz
Tue Feb 28 09:34:30 UTC 2017

On Tue, 28 Feb 2017 11:14:17 +0800, you wrote:

>On 27/2/17 5:40 pm, mythtv-users-request at mythtv.org wrote:
>>>>>> I'm building a myth system for a mate.
>>>>>> Because of hastles with mythbuntu I've built from source (MythTV Version
>>>>>> : v0.28.1-3-gfc737ff-dirty) and made a deb and am running on ubuntu 16.04.
>>>>>> Backend / Frontend machine works normally.
>>>>>> A seperate frontend machine cannot find the backend.
>>>>>> myth at slave:~$ telnet ws132 6543
>>>>>> Trying
>>>>>> telnet: Unable to connect to remote host: Connection refused
>>>>>> OK that's clearly the reason
>>>>>> myth at master:~$ netstat -anp |grep 6543
>>>>>> tcp        0      0* LISTEN      -
>>>>>> tcp6       0      0 fe80::fc70:940a:21:6543 :::* LISTEN      -
>>>>>> tcp6       0      0 ::1:6543                :::* LISTEN      -
>>>>>> Hmm nothing in setup mentions 127... or localhost.
>>>>>> I see nothing in config that would say localhost.
>>>>>> My own master backend (also compiled from source  MythTV Version :
>>>>>> v0.28.1-3-gfc737ff) is quite different:
>>>>>> [sandypit] /home/jam [628]% netstat -anp |grep 6543
>>>>>> tcp        0      0* LISTEN      -
>>>>>> tcp        0      0* LISTEN      -
>>>>>> tcp        0      0 ::1:6543                :::* LISTEN      -
>>>>>> Can anyone cast light light on what is happening, more importantly why?
>>> [snip]
>>>>>> I have also found that with 0.28, if the backend starts up before
>>>>>> the network, 2 things happen:
>>>>>> 1.  It only binds to localhost and never binds to the interface IP
>>>>>> even after it comes up.
>>>> That was the problem, thanks so.
>>>> My systemd rule says:
>>>> After=network.target mysql.service
>>> With revolving media this works just fine, on a flash disk systemd does
>>> NOT do what is expected!!!
>>> Importing files into Music is very much slower on revolving media
>>> Now to resolve this issue (not importing being slower)
>>> James
>> No, "After=network.target" will not work with revolving media either.
>> It will only work for when you are using localhost, not when you want
>> to use an externally accessible IP address on a real Ethernet or WiFi
>> port.
>> If you are using Mythbuntu 16.04 with Network Manager (the default
>> install), then using "After=NetworkManager-wait-online.service" should
>> work.  Network Manager is responsible for getting the IP addresses via
>> DHCP and the NetworkManager-wait-online.service target only becomes
>> ready after the IP addresses are available.
>> This has been discussed before on this mailing list several times now.
>> See:
>> https://lists.gt.net/mythtv/users/602775
>> https://lists.gt.net/mythtv/users/605211
>> Also, these pages:
>> http://mythtvinstall.blogspot.co.nz
>> https://www.mythtv.org/wiki/Systemd_mythbackend_Configuration
>Stephen thank you for all the information and links.
>> No, "After=network.target" will not work with revolving media either
>but it *does* presumably the timing for revolving media changes enough things to make this true.

No, it does not work.  You simply are having the timings of how things
start up make things work - it is not network.target doing it.  And
such timings can change, and you can then get the problem happening
when you are not expecting it.  Network.target becomes ready when
minimal networking is ready - that happens when the localhost
interface comes up.  External interfaces take much longer to come up,
and anything that gets started after only network.target will not see
them when it starts, unless it takes a long time to start up (as it
may if lots of software is starting up at the same time from the same
spinning disk).

>As discussed in your references, I do *not* use NetworkManager but /etc/network/interfaces for a static IP address.
>What could I do to show that
>is working rather than the system works by chance.
>Thepingnetwork.service seems much more certain! (but I need to do some learning)

If you are using static IP addresses, you may still be using Network
Manager.  Network Manager can handle assigning static IP addresses. So
if you installed a normal desktop Ubuntu like Mythbuntu, not a server
version, it will have installed Network Manager.  If you have not
uninstalled it since, or somehow manually changed the configs so that
it does not start, then you will still be running Network Manager.  On
my main Mythbuntu system, where I run an OpenVPN server which needs
bridging in its network config, I had to uninstall Network Manager to
make that work.  However, on my Ubuntu 16.04 development PC, I have
static IP addresses on all three of its Ethernet cards, but Network
Manager is still running.

To see if Network Manager is running, use this command:

  systemctl status NetworkManager

More information about the mythtv-users mailing list