[solved]mythcommflag not working

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

Moderator: Forum Moderators

hedgehog52
Junior
Posts: 79
Joined: Fri Sep 04, 2015 6:08 pm
United States of America

[solved]mythcommflag not working

Post by hedgehog52 »

Subject says it all. Sort of. If I run mythcommflag manually, it works just fine. But when it's kicked off by mythfrontend, the little thingy circles for a bit and then quits much too early without accomplishing anything. I do have the box checked in mythtv-setup to run mythcommflag.

So, where do I start trying to figure this out? I don't have logging enabled, because I didn't understand the instructions. So that may be an issue. OTOH, I'm pretty sure that the install for earlier versions enabled logging, so...
Last edited by hedgehog52 on Thu May 04, 2023 5:42 pm, edited 1 time in total.
white_haired_uncle
Senior
Posts: 560
Joined: Thu Feb 23, 2023 8:55 pm
Location: Safe outside my gilded cage
United States of America

Re: mythcommflag not working

Post by white_haired_uncle »

hedgehog52 wrote:
Wed May 03, 2023 10:22 pm
Subject says it all. Sort of. If I run mythcommflag manually, it works just fine. But when it's kicked off by mythfrontend, the little thingy circles for a bit and then quits much too early without accomplishing anything. I do have the box checked in mythtv-setup to run mythcommflag.

So, where do I start trying to figure this out? I don't have logging enabled, because I didn't understand the instructions. So that may be an issue. OTOH, I'm pretty sure that the install for earlier versions enabled logging, so...
I'd start with getting logging set up. If you need help, that might be a thread of it's own. Either way, you'll want to explain what is it that you didn't understand.

Make sure to post your OS/version, and the mythtv version (always).

While logging is definitely the way to go, you might want to look at the job logs. Depending on your theme, that's something like Advanced>System Settings> Information Center.

What user does mythtv run as, and what user is trying to run the command manually (and how)?

There's a field in the database that tracks whether a recording has been commercial flagged (and depending on your theme, perhaps an icon like a scissors). I don't know what happens if you (and/or myth) try to run it again once it has succeeded.
hedgehog52
Junior
Posts: 79
Joined: Fri Sep 04, 2015 6:08 pm
United States of America

Re: mythcommflag not working

Post by hedgehog52 »

white_haired_uncle wrote:
Thu May 04, 2023 12:38 am
hedgehog52 wrote:
Wed May 03, 2023 10:22 pm
So, where do I start trying to figure this out? I don't have logging enabled, because I didn't understand the instructions.
I'd start with getting logging set up. If you need help, that might be a thread of it's own. Either way, you'll want to explain what is it that you didn't understand.
OK, after you respond to this, I'll open a new thread. Would I do that here or in the Linux section?
Make sure to post your OS/version, and the mythtv version (always).
Sorry. The OS is Linux, Debian 11 (bullseye). The mythtv version is "1:31.0+fixes20220227.git7e4ce1ba98-dmo0+deb11u1"
Also important is that I am now 70 years old, and I am autistic. I spent a long career as a computer programmer, but I'm just not able to keep track of all this the way I used to do.
While logging is definitely the way to go, you might want to look at the job logs. Depending on your theme, that's something like Advanced>System Settings> Information Center.
I think we're not speaking the same language. I have no idea where Advanced->System Settings->Information Center is. Maybe that's a Windows thing?
What user does mythtv run as, and what user is trying to run the command manually (and how)?
It runs as "mythtv". The user "bob" (me) can run mythcommflag just fine. If I su to mythtv, I can run it fine as that user, as well.
There's a field in the database that tracks whether a recording has been commercial flagged (and depending on your theme, perhaps an icon like a scissors). I don't know what happens if you (and/or myth) try to run it again once it has succeeded.
The scissors is displayed in mythfrontend if I run mythcommflag from the command line. Otherwise it is not displayed.
white_haired_uncle
Senior
Posts: 560
Joined: Thu Feb 23, 2023 8:55 pm
Location: Safe outside my gilded cage
United States of America

Re: mythcommflag not working

Post by white_haired_uncle »

In Mythcenter-wide, from the main screen (the one with Watch Recordings, Watch Videos, etc) Information Center is either under Advanced or System Status, depending on how you have it configured. If you use another theme it may look a little different.

I'd probably post logging questions here, unless I knew they were Linux specific (like if your issue is with setting up syslog).
hedgehog52
Junior
Posts: 79
Joined: Fri Sep 04, 2015 6:08 pm
United States of America

Re: mythcommflag not working

Post by hedgehog52 »

white_haired_uncle wrote:
Thu May 04, 2023 2:30 am
In Mythcenter-wide, from the main screen (the one with Watch Recordings, Watch Videos, etc) Information Center is either under Advanced or System Status, depending on how you have it configured. If you use another theme it may look a little different.

I'd probably post logging questions here, unless I knew they were Linux specific (like if your issue is with setting up syslog).
The only thing even close to what you're talking about is "Job Queue". I don't see anything about logging. I am using the Terra 1.4 theme.
white_haired_uncle
Senior
Posts: 560
Joined: Thu Feb 23, 2023 8:55 pm
Location: Safe outside my gilded cage
United States of America

Re: mythcommflag not working

Post by white_haired_uncle »

That's it. Should see a small amount of info in there.
hedgehog52
Junior
Posts: 79
Joined: Fri Sep 04, 2015 6:08 pm
United States of America

Re: mythcommflag not working

Post by hedgehog52 »

white_haired_uncle wrote:
Thu May 04, 2023 3:09 am
That's it. Should see a small amount of info in there.
There doesn't seem to be anything useful. It's just a list of programs that are either in red with an exclamation point in a red ball in front, or blue with a blue ball in front. I clicked on one of the red ones and it asked me if I wanted to requeue the job, but it didn't tell me what the job is. Is it possible that the Terra theme isn't giving me the information you're expecting?
User avatar
bill6502
Developer
Posts: 2439
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: mythcommflag not working

Post by bill6502 »

@hedgehog52 can you post the output of these two commands please?

Code: Select all

ls -ld /var/log/mythtv
systemctl cat mythtv-backend.service
Looking to see where the service is logging and if user mythtv can write there.
hedgehog52
Junior
Posts: 79
Joined: Fri Sep 04, 2015 6:08 pm
United States of America

Re: mythcommflag not working

Post by hedgehog52 »

bill6502 wrote:
Thu May 04, 2023 3:40 am
@hedgehog52 can you post the output of these two commands please?

Code: Select all

ls -ld /var/log/mythtv
systemctl cat mythtv-backend.service
Looking to see where the service is logging and if user mythtv can write there.
Here you go. I gave you the contents as well. The MyScripts.log file is for debugging the iptv device I used for awhile.

Code: Select all

bob@musem:~$ ls -ld /var/log/mythtv
drwxrwsr-x 2 root mythtv 4096 Aug  5  2022 /var/log/mythtv
bob@musem:~$ ls -ld /var/log/mythtv/*
-rwxrwxrwx 1 root adm 29302 May  3 20:38 /var/log/mythtv/MyScripts.log
bob@musem:~$ systemctl cat mythtv-backend.service
# /lib/systemd/system/mythtv-backend.service
[Unit]
Description=MythTV Backend
Documentation=https://www.mythtv.org/wiki/Mythbackend
After=mysql.service network.target

[Service]
User=mythtv
Environment=HOME=/var/lib/mythtv
EnvironmentFile=-/etc/default/mythtv-backend
ExecStart=/usr/bin/mythbackend $EXTRA_ARGS
StartLimitBurst=10
StartLimitInterval=10m
Restart=on-failure
RestartSec=1

[Install]
WantedBy=multi-user.target
Hmm, the /etc/default/mythtv-backend contains the following. Looks like logging args and it's commented out. Know anything about it?

Code: Select all

# Append additional arguments
#EXTRA_ARGS="verbose all --syslog local6"
User avatar
bill6502
Developer
Posts: 2439
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: mythcommflag not working

Post by bill6502 »

You're right, I'd uncomment the line. Also, there should be two dashes before the word verbose.
Then restart the backend.

I don't use --syslog local6, so I don't know if a log file will be created or it it goes to the journal.
You can look at the journal with: journalctl -b --unit=mythtv.backend
hedgehog52
Junior
Posts: 79
Joined: Fri Sep 04, 2015 6:08 pm
United States of America

Re: mythcommflag not working

Post by hedgehog52 »

bill6502 wrote:
Thu May 04, 2023 4:04 am
You're right, I'd uncomment the line. Also, there should be two dashes before the word verbose.
Then restart the backend.

I don't use --syslog local6, so I don't know if a log file will be created or it it goes to the journal.
You can look at the journal with: journalctl -b --unit=mythtv.backend
Now this is interesting (And like I told you, I know nothing about logging.) there are log entries back to April 24th. So, I think it was already setup and this did nothing. At least now I know how to look at the log.

So, I looked at the log and I see that a mythcommflag failed "Failed with Exit Status 140". How do I find out what that means?

OK, there's another thread I'll have to look at: viewtopic.php?f=36&t=259
User avatar
bill6502
Developer
Posts: 2439
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: mythcommflag not working

Post by bill6502 »

Not very helpful, but it's defined here. A success exit is 0.

Code: Select all

libs/libmythbase/exitcodes.h: GENERIC_EXIT_KILLED=140, ///< Process killed or stopped
hedgehog52
Junior
Posts: 79
Joined: Fri Sep 04, 2015 6:08 pm
United States of America

Re: mythcommflag not working

Post by hedgehog52 »

bill6502 wrote:
Thu May 04, 2023 4:40 am
Not very helpful, but it's defined here. A success exit is 0.

Code: Select all

libs/libmythbase/exitcodes.h: GENERIC_EXIT_KILLED=140, ///< Process killed or stopped
Could you take a look at this link and see what you think? I looked at mythtv-setup and I don't see that %FILE% is there. Am I looking at the wrong place?

Code: Select all

https://forum.mythtv.org/viewtopic.php?f=36&t=259
hedgehog52
Junior
Posts: 79
Joined: Fri Sep 04, 2015 6:08 pm
United States of America

Re: mythcommflag not working

Post by hedgehog52 »

OK, it's getting late for me. I'll see what I can figure out tomorrow. Thanks for the help bill6502.
hedgehog52
Junior
Posts: 79
Joined: Fri Sep 04, 2015 6:08 pm
United States of America

Re: mythcommflag not working

Post by hedgehog52 »

Still getting nowhere on this.
Post Reply