[mythtvnz] Mythfrontend fails to connect to database

Nick Rout nick.rout at gmail.com
Thu Jul 18 06:35:42 BST 2013


On Thu, Jul 18, 2013 at 10:11 AM, Paulgir <paulgir at gmail.com> wrote:

>
>  This is almost certainly a network timing problem, caused by using the
>> real external IP address of your box instead of localhost.  I fixed
>> this by adjusting upstart's /etc/init/mythtv-backend.conf file to wait
>> for the ethernet interface to be up instead of just localhost.  The
>> Mythbuntu devs have attempted to fix this problem already, and their
>> fix (the current "start on" line) works if you have simple networking
>> where you only have one localhost and one ethernet interface on the
>> box.  This is what they have in 12.04:
>>
>> start on (local-filesystems and net-device-up IFACE!=lo and started
>> udev-finish)
>>
>> But if, like me, you have more than one other network interface (I
>> have two ethernet cards and a bridged interface for using with VPNs),
>> then that version does not work and you still need to customise it.
>> What happens is that one of your other network interfaces comes up
>> before the one that mythbackend runs on does, and that satisfies the
>> "net-device-up IFACE!=lo" condition, allowing mythbackend to start. In
>> the worst case (what I was getting occasionally) you can actually have
>> mythbackend start before it should and shut down again due to not
>> having a network interface.  More usually, it starts and does
>> eventually find the network interface once it comes up, but
>> mythfrontend does not see mythbackend in time and thinks it does not
>> have a connection.
>>
>> To fix this, comment out the current "start on" line and replace it
>> with this (if you mythbackend connects on eth0):
>>
>> start on (local-filesystems and net-device-up IFACE=eth0 and started
>> udev-finish)
>>
>> I need to use this:
>>
>> start on (local-filesystems and net-device-up IFACE=eth0 and
>> net-device-up IFACE=br0 and net-device-up IFACE=eth1 and started
>> udev-finish)
>>
>>
>
> Thanks Stephen.That appears to fix it.
>
> Cheers -Paul



Can I just say to everyone while we are vaguely on the subject, I make it a
policy when setting up mythtv to NEVER set things up to work through
localhost. It is tempting to do so, but the moment you want to add an
external frontend (and you will want to one day) you'll have a world of
pain.

Pick an IP address and hostname for the backend that you can live with, fix
it and never change it. If you get a new backend, call it by the same
hostname as the old one and give it the same IP address.

End of rant.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ourshack.com/pipermail/mythtvnz/attachments/20130718/b8815070/attachment.html>


More information about the mythtvnz mailing list