[mythtv-users] 2 recordings failed at the same time
stephen_agent at jsw.gen.nz
Mon Oct 26 12:11:49 UTC 2020
On Mon, 26 Oct 2020 06:56:09 -0400, you wrote:
>On 10/26/20 6:41 AM, Stephen Worthington wrote:
>> I do not think those permissions messages are a real problem. My
>> reading of them is that you are probably running mythbackend as
>> non-root user, so it does not have the right permissions to send power
>> control commands or to set program priorities. So I think those are
>> red herrings.
>> Using a slightly older version of mythfrontend should not be any
>> problem - all the protocols used to talk between MythTV programs are
>> only supposed to be changed with a major version, and they all have
>> protocol version information anyway.
>> There is not much detail in the log about the recording process, so it
>> is very difficult to tell what happened. I would recommend adding the
>> "-v record" option to the mythbackend command line to get it to log
>> about the recording process in future.
>My backend is started on boot by systemd and mythtv-backend.service
>contains in part:
>ExecStart=/usr/bin/mythbackend --quiet --syslog local7 $ADDITIONAL_ARGS
>So would I replace the "--quiet" with "-v record"??
No. That is set up the Ubuntu way, so command line arguments get put
in the /etc/mythtv/additional.args file so you do not need to mess
around with systemd. So your /etc/mythtv/additional.args file should
plus any other command line arguments that are already in that file.
The systemd "EnvironmentFile=" line tells systemd to read that file as
a set of environment variables. The - after the = tells systemd that
it is OK (not an error) if the file does not exist. The
$ADDITIONAL_ARGS on the end of the ExecStart line tells systemd that
the contents of the environment variable ADDITIONAL_ARGS is to be
substituted there, as in bash scripts.
The /etc/mythtv/additional.args file should have decent ownership and
permissions. I have mine as chown mythtv:mythtv and chmod ug=rw,o=r.
Once you have that set up, at a convenient time you can restart
mythbackend to have it run with the new command line settings:
sudo systemctl restart mythtv-backend
In the mean time you can tell the running copy of mythtbackend to add
the -v record option immediately:
mythbackend --setverbose record
Do not mistype commands like that one or you will wind up with a
second copy of mythbackend running in the background as it did not
find an option on the command line to tell it to just send a message
to the running copy and then shut down. If that happens, use "ps -ef
| grep mythbackend" to find the PID of the second copy and kill it
with "sudo kill <pid>" (twice if necessary). You know which copy is
which by its command line options.
In your mythtv-backend.service settings, there is "User=mythtv" which
confirms my suspicion that you are running mythbackend as a non-root
user, which is the normal way it is run.
More information about the mythtv-users