[mythtv-users] Brand new install - Mythbackend doesn't start

Stephen Worthington stephen_agent at jsw.gen.nz
Wed Aug 2 14:20:57 UTC 2017


On Wed, 2 Aug 2017 11:48:36 +0100, you wrote:

>I beg to differ. This is mine:
>
>mythtv at jade:/home/mythtv# cat /etc/mythtv/config.xml
><Configuration>
>   <LocalHostName>jade.example.com</LocalHostName>
>   <Database>
>     <PingHost>1</PingHost>
>     <Host>192.168.NNN.NNN</Host>
>     <UserName>mythtv</UserName>
>     <Password>XXXXXXXXXX</Password>
>     <DatabaseName>mythconverg</DatabaseName>
>     <Port>3306</Port>
>   </Database>
>   <WakeOnLAN>
>     <Enabled>0</Enabled>
>     <SQLReconnectWaitTime>0</SQLReconnectWaitTime>
>     <SQLConnectRetry>5</SQLConnectRetry>
>     <Command>echo 'WOLsqlServerCommand not set'</Command>
>   </WakeOnLAN>
></Configuration>
>
>mythtv at jade:/home/mythtv#
>
>That LocalHostName entry is important. /Some/ of the checking that reads the file uses the hostname 
>(jade) for the 'Hostname' entries in the database and /some/ of the checking uses the fully 
>qualified domain name [FQDN] (jade.example.com).
>
>(I forgot during a recent upgrade and ended up with the backend using one and the frontend using the 
>other. Hilarity ensued? Er, no.)
>
>It is best to make certain that the system knows what the host is called by specifying a 
>LocalHostName entry. It doesn't matter what it is; you can use the hostname, the FQDN or anything 
>else that is unique on your system.
>
>Oh, and in mythtv-setup, make certain that the backend has the *same* IP address for backend and 
>master backend entries. Putting hostnames or FQDNs there can cause other problems.

I have never had to use the LocalHostName option - my database has
then used the correct hostname for the box without any problems.  I
would guess that it gets it from /etc/hostname.  My database does not
contain anything that uses the FQDN:

MariaDB [mythconverg]> select distinct hostname from settings;
+-----------+
| hostname  |
+-----------+
| mypvr     |
| savaidh   |
| NULL      |
| jubalcho  |
| localhost |
+-----------+
5 rows in set (0.01 sec)

In that list, mypvr is the main backend/frontend box, and savaidh and
jubalcho are boxes that have had remote frontends on them in the past.
I am not sure where localhost came from, but there is only one
settings entry using it:

MariaDB [mythconverg]> select * from settings where
hostname='localhost';
+-------+-----------+-----------+
| value | data      | hostname  |
+-------+-----------+-----------+
| Theme | Mythbuntu | localhost |
+-------+-----------+-----------+
1 row in set (0.00 sec)

I think that if you have entries using an FQDN, then at some point
your box must have lacked an /etc/hostname file, and then got the
hostname from /etc/hosts or some other place that might have had an
FQDN.


More information about the mythtv-users mailing list