[mythtv-users] Remote frontend won't connect to database

Yippee Three-eight yp_38 at yahoo.com
Tue May 6 16:48:24 UTC 2014


I'm trying to get my remote frontend to connect to my backend.  I've been trying everything I could find via google, but nothing's worked yet.  I'm running 0.27 on both machines, and both machines are using OpenSUSE 13.1, x86_64.

My backend appears to work fine.  I can use the frontend on the backend box, and mythweb works fine.  My firewall on the backend machine is not blocking any access on the internal network.

When I run "mythfrontend --nologserver" on the frontend machine, this is the output:
/> mythfrontend --nologserver
2014-05-06 11:05:36.928562 I  Setup Interrupt handler
2014-05-06 11:05:36.928593 I  Setup Terminated handler
2014-05-06 11:05:36.928604 I  Setup Segmentation fault handler
2014-05-06 11:05:36.928614 I  Setup Aborted handler
2014-05-06 11:05:36.928623 I  Setup Bus error handler
2014-05-06 11:05:36.928633 I  Setup Floating point exception handler
2014-05-06 11:05:36.928644 I  Setup Illegal instruction handler
2014-05-06 11:05:36.928656 I  Setup Real-time signal 0 handler
2014-05-06 11:05:36.928668 I  Setup User defined signal 1 handler
2014-05-06 11:05:36.928678 I  Setup User defined signal 2 handler
2014-05-06 11:05:36.928832 C  mythfrontend version: tag: v0.27 [317d5b7] www.mythtv.org
2014-05-06 11:05:36.928842 C  Qt version: compile: 4.8.5, runtime: 4.8.5
2014-05-06 11:05:36.928848 N  Enabled verbose msgs:  general
2014-05-06 11:05:36.928865 N  Setting Log Level to LOG_INFO
2014-05-06 11:05:36.929078 N  Using runtime prefix = /usr
2014-05-06 11:05:36.929098 N  Using configuration directory = /home/tonka/.mythtv
2014-05-06 11:05:36.929234 I  Assumed character encoding: en_US.UTF-8
2014-05-06 11:05:36.929327 I  Added logging to the console
2014-05-06 11:05:36.929824 I  Using localhost value of Tonka_htpc_front
2014-05-06 11:05:36.929992 I  Testing network connectivity to '10.6.2.27'
2014-05-06 11:05:36.931645 I  Starting process manager
2014-05-06 11:05:36.933025 I  Starting IO manager (write)
2014-05-06 11:05:36.937239 I  Starting process signal handler
2014-05-06 11:05:36.943517 I  Starting IO manager (read)
2014-05-06 11:07:44.283284 E  Unable to connect to database!
2014-05-06 11:07:44.283338 E  Driver error was [1/2003]:
QMYSQL: Unable to connect
Database error was:
Can't connect to MySQL server on '10.6.2.27' (110)

2014-05-06 11:07:44.353895 N  Desktop video mode: 1920x1080 60.000 Hz
2014-05-06 11:07:44.399180 E  LIRC: Failed to connect to Unix socket '/dev/lircd'
            eno: Permission denied (13)
2014-05-06 11:07:44.399225 E  JoystickMenuThread: Joystick disabled - Failed to read /home/tonka/.mythtv/joystickmenurc
2014-05-06 11:07:44.399238 I  UDPListener: Enabling
2014-05-06 11:07:44.399963 I  Binding to UDP 127.0.0.1:0
2014-05-06 11:07:44.400028 I  Binding to UDP 10.6.2.33:0
2014-05-06 11:07:44.400080 I  Binding to UDP 10.6.2.255:0
2014-05-06 11:07:44.411832 I  Using Frameless Window
2014-05-06 11:07:44.411886 I  Using Full Screen Window
2014-05-06 11:07:44.421444 I  Using the Qt painter
2014-05-06 11:07:44.831119 I  MythCoreContext: Connecting to backend server: localhost:6543 (try 1 of 1)
2014-05-06 11:07:44.831315 E  No address defined for host: localhost
2014-05-06 11:07:44.843838 N  Setting QT default locale to en_US
2014-05-06 11:07:44.848695 E  MythSocket(7f5e5800c030:-1): Failed to connect to (127.0.0.1:6543) Connection refused
2014-05-06 11:07:44.853967 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
<the last five 'lines' repeat endlessly>

I can't figure out why I'm getting these lines:
2014-05-06 11:07:44.831119 I  MythCoreContext: Connecting to backend server: localhost:6543 (try 1 of 1)
2014-05-06 11:07:44.831315 E  No address defined for host: localhost

Why is it trying to connect to localhost?

Obviously, I'm getting no log files.  I run --nologserver because about 85% of the time, when I don't use that option, the frontend hangs on "adding logging to mythlogserver at TCP:<something>", but that's a different issue.


My /home/<username>/config.xml on both boxes looks like this:
<Configuration>
  <LocalHostName>my-unique-identifier-goes-here</LocalHostName>
  <Database>
    <PingHost>1</PingHost>
    <Host>10.6.2.27</Host>
    <UserName>mythtv</UserName>
    <Password>mythtv</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>
The only difference is that I've given my frontend a LocalHostName.

My my.cnf file on the frontend looks like this:
# This is default example of MySQL/MariaDB configuration provided with openSUSE
# It is based on upstream defaults with some additional examples.

# The following options will be passed to all MariaDB clients
[client]
# password  = your_password
# port       = 3306
# socket     = /var/run/mysql/mysql.sock

[mysqld]

# Remove leading # if you don't want to listen on network (only socket - safer)
# skip-networking

# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M

# Using newer file format that supports dynamic and compressed row formats. 
# If you are using replication you have to make sure, that these options are
# set everywhere the same way (probably comment them out is the easiest way)
innodb_file_format=Barracuda
innodb_file_per_table=ON

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin=mysql-bin
# binlog_format=mixed

# Remove leading # if you want to store your database elsewhere
# datadir       = /var/lib/mysql

# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set  
# but will not function as a master if omitted
server-id       = 1

# These are commonly set, remove the # and set as required.
# port = 3306
# socket = /var/run/mysql/mysql.sock

# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!   
# 
# skip-networking

# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.   
# Adjust sizes as needed, experiment to find the optimal values.      
# join_buffer_size = 128M
# sort_buffer_size = 2M  
# read_rnd_buffer_size = 2M

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES


[mysqld_multi]
mysqld     = /usr/bin/mysqld_safe
mysqladmin = /usr/bin/mysqladmin 
log        = /var/log/mysqld_multi.log

# If you want to use mysqld_multi uncomment 1 or more mysqld sections
# below or add your own ones.

# WARNING
# --------
# If you uncomment mysqld1 than make absolutely sure, that database mysql,
# configured above, is not started.  This may result in corrupted data!   
#
# [mysqld1]
# port       = 3306
# datadir    = /var/lib/mysql
# pid-file   = /var/lib/mysql/mysqld.pid
# socket     = /var/lib/mysql/mysql.sock
# user       = mysql

# [mysqld2]
# port       = 3307
# datadir    = /var/lib/mysql-databases/mysqld2
# pid-file   = /var/lib/mysql-databases/mysqld2/mysql.pid
# socket     = /var/lib/mysql-databases/mysqld2/mysql.sock
# user       = mysql

# [mysqld3]
# port       = 3308
# datadir    = /var/lib/mysql-databases/mysqld3
# pid-file   = /var/lib/mysql-databases/mysqld3/mysql.pid
# socket     = /var/lib/mysql-databases/mysqld3/mysql.sock
# user       = mysql

# [mysqld6]
# port       = 3309
# datadir    = /var/lib/mysql-databases/mysqld6
# pid-file   = /var/lib/mysql-databases/mysqld6/mysql.pid
# socket     = /var/lib/mysql-databases/mysqld6/mysql.sock
# user       = mysql

!includedir /etc/my.cnf.d


The my.cnf file on my backend is the same.  I did try adding the line "bind-address 0.0.0.0" to the my.cnf on the backend also.

Neither machine has a mysql.cnf nor a mythtv.cnf.

Any suggestions on what I can try?

Mike B



More information about the mythtv-users mailing list