LinHES Forums
http://forum.linhes.org/

Maintenance did NOT complete successfully [SOLVED]
http://forum.linhes.org/viewtopic.php?f=21&t=24277
Page 1 of 1

Author:  cahlfors [ Wed Feb 10, 2016 12:54 pm ]
Post subject:  Maintenance did NOT complete successfully [SOLVED]

It appears that the maintenance script does not complete after some upgrade I made in the past. I get the following in the nn_myth_mtc.log:
Code:
2016-02-10T00:07:02.791407+01:00 fido myth_mtc:
2016-02-10T00:07:02.791440+01:00 fido myth_mtc: 2016-02-10 00:07
2016-02-10T00:07:02.830919+01:00 fido myth_mtc: Checking system idle...
2016-02-10T00:07:02.975885+01:00 fido myth_mtc:     Checking if the schema is locked...
2016-02-10T00:07:02.976348+01:00 fido myth_mtc:         The schema is NOT locked.
2016-02-10T00:07:02.976387+01:00 fido myth_mtc:     Checking if programs are in use...
2016-02-10T00:07:02.976614+01:00 fido myth_mtc:         Programs are in use.
2016-02-10T00:07:02.976627+01:00 fido myth_mtc: System is busy.
2016-02-10T00:07:02.994195+01:00 fido myth_mtc:
2016-02-10T00:07:02.994214+01:00 fido myth_mtc: 2016-02-10 00:07 Waiting 10 minutes before trying again.

The same gets repeated over and over. Even in the middle of the night, at times I *know* the system was idle.

Ideas?

Thanks,
/Chris

Author:  brfransen [ Wed Feb 10, 2016 1:53 pm ]
Post subject:  Re: Maintenance did NOT complete successfully

I have found that if mythcommflag has crashed or get hung up it will leave an entry in the Myth database. The maintenance script will try to fix this by deleting entries that haven't been updated in some time. To see what is in that db table:
Code:
mysql -umythtv -pmythtv mythconverg -e 'select * from inuseprograms;'

Author:  cahlfors [ Thu Feb 11, 2016 7:45 pm ]
Post subject:  Re: Maintenance did NOT complete successfully

This is the output from the command:
Code:
Warning: Using a password on the command line interface can be insecure.
+--------+---------------------+----------+---------------------+----------+---------+-----------------------------------+
| chanid | starttime           | recusage | lastupdatetime      | hostname | rechost | recdir                            |
+--------+---------------------+----------+---------------------+----------+---------+-----------------------------------+
|   6510 | 2016-02-12 02:00:00 | jobqueue | 2016-02-12 02:02:03 | fido     | fido    | /data/storage/disk1/media/tv/live |
|   6510 | 2016-02-12 02:00:00 | recorder | 2016-02-12 02:15:01 | fido     | fido    | /data/storage/disk1/media/tv/live |
|   6510 | 2016-02-12 02:00:00 | flagger  | 2016-02-12 02:02:03 | fido     | fido    | /data/storage/disk1/media/tv/live |
|   2240 | 2015-10-03 07:00:00 | flagger  | 2016-02-12 02:06:58 | fido     | fido    | /data/storage/disk1/media/tv/live |
|   1004 | 2015-10-15 21:00:00 | flagger  | 2016-02-12 02:07:02 | fido     | fido    | /data/storage/disk1/media/tv/live |
+--------+---------------------+----------+---------------------+----------+---------+-----------------------------------+

Next step?

Thanks,
/Chris

Author:  brfransen [ Fri Feb 12, 2016 6:44 am ]
Post subject:  Re: Maintenance did NOT complete successfully

They all have recent update times so something is working with them. But the last 2 are older. See if you have any mythcommflag jobs running:
Code:
ps aux | grep mythcommflag
Then kill them if they don't show in the Backend Status Job Queue.

Author:  cahlfors [ Fri Feb 12, 2016 12:12 pm ]
Post subject:  Re: Maintenance did NOT complete successfully

They do show in the job queue, so I guess it has to be something different, then.

Thanks,
/Chris

Author:  brfransen [ Fri Feb 12, 2016 3:44 pm ]
Post subject:  Re: Maintenance did NOT complete successfully

Since they are showing in the Job Queue and they are in the inuseprograms that is without a doubt what is keeping the maintenance task from running. So you need to either cancel or requeue them. Once they complete they should clear from inuseprograms and then the maintenance task can complete.

Author:  cahlfors [ Fri Feb 12, 2016 4:42 pm ]
Post subject:  Re: Maintenance did NOT complete successfully

Finally I understand what you are getting at! :lol:
In the information center, I do have the option to stop one of them, but nothing happens - still running. The other was crashed and can be resubmitted, but it crashes again. What is the proper procedure to remove them? I guess just killing them will not fix the database entries which prevents maintenance from running?

Thanks,
/Chris

Author:  brfransen [ Sat Feb 13, 2016 12:28 pm ]
Post subject:  Re: Maintenance did NOT complete successfully

Killing the offending mythcommflag processes is what you want to do. Then the mythtv housekeeper should clean up the entries the next time it runs. The maintenance script will also clean the up if the lastupdated time is greater than 4 hours.

Author:  cahlfors [ Sun Feb 14, 2016 8:57 am ]
Post subject:  Re: Maintenance did NOT complete successfully

YES! They went away!
Now, there are of course other things that have started instead, but now there should be a fair chance to get maintenance running tonight!

Thank you very much brfransen!

/Chris

Author:  cahlfors [ Tue Feb 16, 2016 12:52 pm ]
Post subject:  Re: Maintenance did NOT complete successfully

myth_mtc is now green for the first time in a very long time!

Thanks again!

/Chris

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/