[mythtv-users] Recordings not working

Stephen Worthington stephen_agent at jsw.gen.nz
Thu May 20 16:02:23 UTC 2021


On Thu, 20 May 2021 09:41:21 -0500, you wrote:

>On 5/20/21 8:22 AM, Justin Smith wrote:
>> Hi,
>> 
>> I have the following problem: My MythTV is not recording TV shows. When I go to the Guide and select a show to record and then select the type
>> of recording rule (e.g. "Record All Showings") nothing happens. The Guide re-appears and there is no icon showing that the show is going to
>> record, nor does the recording actually happen.
>> 
>> More symptoms: The Upcoming Recordings list is empty.
>> 
>> The backend logs show all sorts of database errors but MySQL seems to be working fine so I can't make head nor tail out of it. Sample log for
>> one failed recording added below.
>> 
>> Note that LiveTV works fine. E.g. select "Watch this Channel" from the guide.
>> 
>> However when I restart the backend, everything is back to normal! All my recording rules appear to be working again. Upcoming recordings are
>> listed. And the guide shows when a show will be recorded. And recordings work.
>> 
>> But the next day, the MythTV is no longer recording again. Restarting the backend fixes it again. Rinse and repeat. This has happened over the
>> last few days.
>> 
>> One thing I have done - recently I re-ran mythtv-setup and scanned all channels again. And used WebFrontend to fix up a bunch of channel icons.
>> While I didn't check all channels, the ones I watch mostly work fine (with LiveTV).
>> 
>> I have been running MythTV since around 2006 (yep!). I always upgrade promptly when a new stable version comes out. Every few years I upgrade
>> the hardware.
>> 
>> Setup:
>> * v31+fixes frontend + backend on one box
>> * Ubuntu Focal (latest LTS).
>> * HDHR5-4DT network tuner (4 tuners).
>> * I live in Australia and use Shepherd as my TV guide source.
>> * Box is nothing fancy - Intel i5, 4GB ram, blah blah blah, circa 2015.
>> 
>> Backend log snippet when I set a show to record (was going to start shortly):
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: I Scheduler scheduler.cpp:2310 (HandleReschedule) Reschedule requested for MATCH 146 0 0 -
>> SaveRule Giro d'Italia
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdbcon.cpp:843 (prepare) Error preparing query: DELETE recordmatch FROM
>> recordmatch, channel WHERE recordmatch.chanid = channel.chanid AND recordmatch.recordid = :RECORDID
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdbcon.cpp:845 (prepare) Driver error was [2/0]:#012QMYSQL3: Unable to
>> prepare statement#012Database error was:#012
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdb.cpp:181 (DBError) DB Error (UpdateMatches1):#012Query was:#012DELETE
>> recordmatch FROM recordmatch, channel WHERE recordmatch.chanid = channel.chanid AND recordmatch.recordid = 146#012Bindings
>> were:#012:RECORDID=146#012Driver error was [2/0]:#012QMYSQL: Unable to execute query#012Database error was:#012
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdbcon.cpp:843 (prepare) Error preparing query: DELETE oldrecorded FROM
>> oldrecorded LEFT JOIN recordmatch ON     recordmatch.chanid    = oldrecorded.chanid    AND     recordmatch.starttime = oldrecorded.starttime    
>> WHERE oldrecorded.future > 0 AND     recordmatch.recordid IS NULL
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdbcon.cpp:845 (prepare) Driver error was [2/0]:#012QMYSQL3: Unable to
>> prepare statement#012Database error was:#012
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdb.cpp:181 (DBError) DB Error (DeleteFuture):#012Query was:#012DELETE
>> oldrecorded FROM oldrecorded LEFT JOIN recordmatch ON     recordmatch.chanid    = oldrecorded.chanid    AND     recordmatch.starttime =
>> oldrecorded.starttime     WHERE oldrecorded.future > 0 AND     recordmatch.recordid IS NULL#012Driver error was [2/0]:#012QMYSQL: Unable to
>> execute query#012Database error was:#012
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdbcon.cpp:843 (prepare) Error preparing query: DROP TABLE IF EXISTS
>> sched_temp_record;
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdbcon.cpp:845 (prepare) Driver error was [2/0]:#012QMYSQL3: Unable to
>> prepare statement#012Database error was:#012
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdb.cpp:181 (DBError) DB Error (Dropping sched_temp_record table):#012Query
>> was:#012DROP TABLE IF EXISTS sched_temp_record;#012Driver error was [2/0]:#012QMYSQL: Unable to execute query#012Database error was:#012
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdbcon.cpp:843 (prepare) Error preparing query: UPDATE recordmatch  INNER
>> JOIN sched_temp_record ON (recordmatch.recordid = sched_temp_record.recordid)  INNER JOIN program p ON (recordmatch.chanid = p.chanid AND      
>>                     recordmatch.starttime = p.starttime AND                           recordmatch.manualid = p.manualid)  LEFT JOIN oldrecorded
>> ON   (     sched_temp_record.dupmethod > 1 AND     oldrecorded.duplicate <> 0 AND     p.title = oldrecorded.title AND     p.generic = 0      AND
>>      (       (p.programid <> ''        AND p.programid = oldrecorded.programid)       OR       (        (p.programid = '' OR
>> oldrecorded.programid = '')        AND        (((sched_temp_record.dupmethod & 0x02) = 0) OR (p.subtitle <> ''           AND p.subtitle =
>> oldrecorded.subtitle))        AND        (((sched_temp_record.dupmethod & 0x04) = 0) OR (p.description <> ''           AND p.description =
>> oldrecorded.description))        AND        (((sched_temp_record.dupmethod & 0x08) = 0) OR           (p.subtitle <> '' AND            
>>  (p.subtitle = oldrecorded.subtitle OR               (oldrecorded.subtitle = '' AND                p.subtitle = oldrecorded.description))) OR  
>>         (p.subtitle = '' AND p.description <> '' AND              (p.description = oldrecorded.subtitle OR               (oldrecorded.subtitle =
>> '' AND                p.description = oldrecorded.description))))       )      )   )  LEFT JOIN sched_temp_recorded recorded ON   (    
>> sched_temp_record.dupmethod > 1 AND     recorded.duplicate <> 0 AND     p.title = recorded.title AND     p.generic = 0 AND     recorded.recgroup
>> NOT IN ('LiveTV','Deleted')      AND      (       (p.programid <> ''        AND p.programid = recorded.programid)       OR       (      
>>  (p.programid = '' OR recorded.programid = '')        AND        (((sched_temp_record.dupmethod & 0x02) = 0) OR (p.subtitle <> ''           AND
>> p.subtitle = recorded.subtitle))        AND        (((sch
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdbcon.cpp:845 (prepare) Driver error was [2/0]:#012QMYSQL3: Unable to
>> prepare statement#012Database error was:#012
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdb.cpp:181 (DBError) DB Error (UpdateDuplicates):#012Query was:#012UPDATE
>> recordmatch  INNER JOIN sched_temp_record ON (recordmatch.recordid = sched_temp_record.recordid)  INNER JOIN program p ON (recordmatch.chanid =
>> p.chanid AND                           recordmatch.starttime = p.starttime AND                           recordmatch.manualid = p.manualid)
>>  LEFT JOIN oldrecorded ON   (     sched_temp_record.dupmethod > 1 AND     oldrecorded.duplicate <> 0 AND     p.title = oldrecorded.title AND    
>> p.generic = 0      AND      (       (p.programid <> ''        AND p.programid = oldrecorded.programid)       OR       (        (p.programid = ''
>> OR oldrecorded.programid = '')        AND        (((sched_temp_record.dupmethod & 0x02) = 0) OR (p.subtitle <> ''           AND p.subtitle =
>> oldrecorded.subtitle))        AND        (((sched_temp_record.dupmethod & 0x04) = 0) OR (p.description <> ''           AND p.description =
>> oldrecorded.description))        AND        (((sched_temp_record.dupmethod & 0x08) = 0) OR           (p.subtitle <> '' AND            
>>  (p.subtitle = oldrecorded.subtitle OR               (oldrecorded.subtitle = '' AND                p.subtitle = oldrecorded.description))) OR  
>>         (p.subtitle = '' AND p.description <> '' AND              (p.description = oldrecorded.subtitle OR               (oldrecorded.subtitle =
>> '' AND                p.description = oldrecorded.description))))       )      )   )  LEFT JOIN sched_temp_recorded recorded ON   (    
>> sched_temp_record.dupmethod > 1 AND     recorded.duplicate <> 0 AND     p.title = recorded.title AND     p.generic = 0 AND     recorded.recgroup
>> NOT IN ('LiveTV','Deleted')      AND      (       (p.programid <> ''        AND p.programid = recorded.programid)       OR       (      
>>  (p.programid = '' OR recorded.programid = '')        AND        (((sched_temp_record.dupmethod & 0x02) = 0) OR (p.subtitle <> ''           AND
>> p.subtitle = recorded.subtitle))        
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdbcon.cpp:843 (prepare) Error preparing query: SELECT recordid, title,
>> maxepisodes, maxnewest FROM sched_temp_record
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdbcon.cpp:845 (prepare) Driver error was [2/0]:#012QMYSQL3: Unable to
>> prepare statement#012Database error was:#012
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdb.cpp:181 (DBError) DB Error (CheckTooMany):#012Query was:#012SELECT
>> recordid, title, maxepisodes, maxnewest FROM sched_temp_record#012Driver error was [2/0]:#012QMYSQL: Unable to execute query#012Database error
>> was:#012
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdbcon.cpp:843 (prepare) Error preparing query: SELECT record.title,      
>> record.subtitle,           record.description, record.season,              record.episode,     record.category,           record.chanid,    
>>  channel.channum,             record.station,     channel.name <http://channel.name>,                record.recgroup,    record.playgroup,      
>>    record.seriesid,    record.programid,          record.inetref,     record.recpriority,        record.startdate,   record.starttime,        
>>  record.enddate,     record.endtime,            record.recordid,    record.type,               record.dupin,       record.dupmethod,        
>>  record.findid,                                   record.startoffset, record.endoffset,          channel.commmethod                        
>>  FROM record INNER JOIN channel ON (channel.chanid = record.chanid) LEFT JOIN recordmatch on record.recordid = recordmatch.recordid WHERE (type
>> = 1 OR type = 7) AND       recordmatch.chanid IS NULL
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdbcon.cpp:845 (prepare) Driver error was [2/0]:#012QMYSQL3: Unable to
>> prepare statement#012Database error was:#012
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdb.cpp:181 (DBError) DB Error (AddNotListed):#012Query was:#012SELECT
>> record.title,       record.subtitle,           record.description, record.season,              record.episode,     record.category,          
>> record.chanid,      channel.channum,             record.station,     channel.name <http://channel.name>,                record.recgroup,  
>>  record.playgroup,          record.seriesid,    record.programid,          record.inetref,     record.recpriority,        record.startdate,  
>> record.starttime,          record.enddate,     record.endtime,            record.recordid,    record.type,               record.dupin,      
>> record.dupmethod,          record.findid,                                   record.startoffset, record.endoffset,          channel.commmethod  
>>                        FROM record INNER JOIN channel ON (channel.chanid = record.chanid) LEFT JOIN recordmatch on record.recordid =
>> recordmatch.recordid WHERE (type = 1 OR type = 7) AND       recordmatch.chanid IS NULL#012Driver error was [2/0]:#012QMYSQL: Unable to execute
>> query#012Database error was:#012
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdbcon.cpp:843 (prepare) Error preparing query: DROP TABLE IF EXISTS
>> sched_temp_record;
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdbcon.cpp:845 (prepare) Driver error was [2/0]:#012QMYSQL3: Unable to
>> prepare statement#012Database error was:#012
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdb.cpp:181 (DBError) DB Error (DeleteTempTables
>> sched_temp_record):#012Query was:#012DROP TABLE IF EXISTS sched_temp_record;#012Driver error was [2/0]:#012QMYSQL: Unable to execute
>> query#012Database error was:#012
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdbcon.cpp:843 (prepare) Error preparing query: DROP TABLE IF EXISTS
>> sched_temp_recorded;
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdbcon.cpp:845 (prepare) Driver error was [2/0]:#012QMYSQL3: Unable to
>> prepare statement#012Database error was:#012
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdb.cpp:181 (DBError) DB Error (DeleteTempTables drop table):#012Query
>> was:#012DROP TABLE IF EXISTS sched_temp_recorded;#012Driver error was [2/0]:#012QMYSQL: Unable to execute query#012Database error was:#012
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdbcon.cpp:843 (prepare) Error preparing query: SELECT recordid,
>> next_record FROM record;
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: E Scheduler mythdbcon.cpp:845 (prepare) Driver error was [2/0]:#012QMYSQL3: Unable to
>> prepare statement#012Database error was:#012
>> May 20 20:53:15 elzo mythbackend: mythbackend[60645]: I Scheduler scheduler.cpp:2427 (HandleReschedule) Scheduled 0 items in 0.0 = 0.00 match +
>> 0.00 check + 0.00 place
>
>Interesting. Take a look at the forum posts here:
>
>  https://forum.mythtv.org/viewtopic.php?f=36&t=4453&p=21893#p21895

I also had an incident just like that on the 16th - MythTV v31-fixes
failed to record all day until I noticed in the evening.  The log
showed lots of SQL errors.  There was a new version of MythTV waiting
to be updated to, so when I noticed the problem, I installed the
update and rebooted.  Looking at mythbackend.log now, I can see that
there were three more short periods where there were some more SQL
errors logged, but it seems to have continued working properly after
those incidents.  I think there were two more updates installed since
the day it failed to record.  My guess was that there was a bug that
caused the problem which was fixed by the update I installed when I
found the problem.

I am using MariaDB, so if my problem is the same one, it is unlikely
that both MySQL and MariaDB would be causing problems at the same
time, so the problem is likely in MythTV rather than the database
servers.


More information about the mythtv-users mailing list