Mailing List Archive

Recordings not working
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,
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, 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
Re: Recordings not working [ In reply to ]
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

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Recordings not working [ In reply to ]
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.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Recordings not working [ In reply to ]
Hi,

> >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.

Thanks for your responses. The issue described in the forum post link
you sent sounds like the same as mine.

It happened again yesterday, but today all was fine. So I'm still not
sure what's going on.


Cheers,
Justin.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Recordings not working [ In reply to ]
On Sat, 22 May 2021 17:58:43 +0800, you wrote:

>Hi,
>
>> >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.
>
>Thanks for your responses. The issue described in the forum post link
>you sent sounds like the same as mine.
>
>It happened again yesterday, but today all was fine. So I'm still not
>sure what's going on.

My mother's MythTV box had it yesterday, but mine has been fine since
I rebooted it. I am keeping an eye on them to see if it will happen
again. As best I can tell from the logs, the problem happens when the
scheduler runs, and after that the scheduler never works again, so
there are no scheduled recordings. This feels like a new MythTV bug,
so someone should create a bug report for the developers to have a
look at it.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Recordings not working [ In reply to ]
On 5/22/21 7:39 AM, Stephen Worthington wrote:
> On Sat, 22 May 2021 17:58:43 +0800, you wrote:
>
>> Hi,
>>
>>>> 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.
>> Thanks for your responses. The issue described in the forum post link
>> you sent sounds like the same as mine.
>>
>> It happened again yesterday, but today all was fine. So I'm still not
>> sure what's going on.
> My mother's MythTV box had it yesterday, but mine has been fine since
> I rebooted it. I am keeping an eye on them to see if it will happen
> again. As best I can tell from the logs, the problem happens when the
> scheduler runs, and after that the scheduler never works again, so
> there are no scheduled recordings. This feels like a new MythTV bug,
> so someone should create a bug report for the developers to have a
> look at it.
> _______________________________________________

This is possibly related to a new version of mysql, see
https://forum.mythtv.org/viewtopic.php?f=36&t=4453#p21895

Perhaps a reboot after the database upgrade would fix it?

Here are the changes to fixes/31 since April 1st. There does not seem to
be anything database or scheduler related:

* f8c59ee69d 2021/05/17 Stuart Auchterlonie : Revert "V4LChannel: Remove
unneeded definitions" - Broke debian-stretch and centos7builds
* fe5a6243ce 2021/05/17 Stuart Auchterlonie : Revert "Use system
videodev2.h" - Broke debian-stretch and centos7 builds
* 9b74773e3c 2021/05/17 Gary Buhrmaster : Use system videodev2.h
* bcc01811ca 2021/05/17 Gary Buhrmaster : V4LChannel: Remove unneeded
definitions
* 200e3f4757 2021/05/17 Klaas de Waal : Update changed streams on PMT
update
* f7de8cea58 2021/05/06 Peter Bennett : tmdb3 lookup: Prevent exception
when there are no posters.
* b2ed400037 2021/05/01 Klaas de Waal : Update file size before skip
forward
* 05c16580e1 2021/04/19 Peter Bennett : tmdb3tv: Prevent exception when
non-existent season is requested.
* c02c6fc0b3 2021/04/18 kmdewaal : Merge pull request #356 from
kt--/fix_ssa_subs_karaoke_broken
|\
| * d4997f4629 2021/04/18 kingsley : Increase cut-off for subtitle
buffer clear, too small for SSA karaoke subs
|/
* 563a05b7a8 2021/04/01 Klaas de Waal : Show "Use FFmpeg's original
MPEG-TS demuxer" option



_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Recordings not working [ In reply to ]
On 22/05/2021 15:40, Peter Bennett wrote:
> Perhaps a reboot after the database upgrade would fix it?

One data point: I have had this happen several times, each time
overnight, and each time it is resolved by restarting the backend
without also restarting mysql.

But the issue does not consistently happen overnight on my system.

If I have time the next time I notice it having happened I will open a
ticket or add logs to a ticket someone else might have opened by then.

Fixes/31.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Recordings not working [ In reply to ]
On Sat, 22 May 2021 09:40:19 -0400, you wrote:

>
>On 5/22/21 7:39 AM, Stephen Worthington wrote:
>> On Sat, 22 May 2021 17:58:43 +0800, you wrote:
>>
>>> Hi,
>>>
>>>>> 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.
>>> Thanks for your responses. The issue described in the forum post link
>>> you sent sounds like the same as mine.
>>>
>>> It happened again yesterday, but today all was fine. So I'm still not
>>> sure what's going on.
>> My mother's MythTV box had it yesterday, but mine has been fine since
>> I rebooted it. I am keeping an eye on them to see if it will happen
>> again. As best I can tell from the logs, the problem happens when the
>> scheduler runs, and after that the scheduler never works again, so
>> there are no scheduled recordings. This feels like a new MythTV bug,
>> so someone should create a bug report for the developers to have a
>> look at it.
>> _______________________________________________
>
>This is possibly related to a new version of mysql, see
>https://forum.mythtv.org/viewtopic.php?f=36&t=4453#p21895
>
>Perhaps a reboot after the database upgrade would fix it?
>
>Here are the changes to fixes/31 since April 1st. There does not seem to
>be anything database or scheduler related:
>
>* f8c59ee69d 2021/05/17 Stuart Auchterlonie : Revert "V4LChannel: Remove
>unneeded definitions" - Broke debian-stretch and centos7builds
>* fe5a6243ce 2021/05/17 Stuart Auchterlonie : Revert "Use system
>videodev2.h" - Broke debian-stretch and centos7 builds
>* 9b74773e3c 2021/05/17 Gary Buhrmaster : Use system videodev2.h
>* bcc01811ca 2021/05/17 Gary Buhrmaster : V4LChannel: Remove unneeded
>definitions
>* 200e3f4757 2021/05/17 Klaas de Waal : Update changed streams on PMT
>update
>* f7de8cea58 2021/05/06 Peter Bennett : tmdb3 lookup: Prevent exception
>when there are no posters.
>* b2ed400037 2021/05/01 Klaas de Waal : Update file size before skip
>forward
>* 05c16580e1 2021/04/19 Peter Bennett : tmdb3tv: Prevent exception when
>non-existent season is requested.
>* c02c6fc0b3 2021/04/18 kmdewaal : Merge pull request #356 from
>kt--/fix_ssa_subs_karaoke_broken
>|\
>| * d4997f4629 2021/04/18 kingsley : Increase cut-off for subtitle
>buffer clear, too small for SSA karaoke subs
>|/
>* 563a05b7a8 2021/04/01 Klaas de Waal : Show "Use FFmpeg's original
>MPEG-TS demuxer" option

If it is a problem in the database client or server, then the same
problem must have been put into both MySQL and MariaDB. Which is
looking likely as that forum thread seems to match what I am seeing
happening, and matches the theory that the database connection is
being lost somehow. But I thought that MythTV was able to cope with
the database connection going away, because when MySQL or MariaDB gets
upgraded, that happens with mythbackend still running, and it does not
seem to notice unless it was actually doing a database operation at
the time.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Recordings not working [ In reply to ]
On Sat, May 22, 2021 at 5:37 PM Stephen Worthington
<stephen_agent@jsw.gen.nz> wrote:
> ... But I thought that MythTV was able to cope with
> the database connection going away

There is code to (attempt to) reconnect.

As I recall it depends on the Qt Sql api
to properly represent a lost connection(1).

In addition to checking other upgrades
that may have occurred, one should
probably look to see if there was a
recent Qt upgrade in ubuntu.

One may need to turn up the database
logging to do more extensive debugging,
but that can be rather intense.




(1) FWIW, I think the MythTV code should
probably check for both mysql error code
2006 *and* 2013.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Recordings not working [ In reply to ]
On 5/22/21 1:06 PM, Gary Buhrmaster wrote:
> On Sat, May 22, 2021 at 5:37 PM Stephen Worthington
> <stephen_agent@jsw.gen.nz> wrote:
>> ... But I thought that MythTV was able to cope with
>> the database connection going away
>
> There is code to (attempt to) reconnect.
>
> As I recall it depends on the Qt Sql api
> to properly represent a lost connection(1).
>
> In addition to checking other upgrades
> that may have occurred, one should
> probably look to see if there was a
> recent Qt upgrade in ubuntu.
>
> One may need to turn up the database
> logging to do more extensive debugging,
> but that can be rather intense.
>
>
>
>
> (1) FWIW, I think the MythTV code should
> probably check for both mysql error code
> 2006 *and* 2013.

I think we're still data gathering, I put a summary here:

https://forum.mythtv.org/viewtopic.php?f=36&t=4453&p=21937#p21937

Need some missing information, but so far, only Ubuntu 20.04 is reporting.

--
Bill
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Recordings not working [ In reply to ]
On 22/05/2021 19:23, Bill Meek wrote:
> On 5/22/21 1:06 PM, Gary Buhrmaster wrote:
>> On Sat, May 22, 2021 at 5:37 PM Stephen Worthington
>> <stephen_agent@jsw.gen.nz> wrote:
>>> ... But I thought that MythTV was able to cope with
>>> the database connection going away
>>
>> There is code to (attempt to) reconnect.
>>
>> As I recall it depends on the Qt Sql api
>> to properly represent a lost connection(1).
>>
>> In addition to checking other upgrades
>> that may have occurred, one should
>> probably look to see if there was a
>> recent Qt upgrade in ubuntu.
>>
>> One may need to turn up the database
>> logging to do more extensive debugging,
>> but that can be rather intense.
>>
>>
>>
>>
>> (1) FWIW, I think the MythTV code should
>> probably check for both mysql error code
>> 2006 *and* 2013.
>
> I think we're still data gathering, I put a summary here:
>
> https://forum.mythtv.org/viewtopic.php?f=36&t=4453&p=21937#p21937
>
> Need some missing information, but so far, only Ubuntu 20.04 is reporting.
>
Can we say for certain yet that this is specifically a Ubuntu thing or is it likely to be more general?

I am running Debian Buster/Mariadb and was contemplating upgrading from v30 to v31 before all this
began. If it is believed to be just Ubuntu can I proceed without concern?

--

Mike Perkins

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Recordings not working [ In reply to ]
On Sat, May 22, 2021 at 10:03 PM Mike Perkins
<mikep@randomtraveller.org.uk> wrote:

> Can we say for certain yet that this is specifically a Ubuntu thing or is it likely to be more general?

Until the root cause has been identified,
"we" do not know anything for sure, but
so far, all the systems that have reported
their OS version/level have stated they
were ubuntu 20.04 (9 out of 11 reports
were ubuntu 20.04, and there are 2 that
have not specified their OS version/level).

While not conclusive, that may be
suggestive, but it should be noted that
according to smolt, ubuntu is also the
most reported OS running MythTV, so
a higher number of reports should not
be unexpected for ubuntu.

All I can add is that I have not seen
these issues, and I am running Fedora
34, running the master branch with
a mariadb database.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Recordings not working [ In reply to ]
On Sat, 22 May 2021 13:23:59 -0500, you wrote:

>On 5/22/21 1:06 PM, Gary Buhrmaster wrote:
>> On Sat, May 22, 2021 at 5:37 PM Stephen Worthington
>> <stephen_agent@jsw.gen.nz> wrote:
>>> ... But I thought that MythTV was able to cope with
>>> the database connection going away
>>
>> There is code to (attempt to) reconnect.
>>
>> As I recall it depends on the Qt Sql api
>> to properly represent a lost connection(1).
>>
>> In addition to checking other upgrades
>> that may have occurred, one should
>> probably look to see if there was a
>> recent Qt upgrade in ubuntu.
>>
>> One may need to turn up the database
>> logging to do more extensive debugging,
>> but that can be rather intense.
>>
>>
>>
>>
>> (1) FWIW, I think the MythTV code should
>> probably check for both mysql error code
>> 2006 *and* 2013.
>
>I think we're still data gathering, I put a summary here:
>
> https://forum.mythtv.org/viewtopic.php?f=36&t=4453&p=21937#p21937
>
>Need some missing information, but so far, only Ubuntu 20.04 is reporting.

My two affected systems are Ubuntu 20.04 and MariaDB 10.3.29.

I have put together a possible workaround of running mythutil
--resched every hour to keep the database connection alive. If anyone
would like to try this, I have put the files on my web server:

http://www.jsw.gen.nz/mythtv/mythtv-resched.service
http://www.jsw.gen.nz/mythtv/mythtv-resched.timer

On Ubuntu, this script will install the workaround:

sudo su
cd /etc/systemd/system
wget http://www.jsw.gen.nz/mythtv/mythtv-resched.service
wget http://www.jsw.gen.nz/mythtv/mythtv-resched.timer
chmod u=rw,og= mythtv-resched.*
systemctl daemon-reload
systemctl enable mythtv-resched.timer
systemctl start mythtv-resched.timer
systemctl start mythtv-resched.service
systemctl status mythtv-resched.service
exit

The output of the systemctl status command should look like this if it
is working correctly:

root@mypvr:~# systemctl status mythtv-resched.service
? mythtv-resched.service - MythTV reschedule service.
Loaded: loaded (/etc/systemd/system/mythtv-resched.service;
disabled; vendor preset: enabled)
Active: inactive (dead) since Sun 2021-05-23 19:17:23 NZST; 45min
ago
TriggeredBy: ? mythtv-resched.timer
Process: 28843 ExecStart=/usr/bin/mythutil --resched (code=exited,
status=0/SUCCESS)
Main PID: 28843 (code=exited, status=0/SUCCESS)

May 23 19:17:23 mypvr mythutil[28843]: 2021-05-23 19:17:23.589545 I
PowerDBus: Added UPower.Device
'/org/freedesktop/UPower/devices/mouse_hidpp_battery_1'
May 23 19:17:23 mypvr mythutil[28843]: 2021-05-23 19:17:23.590115 I
Power: On AC power
May 23 19:17:23 mypvr mythutil[28843]: 2021-05-23 19:17:23.592257 I
PowerDBus: Added UPower.Device
'/org/freedesktop/UPower/devices/keyboard_hidpp_battery_0'
May 23 19:17:23 mypvr mythutil[28843]: 2021-05-23 19:17:23.628459 I
Power: Supported actions: None
May 23 19:17:23 mypvr mythutil[28843]: 2021-05-23 19:17:23.631485 I
MythCoreContext::ConnectCommandSocket(): Connecting to backend server:
10.0.2.4:6543 (try 1 of 1)
May 23 19:17:23 mypvr mythutil[28843]: 2021-05-23 19:17:23.632794 I
MythCoreContext::CheckProtoVersion(): Using protocol version 91
BuzzOff
May 23 19:17:23 mypvr mythutil[28843]: 2021-05-23 19:17:23.641151 I
Reschedule command sent to master
May 23 19:17:23 mypvr mythutil[28843]: 2021-05-23 19:17:23.641176 I
PowerDBus: Closing interfaces
May 23 19:17:23 mypvr mythutil[28843]: 2021-05-23 19:17:23.642648 I
Exiting
May 23 19:17:23 mypvr systemd[1]: mythtv-resched.service: Succeeded.


I am also hoping to have enough time tonight to set up a virtual
machine to test this. My plan is to take a copy of my existing Ubuntu
20.04 VM which has not been updated for months, and then try updating
to the latest v31-fixes but put the MariaDB packages on hold. There
are no recordings scheduled in the VM, so the problem should show up
overnight if it is going to. If it does not, then I can try updating
the MariaDB packages and see if it happens then. And possibly also
try with the older v31-fixes version but updated MariaDB packages.

So what debug output should I be running to get the best advantage
from these tests? Full database at loglevel debug?
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Recordings not working [ In reply to ]
On 23/05/2021 10:11, Stephen Worthington wrote:
> I have put together a possible workaround of running mythutil
> --resched every hour to keep the database connection alive.

1. I didn't mention earlier that I'm also on Ubuntu 20.04 -- I am. With
mysql rather than mariadb.

2. When the issue occurs, running mythutil --resched does NOT fix it for
me (I tried that on an earlier occasion). No clue though whether
regularly running it might /prevent/ the issue.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Recordings not working [ In reply to ]
On 5/23/21 8:27 AM, Jan Ceuleers wrote:
> On 23/05/2021 10:11, Stephen Worthington wrote:
>> I have put together a possible workaround of running mythutil
>> --resched every hour to keep the database connection alive.
> 1. I didn't mention earlier that I'm also on Ubuntu 20.04 -- I am. With
> mysql rather than mariadb.
>
> 2. When the issue occurs, running mythutil --resched does NOT fix it for
> me (I tried that on an earlier occasion). No clue though whether
> regularly running it might /prevent/ the issue.

Does everybody get the series of "Error preparing query" messages seen
by the original poster? I am on 20.04, mysql-server
8.0.23-0ubuntu0.20.04.1.  I checked my logs and have no messages like that.

Peter

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Recordings not working [ In reply to ]
>
> Does everybody get the series of "Error preparing query" messages seen
> by the original poster? I am on 20.04, mysql-server
> 8.0.23-0ubuntu0.20.04.1. I checked my logs and have no messages like that.
>

I am getting the error messages. Running master
(v32.0~master.202105182058.034eb86a3f~ubuntu20.04.1) on Ubuntu 20.04 with
mysql 8.0.25-0ubuntu0.20.04.1
Re: Recordings not working [ In reply to ]
On Sun, 23 May 2021 09:58:50 -0400, you wrote:

>>
>> Does everybody get the series of "Error preparing query" messages seen
>> by the original poster? I am on 20.04, mysql-server
>> 8.0.23-0ubuntu0.20.04.1. I checked my logs and have no messages like that.
>>
>
>I am getting the error messages. Running master
>(v32.0~master.202105182058.034eb86a3f~ubuntu20.04.1) on Ubuntu 20.04 with
>mysql 8.0.25-0ubuntu0.20.04.1

Yes, I get the "Error preparing query" messages on both MythTV boxes
(Ubuntu 20.04, MariaDB 10.2.29, v31-fixes).
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Recordings not working [ In reply to ]
On 23/05/2021 15:32, Peter Bennett wrote:
> Does everybody get the series of "Error preparing query" messages seen
> by the original poster?

I do get such errors, yes.

I see examples in which the backend subsequently recovers ("(Reconnect)
MySQL reconnected successfully") and also examples where it doesn't.

I opened https://github.com/MythTV/mythtv/issues/359 and attached my
logs to it.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Recordings not working [ In reply to ]
On Sun, May 23, 2021 at 1:32 PM Peter Bennett <pb.mythtv@gmail.com> wrote:

> Does everybody get the series of "Error preparing query" messages seen
> by the original poster? I am on 20.04, mysql-server
> 8.0.23-0ubuntu0.20.04.1. I checked my logs and have no messages like that.

Without any proof, I am suspicious of
the recent ubuntu libmysqlclient21 upgrade
in ubuntu (to the ...8.0.25 version) which
would have been made available to
users around ten days ago.

Someone impacted should probably try
to downgrade to the previous version
of libmysqlclient21 and see if the problem
goes away.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Recordings not working [ In reply to ]
On 23/05/2021 18:16, Gary Buhrmaster wrote:
> Without any proof, I am suspicious of
> the recent ubuntu libmysqlclient21 upgrade
> in ubuntu (to the ...8.0.25 version) which
> would have been made available to
> users around ten days ago.

My understanding is that there have been reports from users who are
using MariaDB rather than MySQL. Is it plausible that the same bug might
have been introduced into both code bases at the same time?

Still, I see in the MySQL release notes for version 8.0.24 [1] that
changes have been made to how the server deals with connection timeouts
(i.e. cases where an open connection has not been used for a time
exceeding the wait_timeout system variable. I quote:

---begin quote---
Previously, if a client did not use the connection to the server within
the period specified by the wait_timeout system variable and the server
closed the connection, the client received no notification of the
reason. Typically, the client would see Lost connection to MySQL server
during query (CR_SERVER_LOST) or MySQL server has gone away
(CR_SERVER_GONE_ERROR).

In such cases, the server now writes the reason to the connection before
closing it, and client receives a more informative error message, The
client was disconnected by the server because of inactivity. See
wait_timeout and interactive_timeout for configuring this behavior.
(ER_CLIENT_INTERACTION_TIMEOUT).

The previous behavior still applies for client connections to older
servers and connections to the server by older clients.
---end quote---

[1]: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-24.html

> Someone impacted should probably try
> to downgrade to the previous version
> of libmysqlclient21 and see if the problem
> goes away.

Happy to do that, but it would be difficult to be certain that the
problem has gone away.

_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Recordings not working [ In reply to ]
On 23/05/2021 18:13, Jan Ceuleers wrote:

> ---begin quote---
> Previously, if a client did not use the connection to the server within
> the period specified by the wait_timeout system variable and the server
> closed the connection, the client received no notification of the
> reason. Typically, the client would see Lost connection to MySQL server
> during query (CR_SERVER_LOST) or MySQL server has gone away
> (CR_SERVER_GONE_ERROR).
>
> In such cases, the server now writes the reason to the connection before
> closing it, and client receives a more informative error message, The
> client was disconnected by the server because of inactivity. See
> wait_timeout and interactive_timeout for configuring this behavior.
> (ER_CLIENT_INTERACTION_TIMEOUT).
>
> The previous behavior still applies for client connections to older
> servers and connections to the server by older clients.
> ---end quote---
>
> [1]: https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-24.html
>

We do handle the case if we get CR_SERVER_GONE_ERROR (2006) but not the
case of CR_SERVER_LOST (2013) so like Gary said earlier maybe we just
need to handle that case here :-

https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythbase/mythdbcon.cpp#L645


Paul H.


_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Recordings not working [ In reply to ]
On Sun, May 23, 2021 at 4:16 PM Gary Buhrmaster
<gary.buhrmaster@gmail.com> wrote:
>
> On Sun, May 23, 2021 at 1:32 PM Peter Bennett <pb.mythtv@gmail.com> wrote:
>
> > Does everybody get the series of "Error preparing query" messages seen
> > by the original poster? I am on 20.04, mysql-server
> > 8.0.23-0ubuntu0.20.04.1. I checked my logs and have no messages like that.
>
> Without any proof, I am suspicious of
> the recent ubuntu libmysqlclient21 upgrade
> in ubuntu (to the ...8.0.25 version) which
> would have been made available to
> users around ten days ago.

Looking at the git log between the previous
...8.0.23 and the current ...8.0.25 version,
there appears to be at least one place where
the previous 2006 error code (gone) has
been replaced with a 2013 error code (lost),
although I can't easily determine if it is
propagated elsewhere. While, in theory,
2013 should occur only when a long
request times out, there could be cases
where one gets it with other timeouts,
and perhaps mythtv should handle both
cases with an attempted reconnect.

Perhaps someone wants to try to add
both cases to mythdbcon.cpp. 100%
untested (not compile tested, not installed,
and not run(*)) proposal would be something
like:

-----

diff --git a/mythtv/libs/libmythbase/mythdbcon.cpp
b/mythtv/libs/libmythbase/mythdbcon.cpp
index 5e933322e7..610dc8b996 100644
--- a/mythtv/libs/libmythbase/mythdbcon.cpp
+++ b/mythtv/libs/libmythbase/mythdbcon.cpp
@@ -642,7 +642,8 @@ bool MSqlQuery::exec()
// Close and reopen the database connection and retry the query if it
// connects again
if (!result
- && QSqlQuery::lastError().nativeErrorCode() == "2006"
+ && ((QSqlQuery::lastError().nativeErrorCode() == "2006") ||
+ (QSqlQuery::lastError().nativeErrorCode() == "2013" ))
&& Reconnect())
result = QSqlQuery::exec();

@@ -760,7 +761,8 @@ bool MSqlQuery::exec(const QString &query)
// Close and reopen the database connection and retry the query if it
// connects again
if (!result
- && QSqlQuery::lastError().nativeErrorCode() == "2006"
+ && ((QSqlQuery::lastError().nativeErrorCode() == "2006") ||
+ (QSqlQuery::lastError().nativeErrorCode() == "2013" ))
&& Reconnect())
result = QSqlQuery::exec(query);

@@ -863,7 +865,8 @@ bool MSqlQuery::prepare(const QString& query)
// Close and reopen the database connection and retry the query if it
// connects again
if (!ok
- && QSqlQuery::lastError().nativeErrorCode() == "2006"
+ && ((QSqlQuery::lastError().nativeErrorCode() == "2006") ||
+ (QSqlQuery::lastError().nativeErrorCode() == "2013" ))
&& Reconnect())
ok = true;

-----


(*) I believe of most distros, primarily canonical, through
their "partnership" with oracle (i.e. almost certainly a
payment) defaults to using the mysql rather than mariadb.
So I do not have any mysql derived libraries installed.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Recordings not working [ In reply to ]
On Sun, May 23, 2021 at 5:53 PM Gary Buhrmaster
<gary.buhrmaster@gmail.com> wrote:

> Perhaps someone wants to try to add ...

Or, alternatively, start by adding in additional
debugging logging in that area to report
what is really going on to know if adding a
2013 is the right thing to do, or something
far more interesting is happening.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Recordings not working [ In reply to ]
On Sun, 23 May 2021 19:13:21 +0200, you wrote:

>On 23/05/2021 18:16, Gary Buhrmaster wrote:
>> Without any proof, I am suspicious of
>> the recent ubuntu libmysqlclient21 upgrade
>> in ubuntu (to the ...8.0.25 version) which
>> would have been made available to
>> users around ten days ago.
>
>My understanding is that there have been reports from users who are
>using MariaDB rather than MySQL. Is it plausible that the same bug might
>have been introduced into both code bases at the same time?

In Ubuntu 20.04, the exact same libmysqlclient21 library is used by
both MySQL and MariaDB for client access to the database.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Recordings not working [ In reply to ]
On Sun, May 23, 2021 at 5:15 PM Jan Ceuleers <jan.ceuleers@gmail.com> wrote:
>
> On 23/05/2021 18:16, Gary Buhrmaster wrote:

> > Someone impacted should probably try
> > to downgrade to the previous version
> > of libmysqlclient21 and see if the problem
> > goes away.
>
> Happy to do that, but it would be difficult to be certain that the
> problem has gone away.

For testing purposes, one could try to
set the database timeout to something
like 5 minutes (rather than increasing
it to bypass the issue), and that would
presumably show the problem rather
quickly, which should help make
identifying the root cause much more
viable in "near" time (rather than 8
hours later).
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org

1 2  View All