[mythtv] Mythbackend fails on startup

Debabrata Banerjee davatar at comcast.net
Tue Jul 4 18:45:20 UTC 2006


I've been having this problem with FC5/mysql 5 and .19.1. Mysql will 
actually shut itself down for some reason too sometimes when mythbackend 
starts or stops. Doesn't produce an error, just "normal shutdown". I run 
mythbackend from init as well, never had a problem with Mysql 3/.18. Must be 
a mysql problem. The init script doesn't even work properly, i.e. won't 
start the service if it has done a "normal shutdown" previously.

----- Original Message ----- 
From: "Clay Claiborne" <cjc at CosmosEng.com>
To: <mythtv-dev at mythtv.org>
Sent: Wednesday, June 28, 2006 5:27 PM
Subject: [mythtv] Mythbackend fails on startup


This problem has been deviling me for 3 days now. Help.
It's a new installation:
Ubuntu 6.06 x86-64 with MySQL 5.022 and Myth SVN of about 3 days ago.

The problem is that /etc/init.d/mythtv-backend won't start mythbackend
as part of the regular sysv boot process. It fails with this in
mythbackend.log:

> 2006-06-28 16:49:22.289 Using runtime prefix = /usr
> 2006-06-28 16:49:22.460 New DB connection, total: 1
> 2006-06-28 16:49:22.473 Unable to connect to database!
> 2006-06-28 16:49:22.497 Driver error was [1/1045]:
> QMYSQL3: Unable to connect
> Database error was:
> Access denied for user 'mythtv'@'localhost' (using password: YES)
>
> QSqlQuery::exec: database not open
> QSqlQuery::exec: database not open
> 2006-06-28 16:49:22.587 DB Error (KickDatabase):
> Query was:
> SELECT NULL;
> No error type from QSqlError?  Strange...
> 2006-06-28 16:49:22.641 Failed to init MythContext, exiting.

but after the boot, I can ssh into the box and from the command line:

/etc/init.d/mythtv-backend start

and it works! with this in the log

> 2006-06-28 17:14:01.532 Using runtime prefix = /usr
> 2006-06-28 17:14:01.577 New DB connection, total: 1
> 2006-06-28 17:14:01.590 Connected to database 'mythconverg' at host:
> localhost
> 2006-06-28 17:14:01.627 Current Schema Version: 1146
> Starting up as the master server.
> 2006-06-28 17:14:01.661 New DB connection, total: 2
> 2006-06-28 17:14:01.667 Connected to database 'mythconverg' at host:
> localhost
> 2006-06-28 17:14:01.697 EITHelper: localtime offset -7:00:00
> 2006-06-28 17:14:01.740 New DB connection, total: 3
> 2006-06-28 17:14:01.743 Connected to database 'mythconverg' at host:
> localhost
> 2006-06-28 17:14:01.788 New DB scheduler connection
> 2006-06-28 17:14:01.792 Connected to database 'mythconverg' at host:
> localhost
> 2006-06-28 17:14:01.798 Main::Starting HttpServer
> 2006-06-28 17:14:01.853 Main::Registering HttpStatus Extension
> 2006-06-28 17:14:01.910 mythbackend version: 0.19.20060621-1
> www.mythtv.org
> 2006-06-28 17:14:01.913 Enabled verbose msgs:  important general
> 2006-06-28 17:14:01.915 AutoExpire: Found 1 recorders w/max rate of 72
> MiB/min
> 2006-06-28 17:14:01.919 AutoExpire: Required Free Space: 2.1 GB
> w/freq: 10 min
> 2006-06-28 17:14:03.818 Reschedule requested for id -1.
> 2006-06-28 17:14:04.016 Scheduled 0 items in 0.2 = 0.18 match + 0.02 place
> 2006-06-28 17:14:04.024 Seem to be woken up by USER


in /etc/rc2.d/

S20mysql     S93mythtv-backend

from /var/log/syslog I get this about  mysqld startup:

> Jun 28 16:49:09 LBMC mysqld[5177]: 060628 16:49:09  InnoDB: Started;
> log sequence number 0 43655
> Jun 28 16:49:10 LBMC mysqld[5177]: 060628 16:49:10 [Note]
> /usr/sbin/mysqld: ready for connections.
> Jun 28 16:49:10 LBMC mysqld[5177]: Version:
> '5.0.22-Debian_0ubuntu6.06-log'  socket:
> '/var/run/mysqld/mysqld.sock'  port: 3306  Debian Etch distribution
> Jun 28 16:49:10 LBMC ntpdate[5231]: step time server 82.211.81.145
> offset -0.577022 sec
> Jun 28 16:49:10 LBMC /etc/mysql/debian-start[5293]: Running MySQL
> upgrade script in the background...
> Jun 28 16:49:10 LBMC /etc/mysql/debian-start[5295]: This script
> updates all the mysql privilege tables to be usable by
> Jun 28 16:49:10 LBMC /etc/mysql/debian-start[5295]: MySQL 4.0 and above.
> Jun 28 16:49:10 LBMC /etc/mysql/debian-start[5295]:
> Jun 28 16:49:10 LBMC /etc/mysql/debian-start[5295]: This is needed if
> you want to use the new GRANT functions,
> Jun 28 16:49:10 LBMC /etc/mysql/debian-start[5295]: CREATE AGGREGATE
> FUNCTION, stored procedures, or
> Jun 28 16:49:10 LBMC /etc/mysql/debian-start[5295]: more secure
> passwords in 4.1
> Jun 28 16:49:10 LBMC /etc/mysql/debian-start[5295]:


This is after I put a 12s sleep in the mythtv-backend script because I'm
thinking that mysql isn't yet ready got the login bit it doesn't help.

Can You?



_______________________________________________
mythtv-dev mailing list
mythtv-dev at mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev 



More information about the mythtv-dev mailing list