Automatic shutdown no longer working

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
Flowers
Newcomer
Posts: 4
Joined: Thu Apr 09, 2020 4:42 pm
Great Britain

Automatic shutdown no longer working

Post by Flowers » Sun Jun 28, 2020 11:51 am

I am fairly new to MythTV, but have had automatic shutdown working for several weeks now. However I have noticed that it hasn't shutdown the last few days. Looking at the backend log, the relevant messages seem to be 'Blocking shutdown because of a connected client'. I am running the front and backend on an Ubuntu 18.04 PC. I was not logged in at the time of the messages. How can I find out why it thinks there is a connected client?

User avatar
pgbennett
Developer
Posts: 368
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Automatic shutdown no longer working

Post by pgbennett » Sun Jun 28, 2020 4:04 pm

The connected client could be a stuck job, for example metadata lookup. See if there are any other myth programs running. (ps -ef | grep myth). The metadata lookup does sometimes hang for a long time when it fails to get a response from the lookup site.

You can disable metadata lookup by turning it off in the recording rule. I have disabled it for all recordings because of this problem.

Flowers
Newcomer
Posts: 4
Joined: Thu Apr 09, 2020 4:42 pm
Great Britain

Re: Automatic shutdown no longer working

Post by Flowers » Sun Jun 28, 2020 9:29 pm

Thanks. I seem to have 2 instances of mythcommflag running since yesterday, the second appears to have been started by the first. Is that normal?

User avatar
pgbennett
Developer
Posts: 368
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Automatic shutdown no longer working

Post by pgbennett » Mon Jun 29, 2020 3:48 pm

I expect mythcommflag will take a long time if you do not have a powerful system. I recommend disabling mythcommflag in your recording rules.

Flowers
Newcomer
Posts: 4
Joined: Thu Apr 09, 2020 4:42 pm
Great Britain

Re: Automatic shutdown no longer working

Post by Flowers » Mon Jun 29, 2020 6:09 pm

I tried restarting the PC, but the mythcommflag processes seem to have got restarted because they were in a job queue. This is part of the backend log just after the restart:

Code: Select all

Jun 29 06:41:53 pam-OptiPlex-3010 mythbackend: mythbackend[1133]: I Metadata_728 jobqueue.cpp:2218 (DoMetadataLookupThread) JobQueue: Metadata Lookup Starting for NCIS recorded from channel 10039 at 2020-06-27T15:05:00Z
Jun 29 06:41:55 pam-OptiPlex-3010 mythbackend: mythbackend[1133]: I ProcessRequest mainserver.cpp:1780 (HandleAnnounce) MainServer: MainServer::ANN Playback
Jun 29 06:41:55 pam-OptiPlex-3010 mythbackend: mythbackend[1133]: I ProcessRequest mainserver.cpp:1785 (HandleAnnounce) MainServer: adding: pam-OptiPlex-3010(558b3147bc10) as a client (events: 0)
Jun 29 06:41:55 pam-OptiPlex-3010 mythbackend: mythbackend[1133]: I ProcessRequest mainserver.cpp:1780 (HandleAnnounce) MainServer: MainServer::ANN Monitor
Jun 29 06:41:55 pam-OptiPlex-3010 mythbackend: mythbackend[1133]: I ProcessRequest mainserver.cpp:1785 (HandleAnnounce) MainServer: adding: pam-OptiPlex-3010(558b314c1450) as a client (events: 1)
Jun 29 06:41:58 pam-OptiPlex-3010 mythbackend: mythbackend[1133]: I MythSocketThread(62) mainserver.cpp:7930 (connectionClosed) Playback sock(558b3147bc10) 'pam-OptiPlex-3010' disconnected
Jun 29 06:41:58 pam-OptiPlex-3010 mythbackend: mythbackend[1133]: I MythSocketThread(64) mainserver.cpp:7930 (connectionClosed) Monitor sock(558b314c1450) 'pam-OptiPlex-3010' disconnected
Jun 29 06:42:58 pam-OptiPlex-3010 mythbackend: mythbackend[1133]: I Commflag_729 jobqueue.cpp:2343 (DoFlagCommercialsThread) JobQueue: Commercial Detection Starting for NCIS recorded from channel 10039 at 2020-06-27T14:18:00Z
Why are these 2 recordings different from other recordings done that day and the day after? Is there a way to empty the queue? As you suggested metadata is also mentioned, but there is no job shown for this by ps.

User avatar
pgbennett
Developer
Posts: 368
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Automatic shutdown no longer working

Post by pgbennett » Mon Jun 29, 2020 7:38 pm

The option of running commflag is set on the recording rule, or the job can be manually started from the recording list.

To find what jobs are queued, got into frontend, information center, system status, jobqueue.

To cancel a job go into the frontend, watch recordings, select a recording, press menu key, select job options. If a job is running or in the queue for that recording, select the stop option to cancel it.

Flowers
Newcomer
Posts: 4
Joined: Thu Apr 09, 2020 4:42 pm
Great Britain

Re: Automatic shutdown no longer working

Post by Flowers » Wed Jul 01, 2020 1:39 pm

Thanks for your help. It shutdown last night.

Post Reply