linux-traipu team mailing list archive
-
linux-traipu team
-
Mailing list archive
-
Message #04361
[Bug 760319] Re: Programs failed to record with no trace in the mythbackend.log
I'm marking this as fixed released as we've done changing in the upstart
script that should hvae fixed this long ago. Please reopen if this is
still an issue.
** Changed in: mythbuntu
Status: New => Fix Released
--
You received this bug notification because you are a member of UBUNTU -
AL - BR, which is subscribed to Mythbuntu.
https://bugs.launchpad.net/bugs/760319
Title:
Programs failed to record with no trace in the mythbackend.log
Status in Mythbuntu, Ubuntu derivative focused upon MythTV:
Fix Released
Bug description:
This is bug-report, that includes the solution. I had to spend a lot
of time to solve it and I would like to save a time of other people
solving it.
I am using mythbuntu 10.10, separate mythbackend and mythfrontend
machines. Recently (after about 3 months using mythbuntu), I started
to have problems with failed recordings.
These were the symptoms : Some of scheduled recordings were not
recorded. (About 10% - 50% of all scheduled recordings). In spite of
the fact, that the program was already in the past, detail in
mythfrontend and listings mythweb were saying : "The program will be
recorded". I was not able to force it to record and mythbackend was
not willing to admit, that programs in the past are impossible to
record. There was no problem with conflicts. If there was a conflict,
mythtv would tell it. There was nothing in
/var/log/mythtv/mythbackend.log, The log didn't even mention that it
would try to record anything at the particular time. The only thing
were some strange messages concerning database connection, but they
were not co-incident with planned recording start. E.g. the message
about unsuccessful initialization of UPnP due to database connection.
Also, occasionally I had problems with LiveTV not starting, even
though it was possible to start recording and watch it. Usually the
problems vanished, after I restarted the mythbackend machine, but they
reappeared very soon.
My opinion about the reason of problems : I found out that there was
no problem with mysql configuration but with the timing of the start
of it. When mythbackend was starting, the mysql was not yet finished
with its startup. Consequently mythbackend gived up to start some of
its components. That was typically UPnP and other time also other
things. Upon every restart, probably different set of services given
up to start. It is apparent from mythbackend logs (Deleting UPnP
client..., Failed to init MythContext, exiting...) From mysql logs I
could find out the exact moment of starting of mysql, which was
possible to compare with start of mythbackend and it was apparent that
until the start of mysql, the log of mythbackend is full of database
connection errors and failed services and after start of mysql,
everything seems to be ok in the log (but not everything is working).
In my opinion, with months of usage, as the mysql database have grown,
the startup sequence was longer and longer, and at some point it
started to interfere with startup of mythbackend.
The bug is easily reproducible at any installation. if you start mysql
at exactly the same time as mythbackend, you should get similar
results.
The solution : I added this :
pre-start script
sleep 5 # wait for mysql to start
end script
into the file /etc/init/mythtv-backend.conf and all problems are over.
Every recording I planned since then, was recorded.
Recommendation : I think it is the problem of mythbuntu distribution
rather than mythtv itself. It allows to start database after
mythbackend which should not happen. I recommend to add some detection
of mysql database comming up (e.g. through
/var/run/mysqld/mysqld.sock) into /etc/init/mythtv-backend.conf. Many
mythtv forums say, that mythbackend waits for mysql to start, but this
assumption is definitely wrong or it is perhaps disabled in default
configuration of mythtv 0.23.1 or in mythbuntu 10.10.
To manage notifications about this bug go to:
https://bugs.launchpad.net/mythbuntu/+bug/760319/+subscriptions