[mythtv-users] mythfilldatabase stops running after a few days
Kevin Johnson
iitywygms at gmail.com
Thu Jul 21 21:01:50 UTC 2022
On Thu, Jul 21, 2022 at 4:24 PM Bill Meek <keemllib at gmail.com> wrote:
> On 7/21/22 14:53, Kevin Johnson wrote:
> >
> >
> > On Thu, Jul 21, 2022 at 1:09 PM Stephen Worthington <
> stephen_agent at jsw.gen.nz <mailto:stephen_agent at jsw.gen.nz>> wrote:
> >
> > On Thu, 21 Jul 2022 09:15:34 -0400, you wrote:
> >
> > >On Wed, Jul 20, 2022 at 11:57 PM Bill Meek <keemllib at gmail.com
> <mailto:keemllib at gmail.com>> wrote:
> > >
> > >> On 7/19/22 21:02, Kevin Johnson wrote:
> > >>
> > >> ...
> > >>
> > >> > Jul 19 19:16:11 hemlock mythbackend: mythbackend[139181]: I
> CoreContext
> > >> housekeeper.cpp:663 (RegisterTask) Registering HouseKeeperTask
> 'MythFillDB'.
> > >> >
> > >> > It is possible that mythfilldatabase does not start after the
> backend is
> > >> shutdown then restarted. I know a few days ago I had a power
> outage.
> > >> > I think that was July 16. Possibly.
> > >> >
> > >> > I could do a reboot and then see if the issue occurs again.
> > >>
> > >> OK, the problem is the missing entry in housekeeping (I removed
> mine and
> > >> caused the failure.)
> > >>
> > >> In the following, each SQL command is all on one line, in case
> your email
> > >> client
> > >> folds them.
> > >>
> > >> Do this:
> > >>
> > >> SELECT * FROM housekeeping WHERE tag='MythFillDB';
> > >>
> > >> If there are still no matching entries, then do this:
> > >>
> > >> INSERT INTO housekeeping (tag,lastrun,lastsuccess)
> > >> VALUES('MythFillDB',TIMESTAMP('2022-07-21
> 03:01:01'),TIMESTAMP('2022-07-21
> > >> 03:01:01')) LIMIT 1;
> > >>
> > >> If (somehow) an entry got added and the timestamps don't make
> any sends,
> > >> then do this:
> > >>
> > >> UPDATE housekeeping SET lastrun=TIMESTAMP('2022-07-21
> > >> 03:02:01'),lastsuccess=TIMESTAMP('2022-07-21 03:02:01') WHERE
> > >> tag='MythFillDB' LIMIT 1;
> > >>
> > >> --
> > >> Bill
> > >>
> > >> Without knowing exactly what I am doing so I stopped here.
> > >
> > >mysql> SELECT * FROM housekeeping WHERE tag='MythFillDB';
> > >ERROR 1046 (3D000): No database selected
> > >
> > >Did I miss a step?
> >
> > Yes, you need to select the database. On the mysql command line add
> > the parameter "mythconverg", or at the "mysql>" prompt, run the
> > command:
> >
> > use mythconverg;
> >
> > mysql> INSERT INTO housekeeping (tag,lastrun,lastsuccess)
> VALUES('MythFillDB',TIMESTAMP('2022-07-21 03:01:01'),TIMESTAMP('2022-07-21
> 03:01:01'))
> > LIMIT 1;
> >
> > ERROR 1064 (42000): You have an error in your SQL syntax; check the
> manual that corresponds to your MySQL server version for the right syntax
> to
> > use near 'LIMIT 1' at line 1
> >
> > This is sql version.
> > Ver 8.0.29-0ubuntu0.20.04.3 for Linux on x86_64 ((Ubuntu))
>
>
> Sorry, I tested it using MariaDB. The LIMIT keyword isn't valid in MySQL
> v8 (maybe even earlier).
>
> This works on my MySQL v8:
>
> INSERT INTO housekeeping (tag,lastrun,lastsuccess)
> VALUES('MythFillDB',TIMESTAMP('2022-07-21 03:01:01'),TIMESTAMP('2022-07-21
> 03:01:01'));
>
>
> I'm probably going to ask you for full logs if this doesn't help
> as there's more going on in the housekeeper code.
>
> Don't apologize. What you and everyone else on this mailing list do for
us is awesome.
mysql> INSERT INTO housekeeping (tag,lastrun,lastsuccess)
VALUES('MythFillDB',TIMESTAMP('2022-07-21 03:01:01'),TIMESTAMP('2022-07-21
03:01:01'));
Query OK, 1 row affected (0.03 sec)
mysql> SELECT * FROM housekeeping WHERE tag='MythFillDB';
+------------+----------+---------------------+---------------------+
| tag | hostname | lastrun | lastsuccess |
+------------+----------+---------------------+---------------------+
| MythFillDB | NULL | 2022-07-21 03:01:01 | 2022-07-21 03:01:01 |
+------------+----------+---------------------+---------------------+
1 row in set (0.00 sec)
This is where it's at now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20220721/b10f0be6/attachment.htm>
More information about the mythtv-users
mailing list