Page 1 of 1

Automatic shutdown no longer working

Posted: Sun Jun 28, 2020 11:51 am
by Flowers
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?

Re: Automatic shutdown no longer working

Posted: Sun Jun 28, 2020 4:04 pm
by pgbennett
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.

Re: Automatic shutdown no longer working

Posted: Sun Jun 28, 2020 9:29 pm
by Flowers
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?

Re: Automatic shutdown no longer working

Posted: Mon Jun 29, 2020 3:48 pm
by pgbennett
I expect mythcommflag will take a long time if you do not have a powerful system. I recommend disabling mythcommflag in your recording rules.

Re: Automatic shutdown no longer working

Posted: Mon Jun 29, 2020 6:09 pm
by Flowers
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.

Re: Automatic shutdown no longer working

Posted: Mon Jun 29, 2020 7:38 pm
by pgbennett
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.

Re: Automatic shutdown no longer working

Posted: Wed Jul 01, 2020 1:39 pm
by Flowers
Thanks for your help. It shutdown last night.