Strange database connection problem
Posted: Tue Jan 10, 2017 9:47 pm
Hi all, I used to use MythTV a long time ago, and am now getting back into it again. This time, I'm trying to set up a standard PC only for the backend and a Raspberry Pi to run the frontend. "mythtv" is the name of the backend bound to the IP address 192.168.1.9 running Debian Jessie, "raspberrypi" is the name of the frontend running raspbian and "voyager" is the name of my main computer not involved with mythtv. Both frontend & backend are using precompiled 0.28 binaries downloaded from the official repositories.
I've set up MythTV on "mythtv", and it seems to be working fine:
Running mythfrontend shows the standard setup wizard and I enter the database address which is 192.168.1.9 as shown in the picture below:
This is confirmed in the config.xml file on the frontend:
Connecting to the mysql server works fine:
But when I try to run mythfrontend, it tries to connect to the backend on localhost for some reason, which obviously fails:
I don't understand why the frontend is trying to connect to 127.0.0.1 and not 192.168.1.9 where the backend is located? I've double checked mythtv-setup on the backend and it shows "192.168.1.9" on both fields in the first screen.
Some help would be greatly appreciated!
With kind regards - Eddles
I've set up MythTV on "mythtv", and it seems to be working fine:
Code: Select all
voyager:~ kit$ ssh mythtv@192.168.1.9
mythtv@192.168.1.9's password:
<snip>
Last login: Tue Jan 10 20:46:22 2017 from raspberrypi
$ ps aux | grep mythbackend
mythtv 2543 0.0 2.8 3912940 58688 ? Ssl 21:11 0:00 /usr/bin/mythbackend --quiet --syslog local7
mythtv 2583 0.0 0.0 8172 1560 pts/2 S+ 21:11 0:00 less mythbackend.log
mythtv 2661 0.0 0.1 12728 2244 pts/1 S+ 21:20 0:00 grep mythbackend
$
This is confirmed in the config.xml file on the frontend:
Code: Select all
<Database>
<PingHost>0</PingHost>
<Host>192.168.1.9</Host>
<UserName>mythtv</UserName>
<Password>mythtv</Password>
<DatabaseName>mythconverg</DatabaseName>
<Port>3306</Port>
</Database>
Code: Select all
pi@raspberrypi:~ $ mysql -u mythtv -pmythtv -h 192.168.1.9 mythconverg
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 216
Server version: 5.5.53-0+deb8u1 (Debian)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SHOW TABLES;
+--------------------------------+
| Tables_in_mythconverg |
+--------------------------------+
| archiveitems |
| bdbookmark |
| capturecard |
| cardinput |
| channel |
<snip>
Code: Select all
2017-01-10 21:27:53.878835 I MythCoreContext::ConnectCommandSocket(): Connecting to backend server: 127.0.0.1:6543 (try 1 of 1)
2017-01-10 21:27:53.880004 E MythSocket(6ac0d140:-1): Failed to connect to (127.0.0.1:6543) Connection refused
2017-01-10 21:27:53.880248 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
Some help would be greatly appreciated!
With kind regards - Eddles