[Solved] Mythfilldatabase runs, but doesn't insert into guide

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

Moderator: Forum Moderators

Post Reply
StefanJ
Junior
Posts: 17
Joined: Wed Oct 08, 2014 11:38 pm
United States of America

[Solved] Mythfilldatabase runs, but doesn't insert into guide

Post by StefanJ » Thu Mar 25, 2021 10:47 pm

I am migrating my MythTV system to a new, faster PC.

I successfully imported mythconverg into the new system. I can play video, record new programs (both ones I scheduled and schedule events that came in via the imported database records).

This morning I set up the video sources stuff. Found the source listing for my area, imported the channels, edited the channel list.

Then I restarted mythbackend and ran mythfilldatabase. I thought everything was copacetic, then checked system status. Under Listings Status was a notification of the last run of mythfilldatabase, and then this:

"Result: mythfilldatabase ran, but did not insert any new data into th Guide for 1 of 1 sources. This can indicate a potential grabber failure."

I still had the console where I ran the command open. I scrolled up and found the following:

Code: Select all

2021-03-25 14:21:48.894609 I [19595/19595] CoreContext schemawizard.cpp:117:Compare  Current MythTV Schema Version (DBSchemaVer): 1361
2021-03-25 14:21:48.896104 I [19595/19595] CoreContext mythcorecontext.cpp:469:ConnectCommandSocket  MythCoreContext::ConnectCommandSocket(): Connecting to backend server: 127.0.0.1:6543 (try 1 of 1)
2021-03-25 14:21:48.898639 I [19595/19595] CoreContext mythcorecontext.cpp:1691:CheckProtoVersion  MythCoreContext::CheckProtoVersion(): Using protocol version 91 BuzzOff
2021-03-25 14:21:48.898873 I [19595/19595] CoreContext main.cpp:282:main  Opening blocking connection to master backend
2021-03-25 14:21:49.101743 I [19595/19595] CoreContext filldata.cpp:317:Run  Updating source #1 (sd direct ) with grabber tv_grab_zz_sdjson
2021-03-25 14:21:49.102262 I [19595/19595] CoreContext filldata.cpp:332:Run  Found 69 channels for source 1 which use grabber
2021-03-25 14:21:49.102458 I [19595/19617] SystemManager mythsystemunix.cpp:262:run  Starting process manager
2021-03-25 14:21:49.102492 I [19595/19619] SystemIOHandlerR mythsystemunix.cpp:82:run  Starting IO manager (read)
2021-03-25 14:21:49.102484 I [19595/19618] SystemSignalManager mythsystemunix.cpp:488:run  Starting process signal handler
2021-03-25 14:21:49.103708 I [19595/19620] SystemIOHandlerW mythsystemunix.cpp:82:run  Starting IO manager (write)
2021-03-25 14:21:49.453585 I [19595/19595] CoreContext filldata.cpp:393:Run  Grabber has capabilities: baseline manualconfig preferredmethod 
2021-03-25 14:21:49.804357 I [19595/19595] CoreContext filldata.cpp:418:Run  Grabber prefers method: allatonce
2021-03-25 14:21:49.806301 I [19595/19595] CoreContext filldata.cpp:143:GrabData  XMLTV config file is: /home/stefan/.mythtv/sd direct .xmltv

SNIP - handling of skipped channels

2021-03-25 14:24:22.925994 N [19595/19595] CoreContext channeldata.cpp:192:handleChannels  Skipping Channel Updates

2021-03-25 14:24:51.911736 I [19595/19595] CoreContext programdata.cpp:1512:HandlePrograms  Updated programs: 3482 Unchanged programs: 33198
2021-03-25 14:24:52.908292 N [19595/19595] CoreContext main.cpp:409:main  Data fetching complete.
2021-03-25 14:24:52.908311 I [19595/19595] CoreContext main.cpp:417:main  Adjusting program database end times.
2021-03-25 14:24:52.908519 I [19595/19595] CoreContext main.cpp:422:main      0 replacements made
2021-03-25 14:24:52.908522 I [19595/19595] CoreContext main.cpp:425:main  Marking generic episodes.
2021-03-25 14:24:53.514501 I [19595/19595] CoreContext main.cpp:436:main      Found 0
2021-03-25 14:24:53.514504 I [19595/19595] CoreContext main.cpp:439:main  Extending non-unique programids with multiple parts.
2021-03-25 14:24:53.624966 I [19595/19595] CoreContext main.cpp:490:main      Found 0
2021-03-25 14:24:53.624972 I [19595/19595] CoreContext main.cpp:492:main  Fixing missing original airdates.
2021-03-25 14:24:54.570501 I [19595/19595] CoreContext main.cpp:506:main      Found 1669 with programids
2021-03-25 14:24:54.570998 I [19595/19595] CoreContext main.cpp:528:main      Found 0 without programids
2021-03-25 14:24:54.570999 I [19595/19595] CoreContext main.cpp:535:main  Marking repeats.
2021-03-25 14:24:55.152698 I [19595/19595] CoreContext main.cpp:548:main      Found 1669
2021-03-25 14:24:55.152703 I [19595/19595] CoreContext main.cpp:551:main  Unmarking new episode rebroadcast repeats.
2021-03-25 14:24:55.760143 I [19595/19595] CoreContext main.cpp:560:main      Found 1809
2021-03-25 14:24:57.416587 I [19595/19595] CoreContext main.cpp:570:main  Marking episode first showings.
QMYSQLResult::cleanup: unable to free statement handle
2021-03-25 14:29:57.418629 E [19595/19595] CoreContext mythdb.cpp:181:DBError  DB Error (Marking first showings by id):
Query was:
UPDATE program JOIN (SELECT MIN(p.starttime) AS starttime, p.programid       FROM program p, channel c       WHERE p.programid <> ''             AND p.chanid = c.chanid             AND c.deleted IS NULL             AND c.visible > 0       GROUP BY p.programid      ) AS firsts ON program.programid = firsts.programid   AND program.starttime = firsts.starttime SET program.first=1;
Driver error was [2/2013]:
QMYSQL3: Unable to execute statement
Database error was:
Lost connection to MySQL server during query

2021-03-25 14:29:57.419329 I [19595/19595] CoreContext mythdbcon.cpp:260:Reconnect  MySQL reconnected successfully
2021-03-25 14:29:59.109346 I [19595/19595] CoreContext main.cpp:606:main      Found -1
2021-03-25 14:29:59.109350 I [19595/19595] CoreContext main.cpp:608:main  Marking episode last showings.
QMYSQLResult::cleanup: unable to free statement handle
2021-03-25 14:34:59.190482 E [19595/19595] CoreContext mythdb.cpp:181:DBError  DB Error (Marking last showings by id):
Query was:
UPDATE program JOIN (SELECT MAX(p.starttime) AS starttime, p.programid       FROM program p, channel c       WHERE p.programid <> ''             AND p.chanid = c.chanid             AND c.deleted IS NULL             AND c.visible > 0       GROUP BY p.programid      ) AS lasts ON program.programid = lasts.programid   AND program.starttime = lasts.starttime SET program.last=1;
Driver error was [2/2013]:
QMYSQL3: Unable to execute statement
Database error was:
Lost connection to MySQL server during query

2021-03-25 14:34:59.191047 I [19595/19595] CoreContext mythdbcon.cpp:260:Reconnect  MySQL reconnected successfully
2021-03-25 14:35:00.390475 I [19595/19595] CoreContext main.cpp:644:main      Found -1
2021-03-25 14:35:00.413523 I [19595/19595] CoreContext main.cpp:660:main  
===============================================================
| Attempting to contact the master backend for rescheduling.  |
| If the master is not running, rescheduling will happen when |
| the master backend is restarted.                            |
===============================================================
2021-03-25 14:35:00.414267 N [19595/19595] CoreContext main.cpp:674:main  mythfilldatabase run complete.
2021-03-25 14:35:00.414313 I [19595/19595] CoreContext platforms/mythpowerdbus.cpp:72:~MythPowerDBus  PowerDBus: Closing interfaces
2021-03-25 14:35:00.414597 I [19595/19595] CoreContext mythcontext.cpp:1659:~MythContext  Waiting for threads to exit.
2021-03-25 14:35:00.414877 I [19595/19595] CoreContext mythcontext.cpp:1665:~MythContext  Exiting
[stefan@hp-fedora mythtv]$ mythfrontend
So, it looks like it found programs, but had database issues.

I then thought, "hey, I ran that as myself. Let's try running it as superuser (sudo)."

Code: Select all

2021-03-25 15:22:07.014053 I [21813/21824] SystemIOHandlerW mythsystemunix.cpp:82:run  Starting IO manager (write)
2021-03-25 15:22:07.363601 I [21813/21813] CoreContext filldata.cpp:393:Run  Grabber has capabilities: baseline manualconfig preferredmethod 
2021-03-25 15:22:07.714333 I [21813/21813] CoreContext filldata.cpp:418:Run  Grabber prefers method: allatonce
2021-03-25 15:22:07.715346 I [21813/21813] CoreContext filldata.cpp:143:GrabData  XMLTV config file is: /root/.mythtv/sd direct .xmltv
2021-03-25 15:22:08.165928 E [21813/21813] CoreContext filldata.cpp:215:GrabData  XMLTV grabber returned error code 1
2021-03-25 15:22:08.515910 E [21813/21813] CoreContext xmltvparser.cpp:743:parseFile  Malformed XML file, missing </tv> element, at line 1, Premature end of document.
2021-03-25 15:22:08.709578 E [21813/21813] CoreContext main.cpp:407:main  Failed to fetch some program info
2021-03-25 15:22:08.709597 I [21813/21813] CoreContext main.cpp:417:main  Adjusting program database end times.
2021-03-25 15:22:08.709845 I [21813/21813] CoreContext main.cpp:422:main      0 replacements made
2021-03-25 15:22:08.709847 I [21813/21813] CoreContext main.cpp:425:main  Marking generic episodes.
2021-03-25 15:22:09.304300 I [21813/21813] CoreContext main.cpp:436:main      Found 0
2021-03-25 15:22:09.304303 I [21813/21813] CoreContext main.cpp:439:main  Extending non-unique programids with multiple parts.
2021-03-25 15:22:09.405463 I [21813/21813] CoreContext main.cpp:490:main      Found 0
2021-03-25 15:22:09.405466 I [21813/21813] CoreContext main.cpp:492:main  Fixing missing original airdates.
2021-03-25 15:22:09.880616 I [21813/21813] CoreContext main.cpp:506:main      Found 0 with programids
2021-03-25 15:22:09.881184 I [21813/21813] CoreContext main.cpp:528:main      Found 0 without programids
2021-03-25 15:22:09.881186 I [21813/21813] CoreContext main.cpp:535:main  Marking repeats.
2021-03-25 15:22:10.433688 I [21813/21813] CoreContext main.cpp:548:main      Found 0
2021-03-25 15:22:10.433691 I [21813/21813] CoreContext main.cpp:551:main  Unmarking new episode rebroadcast repeats.
2021-03-25 15:22:11.009385 I [21813/21813] CoreContext main.cpp:560:main      Found 0
In the above, the grabber didn't work because it was looking for the xmltv config file in /root/.mythtv.

And it still had connect issues:

Code: Select all

2021-03-25 15:22:12.351587 I [21813/21813] CoreContext main.cpp:570:main  Marking episode first showings.
QMYSQLResult::cleanup: unable to free statement handle
2021-03-25 15:27:12.452037 E [21813/21813] CoreContext mythdb.cpp:181:DBError  DB Error (Marking first showings by id):
Query was:
UPDATE program JOIN (SELECT MIN(p.starttime) AS starttime, p.programid       FROM program p, channel c       WHERE p.programid <> ''             AND p.chanid = c.chanid             AND c.deleted IS NULL             AND c.visible > 0       GROUP BY p.programid      ) AS firsts ON program.programid = firsts.programid   AND program.starttime = firsts.starttime SET program.first=1;
Driver error was [2/2013]:
QMYSQL3: Unable to execute statement
Database error was:
Lost connection to MySQL server during query

2021-03-25 15:27:12.452619 I [21813/21813] CoreContext mythdbcon.cpp:260:Reconnect  MySQL reconnected successfully
2021-03-25 15:27:34.638775 I [21813/21813] CoreContext main.cpp:606:main      Found -1
2021-03-25 15:27:34.638779 I [21813/21813] CoreContext main.cpp:608:main  Marking episode last showings.
I noticed that mythfilldatabase tries to make a test connection as it sets up:

Code: Select all

2021-03-25 15:44:24.312255 I [22695/22695] CoreContext mythcontext.cpp:636:LoadDatabaseSettings  Using a profile name of: 'hp-fedora' (Usually the same as this host's name.)
2021-03-25 15:44:24.312293 I [22695/22695] CoreContext mythcontext.cpp:885:TestDBconnection  Start up testing connections. DB localhost, BE , attempt 0, status dbAwake, Delay: 2000
I messed with config.xml to see what happens changed the port) and the above attempt failed, so there IS a database connection made.

Any suggstions where to start?

StefanJ
Junior
Posts: 17
Joined: Wed Oct 08, 2014 11:38 pm
United States of America

Re: Mythfilldatabase runs, but doesn't insert into guide

Post by StefanJ » Thu Mar 25, 2021 10:59 pm

P.S. Running Myth 31.0-15.139, Fedora Linux 5.11.8-200.fc33, mariadb.x86_64 10.4.18-1

User avatar
heyted
Senior
Posts: 195
Joined: Sun Jun 08, 2014 2:14 am
Location: South Florida
Contact:
United States of America

Re: Mythfilldatabase runs, but doesn't insert into guide

Post by heyted » Fri Mar 26, 2021 12:36 am

Need to run mythfilldatabase as the same user that runs the backend. This is usually user mythtv. If setup was done using user stefan, the necessary files need to be copied to the backend user (probably mythtv) directory.
Ted | My blog

StefanJ
Junior
Posts: 17
Joined: Wed Oct 08, 2014 11:38 pm
United States of America

Re: Mythfilldatabase runs, but doesn't insert into guide

Post by StefanJ » Fri Mar 26, 2021 12:52 am

Ahhhh . . . the problem may be related to this one:

viewtopic.php?f=36&t=3231&p=21550#p21550

tl;dl: MariaDB 10.4+ has a bug with regard to Mythtv.

StefanJ
Junior
Posts: 17
Joined: Wed Oct 08, 2014 11:38 pm
United States of America

Re: Mythfilldatabase runs, but doesn't insert into guide

Post by StefanJ » Fri Mar 26, 2021 1:22 am

@heyted: Thanks!

There is not mythtv user on this system. The binaries are owned by root.

I copied the xmltv file into /root/.mythtv and ran mythfilldatabase as superuser. This time, there were no sql errors:

Code: Select all

2021-03-25 18:00:05.010131 I [26648/26648] CoreContext programdata.cpp:1512:HandlePrograms  Updated programs: 3321 Unchanged programs: 31802
2021-03-25 18:00:05.947231 N [26648/26648] CoreContext main.cpp:409:main  Data fetching complete.
2021-03-25 18:00:05.947243 I [26648/26648] CoreContext main.cpp:417:main  Adjusting program database end times.
2021-03-25 18:00:05.947469 I [26648/26648] CoreContext main.cpp:422:main      0 replacements made
2021-03-25 18:00:05.947470 I [26648/26648] CoreContext main.cpp:425:main  Marking generic episodes.
2021-03-25 18:00:06.532300 I [26648/26648] CoreContext main.cpp:436:main      Found 0
2021-03-25 18:00:06.532304 I [26648/26648] CoreContext main.cpp:439:main  Extending non-unique programids with multiple parts.
2021-03-25 18:00:06.633917 I [26648/26648] CoreContext main.cpp:490:main      Found 0
2021-03-25 18:00:06.633922 I [26648/26648] CoreContext main.cpp:492:main  Fixing missing original airdates.
2021-03-25 18:00:07.551655 I [26648/26648] CoreContext main.cpp:506:main      Found 1590 with programids
2021-03-25 18:00:07.552139 I [26648/26648] CoreContext main.cpp:528:main      Found 0 without programids
2021-03-25 18:00:07.552140 I [26648/26648] CoreContext main.cpp:535:main  Marking repeats.
2021-03-25 18:00:08.110718 I [26648/26648] CoreContext main.cpp:548:main      Found 1590
2021-03-25 18:00:08.110723 I [26648/26648] CoreContext main.cpp:551:main  Unmarking new episode rebroadcast repeats.
2021-03-25 18:00:08.688258 I [26648/26648] CoreContext main.cpp:560:main      Found 1728
2021-03-25 18:00:10.005633 I [26648/26648] CoreContext main.cpp:570:main  Marking episode first showings.
2021-03-25 18:05:07.279643 I [26648/26648] CoreContext main.cpp:606:main      Found 44972
2021-03-25 18:05:07.279648 I [26648/26648] CoreContext main.cpp:608:main  Marking episode last showings.
2021-03-25 18:10:04.532819 I [26648/26648] CoreContext main.cpp:644:main      Found 48748
2021-03-25 18:10:04.554676 I [26648/26648] CoreContext main.cpp:660:main  
===============================================================
| Attempting to contact the master backend for rescheduling.  |
| If the master is not running, rescheduling will happen when |
| the master backend is restarted.                            |
===============================================================
2021-03-25 18:10:04.555654 N [26648/26648] CoreContext main.cpp:674:main  mythfilldatabase run complete.
2021-03-25 18:10:04.555709 I [26648/26648] CoreContext platforms/mythpowerdbus.cpp:72:~MythPowerDBus  PowerDBus: Closing interfaces
2021-03-25 18:10:04.556033 I [26648/26648] CoreContext mythcontext.cpp:1659:~MythContext  Waiting for threads to exit.
2021-03-25 18:10:04.556278 I [26648/26648] CoreContext mythcontext.cpp:1665:~MythContext  Exiting
Howevre, I still see -- in the Listings Status box -- the "mythfilldatabase ran, but did not insert any new data into the Guide for 1 of 1 sources. This can indicate a potential grabber failure." error.

Very puzzling.

StefanJ
Junior
Posts: 17
Joined: Wed Oct 08, 2014 11:38 pm
United States of America

SOLVED Re: Mythfilldatabase runs, but doesn't insert into guide

Post by StefanJ » Fri Mar 26, 2021 1:22 pm

OK. Fixed this.

This was a configuration issue, in the xmltv area. The new way that Schedules Direct and MythTV work together is still new to me; compound this with this being my first Gnome flavored Fedora system. There were some partsw of the install that I should have run as root (that is, run with sudo) that still worked running as my user.

I fixed it by copying in the .mythtv/foo.xmltv config file in from my working, older mythbox.

|I hope that xmltv configuration is better integrated into myth in the future.

User avatar
bill6502
Developer
Posts: 1871
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Mythfilldatabase runs, but doesn't insert into guide

Post by bill6502 » Sat Mar 27, 2021 6:26 pm

Note that:
Result: mythfilldatabase ran, but did not insert any new data into th Guide for 1 of 1 sources. This can indicate a potential grabber failure
is an observation, not an error. If you run MFDB and they're no new programs, you'll get this message.

I saw fixed above, so I'm marking the Subject: in the initial post as solved. Please edit that out if it's not true.

wilma92010
Newcomer
Posts: 1
Joined: Fri Feb 05, 2016 4:42 am
Bangladesh

Re: [Solved] Mythfilldatabase runs, but doesn't insert into guide

Post by wilma92010 » Thu May 06, 2021 1:04 am

Hi There,

I wish when a problem is marked [Solved], the thread contains the solution which would be useful to others that have the same kind of issue. Specifically, listing the 'older mythbox' with the problematic foo.xmltv config files could be very useful. There are quite a number of posts about the integration of Schedule Direct into the new version, many marked [Solved], which I understand is true and congrats on that, but ultimately there is no useful description of the solution for others.

I am upgrading from versions I have used for at least 10 years and have been able to solve all the problems with version 25 (and prior) installation and configurations. I have been unable to get the new method working and have this specific symptom (and others) for weeks. It is enormously frustrating.

Thanks for listening.

Wilma

Post Reply