[mythtv-users] upgraded 0.28 on mythbuntu not finding proper backend
Stephen Worthington
stephen_agent at jsw.gen.nz
Tue Jul 19 14:11:28 UTC 2016
On Tue, 19 Jul 2016 07:53:02 -0400, you wrote:
>I have upgraded my BE to 0.28-fixes on Mythbuntu.
>
>My Fedora 24 FE connects to it no problem:
>
>2016-07-19 07:35:28.497506 I [DBManager0] Connected to database 'mythconverg' at host: pvr
>...
>2016-07-19 07:35:31.934412 I MythCoreContext::ConnectCommandSocket(): Connecting to backend server: fd31:aeb1:48df:0:214:d1ff:fe13:52fb:6543 (try 1 of 5)
>
>My other Mythbuntu FE's don't seem to be finding the right BE address
>though:
>
>2016-07-19 07:41:02.143950 I [DBManager0] Connected to database 'mythconverg' at host: pvr
>...
>2016-07-19 07:41:04.433717 I MythCoreContext::ConnectCommandSocket(): Connecting to backend server: localhost:6543 (try 1 of 1)
>2016-07-19 07:41:04.434480 E MythCoreContext::GetBackendServerIP(): No address defined for host: localhost
>2016-07-19 07:41:04.438478 E MythSocket(9297b08:-1): Failed to connect to (::1:6543) Connection refused
>2016-07-19 07:41:04.439325 E Connection to master server timed out.
> Either the server is down or the master server settings
> in mythtv-settings does not contain the proper IP address
>
>
>Given that these are both connecting to the MySQL server on the same BE
>how can they not be both getting the same address for the master BE
>Myth server?
Because there are separate settings for the address of the database
server and the address of the backend server. The connection to the
database is made using the address in the config.xml file, either the
/etc/mythtv/config.xml file or one in the home directory of the user
for the frontend (/home/<mythfrontend user>/.mythtv/config.xml). Once
the connection to the database is made, the database is looked up for
the address of the mythbackend server. They do not have to be on the
same PC.
In mythtv-setup, open the General page, and there you will see the
settings for the Local Backend and Master Backend addresses. As you
have only one (master) backend, both IP addresses should be set to the
external IP address of the backend box. Those two settings are stored
in the database "settings" table as BackendServerIP and MasterServerIP
respectively. In the settings table, the MasterServerIP value has a
NULL hostname as it is a setting common to all hosts. However, the
BackendServerIP value has the hostname of the host to which it
applies. When there are multiple backends, there will be multiple
BackendServerIP entries, one for each backend, each with different
hostname values.
In mythfrontend, go to Setup => General and on that page you find the
Database Server Settings, which tell where to connect to the mysql
server to access the database. Those settings should be the same
settings as are in the config.xml file.
So, check all the config.xml files, and make sure they all have the
same settings, and that they match what is in the mythfrontend
Database Server Settings. Then check what the database has for the
BackendServerIP and MasterServerIP settings. You can do that by
logging in to the mythconverg database with mysql and doing this
query:
select * from settings where value like '%ServerIP';
You should get a result similar to mine:
+-----------------+----------+----------+
| value | data | hostname |
+-----------------+----------+----------+
| MasterServerIP | 10.0.2.4 | NULL |
| BackendServerIP | 10.0.2.4 | mypvr |
+-----------------+----------+----------+
2 rows in set (0.00 sec)
Also, you need to check that the database is accessible from outside
the backend box. On upgrade, the settings in /etc/mysql can change
when the mysql version is upgraded. The easiest way to check is to do
this as root:
cd /etc/mysql
grep -ir bind-address *
It is not unusual that there will be multiple bind-address values in
different config files. Only the last one that gets read is the one
that is used. On upgrade, more config files can be created, and one
or more can contain a bind-address setting. And one or more of those
new config files can be read after the file in which you had your
correct bind-address setting. So the best idea is to edit all the
config files that contain a bind-address line and comment out all of
them except the correct one by adding a # at the start of the line.
Leave only the one active setting that has the value of the external
IP address of the backend box, or 0.0.0.0 (which would allow
connections on all IPv4 addresses the box has), or * (which would
allow IPv6 connections also).
More information about the mythtv-users
mailing list