<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi all - I am running mythbuntu 12.04 and myth .25. My system has two BE's and a FE and has been up and running for a over a year now in its current state. I starting getting odd connectivity issues off and on a few weeks back, e.g. I would start the master BE and all would work on both primary/slave BE as well as FE-only machines, however the MBE would lose the database at some point (log at bottom shows an example). Since it was the end of summer and there was nothing on TV and I was busy with work, I shut everything off for a while, to debug at a later point. Upon booting MBE machine today, I can't connect to the database (system boots to the "pick a language" screen - which I realize is the FE, however if I try to enter the BE setup I also get the "pick a language" screen). Upon booting I got the following in the BE log:<div><br></div><div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68); background-color: rgb(255, 255, 255);"><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: C thread_unknown mythcommandlineparser.cpp:2534 (ConfigureLogging) mythbackend version: fixes/0.25 [v0.25.1-39-geffb32b]&nbsp;<a href="http://www.mythtv.org/" target="" style="line-height: 21.2999992370605px; font-weight: inherit; color: rgb(0, 104, 207); cursor: pointer;">www.mythtv.org</a></font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: C thread_unknown mythcommandlineparser.cpp:2536 (ConfigureLogging) Qt version: compile: 4.8.1, runtime: 4.8.1</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: N thread_unknown mythcommandlineparser.cpp:2538 (ConfigureLogging) Enabled verbose msgs: &nbsp;general</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: N thread_unknown logging.cpp:1176 (logStart) Setting Log Level to LOG_INFO</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: I thread_unknown logging.cpp:229 (FileLogger) Added logging to the console</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: I thread_unknown logging.cpp:369 (SyslogLogger) Added syslogging to facility local7</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: I thread_unknown logging.cpp:425 (DatabaseLogger) Added database logging to table logging</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: N thread_unknown logging.cpp:1215 (logStart) Setting up SIGHUP handler</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: N thread_unknown mythdirs.cpp:51 (InitializeMythDirs) Using runtime prefix = /usr</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: N thread_unknown mythdirs.cpp:64 (InitializeMythDirs) Using configuration directory = /home/mythtv/.mythtv</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: I CoreContext mythcorecontext.cpp:227 (Init) Assumed character encoding: en_US.UTF-8</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: E CoreContext configuration.cpp:64 (Load) Error parsing: /home/mythtv/.mythtv/config.xml at line: 1 &nbsp;column: 1</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: E CoreContext configuration.cpp:66 (Load) Error Msg: unexpected end of file</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: N CoreContext mythcontext.cpp:477 (LoadDatabaseSettings) Empty LocalHostName.</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: I CoreContext mythcontext.cpp:481 (LoadDatabaseSettings) Using localhost value of myth-master</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: E CoreContext configuration.cpp:64 (Load) Error parsing: /home/mythtv/.mythtv/config.xml at line: 1 &nbsp;column: 1</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: E CoreContext configuration.cpp:66 (Load) Error Msg: unexpected end of file</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: I CoreContext mythcontext.cpp:608 (TestDBconnection) Testing network connectivity to '192.168.0.2'</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: I SystemIOHandlerW system-unix.cpp:90 (run) Starting IO manager (write)</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: I SystemSignalManager system-unix.cpp:485 (run) Starting process signal handler</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: I SystemIOHandlerR system-unix.cpp:90 (run) Starting IO manager (read)</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: I SystemManager system-unix.cpp:263 (run) Starting process manager</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: E CoreContext mythdbcon.cpp:213 (OpenDatabase) Unable to connect to database!</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: E CoreContext mythdbcon.cpp:214 (OpenDatabase) Driver error was [1/2003]:#012QMYSQL: Unable to connect#012Database error was:#012Can't connect to MySQL server on '192.168.0.2' (111)</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: A CoreContext mythcontext.cpp:414 (FindDatabase) Cannot login to database?</font></div><div style="line-height: 21.2999992370605px;"><font face="Courier New, sans-serif" size="2">Sep 21 14:55:26 myth-master mythbackend[3149]: C CoreContext main.cpp:108 (main) Failed to init MythContext.</font></div></div></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);"><span style="font-size: 12pt;"><br></span></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);"><span style="font-size: 12pt;">After some poking around, it seemed to me basically it was looking for a blank config.xml file instead of the one in the mythtv user's home folder, so I updated the symlinking of the config.xml file so it linked to the one in my /home/(username) folder. Crossed my fingers and rebooted and seemed to have fixed the config.xml problem, but still not able to find the DB:</span></div><div style="background-color: rgb(255, 255, 255);"><br></div><div style="background-color: rgb(255, 255, 255);"><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68);"><font face="Courier New, sans-serif" size="2">Sep 21 15:26:51 myth-master mythbackend[2129]: C thread_unknown mythcommandlineparser.cpp:2534 (ConfigureLogging) mythbackend version: fixes/0.25 [v0.25.1-39-geffb32b]&nbsp;<a href="http://www.mythtv.org/" target="" style="line-height: 21.2999992370605px; font-weight: inherit; color: rgb(0, 104, 207); cursor: pointer;">www.mythtv.org</a></font></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68);"><font face="Courier New, sans-serif" size="2">Sep 21 15:26:51 myth-master mythbackend[2129]: C thread_unknown mythcommandlineparser.cpp:2536 (ConfigureLogging) Qt version: compile: 4.8.1, runtime: 4.8.1</font></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68);"><font face="Courier New, sans-serif" size="2">Sep 21 15:26:51 myth-master mythbackend[2129]: N thread_unknown mythcommandlineparser.cpp:2538 (ConfigureLogging) Enabled verbose msgs: &nbsp;general</font></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68);"><font face="Courier New, sans-serif" size="2">Sep 21 15:26:51 myth-master mythbackend[2129]: N thread_unknown logging.cpp:1176 (logStart) Setting Log Level to LOG_INFO</font></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68);"><font face="Courier New, sans-serif" size="2">Sep 21 15:26:51 myth-master mythbackend[2129]: I thread_unknown logging.cpp:229 (FileLogger) Added logging to the console</font></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68);"><font face="Courier New, sans-serif" size="2">Sep 21 15:26:51 myth-master mythbackend[2129]: I thread_unknown logging.cpp:369 (SyslogLogger) Added syslogging to facility local7</font></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68);"><font face="Courier New, sans-serif" size="2">Sep 21 15:26:51 myth-master mythbackend[2129]: I thread_unknown logging.cpp:425 (DatabaseLogger) Added database logging to table logging</font></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68);"><font face="Courier New, sans-serif" size="2">Sep 21 15:26:51 myth-master mythbackend[2129]: N thread_unknown logging.cpp:1215 (logStart) Setting up SIGHUP handler</font></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68);"><font face="Courier New, sans-serif" size="2">Sep 21 15:26:51 myth-master mythbackend[2129]: N thread_unknown mythdirs.cpp:51 (InitializeMythDirs) Using runtime prefix = /usr</font></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68);"><font face="Courier New, sans-serif" size="2">Sep 21 15:26:51 myth-master mythbackend[2129]: N thread_unknown mythdirs.cpp:64 (InitializeMythDirs) Using configuration directory = /home/mythtv/.mythtv</font></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68);"><font face="Courier New, sans-serif" size="2">Sep 21 15:26:51 myth-master mythbackend[2129]: I CoreContext mythcorecontext.cpp:227 (Init) Assumed character encoding: en_US.UTF-8</font></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68);"><font face="Courier New, sans-serif" size="2">Sep 21 15:26:51 myth-master mythbackend[2129]: N CoreContext mythcontext.cpp:477 (LoadDatabaseSettings) Empty LocalHostName.</font></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68);"><font face="Courier New, sans-serif" size="2">Sep 21 15:26:51 myth-master mythbackend[2129]: I CoreContext mythcontext.cpp:481 (LoadDatabaseSettings) Using localhost value of myth-master</font></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68);"><font face="Courier New, sans-serif" size="2">Sep 21 15:26:51 myth-master mythbackend[2129]: I CoreContext mythcontext.cpp:608 (TestDBconnection) Testing network connectivity to '192.168.0.2'</font></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68);"><font face="Courier New, sans-serif" size="2">Sep 21 15:26:51 myth-master mythbackend[2129]: I SystemIOHandlerR system-unix.cpp:90 (run) Starting IO manager (read)</font></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68);"><font face="Courier New, sans-serif" size="2">Sep 21 15:26:51 myth-master mythbackend[2129]: I SystemIOHandlerW system-unix.cpp:90 (run) Starting IO manager (write)</font></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68);"><font face="Courier New, sans-serif" size="2">Sep 21 15:26:51 myth-master mythbackend[2129]: I SystemSignalManager system-unix.cpp:485 (run) Starting process signal handler</font></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68);"><font face="Courier New, sans-serif" size="2">Sep 21 15:26:51 myth-master mythbackend[2129]: I SystemManager system-unix.cpp:263 (run) Starting process manager</font></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68);"><font face="Courier New, sans-serif" size="2">Sep 21 15:26:51 myth-master mythbackend[2129]: E CoreContext mythdbcon.cpp:213 (OpenDatabase) Unable to connect to database!</font></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68);"><font face="Courier New, sans-serif" size="2">Sep 21 15:26:51 myth-master mythbackend[2129]: E CoreContext mythdbcon.cpp:214 (OpenDatabase) Driver error was [1/2003]:#012QMYSQL: Unable to connect#012Database error was:#012Can't connect to MySQL server on '192.168.0.2' (111)</font></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68);"><font face="Courier New, sans-serif" size="2">Sep 21 15:26:51 myth-master mythbackend[2129]: A CoreContext mythcontext.cpp:414 (FindDatabase) Cannot login to database?</font></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68);"><font face="Courier New, sans-serif" size="2">Sep 21 15:26:51 myth-master mythbackend[2129]: C CoreContext main.cpp:108 (main) Failed to init MythContext.</font></div></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);"><br></div><div style="background-color: rgb(255, 255, 255);">So I don't think the config.xml problem was the culprit here (or if it was even actually a problem). Of course, I'm not really sure where to go from here. I'm not able to enter mythbackend setup, and from what I can see all values for the address of the BE as well as the name of the DB and password are correct (and unchanged from when they were in a working state) in config.xml and mysql.txt. Anyone able to get me pointed in the right direction? I do have logs of when the DB was still able to be reached, etc., if those would be of any help.</div><div style="background-color: rgb(255, 255, 255);"><br></div><div style="background-color: rgb(255, 255, 255);">For posterity's sake, here's a log of the BE going from a running state to losing the database:</div><div style="background-color: rgb(255, 255, 255);"><div style="line-height: 21.2999992370605px;"><font size="2" face="Courier New, sans-serif">Sep &nbsp;6 22:17:23 myth-master mythbackend[1907]: N Expire autoexpire.cpp:263 (CalcParams) AutoExpire: CalcParams(): Max required Free Space: 1.0 GB w/freq: 15 min</font></div><div style="line-height: 21.2999992370605px;"><font size="2" face="Courier New, sans-serif">Sep &nbsp;6 22:21:05 myth-master mythbackend[1907]: I HouseKeeping housekeeper.cpp:225 (RunHouseKeeping) Running housekeeping thread</font></div><div style="line-height: 21.2999992370605px;"><font size="2" face="Courier New, sans-serif">Sep &nbsp;6 22:26:08 myth-master mythbackend[1907]: I HouseKeeping housekeeper.cpp:225 (RunHouseKeeping) Running housekeeping thread</font></div><div style="line-height: 21.2999992370605px;"><font size="2" face="Courier New, sans-serif">Sep &nbsp;6 22:31:11 myth-master mythbackend[1907]: I HouseKeeping housekeeper.cpp:225 (RunHouseKeeping) Running housekeeping thread</font></div><div style="line-height: 21.2999992370605px;"><font size="2" face="Courier New, sans-serif">Sep &nbsp;6 22:32:23 myth-master mythbackend[1907]: N Expire autoexpire.cpp:263 (CalcParams) AutoExpire: CalcParams(): Max required Free Space: 1.0 GB w/freq: 15 min</font></div><div style="line-height: 21.2999992370605px;"><font size="2" face="Courier New, sans-serif">Sep &nbsp;6 22:36:13 myth-master mythbackend[1907]: I HouseKeeping housekeeper.cpp:225 (RunHouseKeeping) Running housekeeping thread</font></div><div style="line-height: 21.2999992370605px;"><font size="2" face="Courier New, sans-serif">Sep &nbsp;6 22:41:16 myth-master mythbackend[1907]: I HouseKeeping housekeeper.cpp:225 (RunHouseKeeping) Running housekeeping thread</font></div><div style="line-height: 21.2999992370605px;"><font size="2" face="Courier New, sans-serif">Sep &nbsp;6 22:42:05 myth-master mythbackend[1907]: E FreeSpaceUpdater mythdbcon.cpp:823 (prepare) Error preparing query: SELECT MIN(id),dirname FROM storagegroup WHERE hostname = :HOSTNAME AND groupname NOT IN ( 'DB Backups', 'Videos', 'Trailers', 'Coverart', 'Fanart', 'Screenshots', 'Banners' ) GROUP BY dirname;</font></div><div style="line-height: 21.2999992370605px;"><font size="2" face="Courier New, sans-serif">Sep &nbsp;6 22:42:05 myth-master mythbackend[1907]: E FreeSpaceUpdater mythdbcon.cpp:825 (prepare) Driver error was [2/2006]:#012QMYSQL3: Unable to prepare statement#012Database error was:#012MySQL server has gone away</font></div><div style="line-height: 21.2999992370605px;"><font size="2" face="Courier New, sans-serif">Sep &nbsp;6 22:42:05 myth-master mythbackend[1907]: I FreeSpaceUpdater mythdbcon.cpp:611 (exec) MySQL server disconnected</font></div><div style="line-height: 21.2999992370605px;"><font size="2" face="Courier New, sans-serif">Sep &nbsp;6 22:42:05 myth-master mythbackend[1907]: E DBLogger mythdb.cpp:192 (DBError) DB Error (DBLogging):#012Query was:#012INSERT INTO logging &nbsp; &nbsp; (host, application, pid, tid, thread, filename, &nbsp; &nbsp; &nbsp;line, function, msgtime, level, message) VALUES (?, ?, ?, ?, ?, ?, &nbsp; &nbsp; &nbsp; &nbsp; ?, ?, ?, ?, ?)#012Bindings were:#012:APP="mythbackend", :FILENAME="mythdbcon.cpp", :FUNCTION="prepare",#012:HOST="myth-master", :LEVEL=3, :LINE=823,#012:MESSAGE="Error preparing query: SELECT MIN(id),dirname FROM storagegroup WHERE hostname = :HOSTNAME AND groupname NOT IN ( 'DB Backups', 'Videos', 'Trailers', 'Coverart', 'Fanart', 'Screenshots', 'Banners' ) GROUP BY dirname;",#012:MSGTIME="2014-09-06 22:42:05", :PID=1907, :THREAD="FreeSpaceUpdater", :TID=2307#012Driver error was [2/2006]:#012QMYSQL3: Unable to reset statement#012Database error was:#012MySQL server has gone away</font></div><div style="line-height: 21.2999992370605px;"><font size="2" face="Courier New, sans-serif">Sep &nbsp;6 22:42:05 myth-master mythbackend[1907]: E DBLogger mythdbcon.cpp:213 (OpenDatabase) Unable to connect to database!</font></div><div style="line-height: 21.2999992370605px;"><font size="2" face="Courier New, sans-serif">Sep &nbsp;6 22:42:05 myth-master mythbackend[1907]: E DBLogger mythdbcon.cpp:214 (OpenDatabase) Driver error was [1/2003]:#012QMYSQL: Unable to connect#012Database error was:#012Can't connect to MySQL server on '192.168.0.2' (111)</font></div><div style="line-height: 21.2999992370605px;"><font size="2" face="Courier New, sans-serif">Sep &nbsp;6 22:42:05 myth-master mythbackend[1907]: I DBLogger mythdbcon.cpp:808 (prepare) MySQL server disconnected</font></div><div style="line-height: 21.2999992370605px;"><font size="2" face="Courier New, sans-serif">Sep &nbsp;6 22:42:05 myth-master mythbackend[1907]: I DBLogger mythdbcon.cpp:611 (exec) MySQL server disconnected</font></div><div style="line-height: 21.2999992370605px;"><font size="2" face="Courier New, sans-serif">Sep &nbsp;6 22:42:06 myth-master mythbackend[1907]: E DBLogger mythdbcon.cpp:213 (OpenDatabase) Unable to connect to database!</font></div><div style="line-height: 21.2999992370605px;"><font size="2" face="Courier New, sans-serif"><br></font></div><div>Last 5 lines will repeat about 10 times a second until the BE is shut down or the logfile rolls over (makes looking through the logs not so fun!).&nbsp;</div><div><br></div><div>Thanks for any help you can provide!</div></div><div style="background-color: rgb(255, 255, 255);"><br></div><div style="background-color: rgb(255, 255, 255);"><br></div><div style="line-height: 21.2999992370605px; color: rgb(68, 68, 68); font-size: 15px; background-color: rgb(255, 255, 255);"><br></div>                                               </div></body>
</html>