[mythtv-users] mythfilldatgabase failure

Daryl McDonald darylangela at gmail.com
Fri Mar 17 16:35:38 UTC 2023


On Fri, Mar 17, 2023 at 12:15 PM Mike Perkins <mikep at randomtraveller.org.uk>
wrote:

> On 17/03/2023 15:56, Daryl McDonald wrote:
> > On Fri, Mar 17, 2023 at 11:32 AM Bill Meek <keemllib at gmail.com> wrote:
> >
> >>
> >> On Friday 17 March 2023 10:06:05 AM (-05:00), Daryl McDonald wrote:
> >>
> >> ...
> >> snip
> >> ...
> >>
> >>   > >>>
> >>   > >>> and the mythfilldatabase still failed. do I need to continue in
> the
> >>   > >>> wiki, I assumed the rest would come with the database restore?
> >> Daryl
> >>   > >>>
> >>   > >>>
> >>   > >>> I'd rerun mythfilldatabase -v xmltv and see if there are any
> clues.
> >>   > >>>
> >>   > >>> The mythconverg DB may be OK (because of lines like: Found 37
> >> channels
> >>   > >>> for source 1 which use grabber),
> >>   > >>> but did you restore the SQLIte DB. The default would
> >>   > >>> be: ~mythtv/.xmltv/SchedulesDirect.DB.
> >>   > >>>
> >>   > >>> --
> >>   > >>> Bill
> >>   > >>> I used "mythconverg_restore.pl" so, no I didn't restore the
> SQLite
> >> DB.
> >>   > >>> Sorry, I'm not clear on what you mean by the default would
> >>   > >>> be: ~mythtv/.xmltv/SchedulesDirect.DB.
> >>   > >>
> >>   > >>
> >>   > I'm not sure where to go from here:
> >>   >
> >>   > Your Schedules Direct account has the following lineups configured:
> >>   > Lineup ID            Description
> >>   >
> ======================================================================
> >>   > CAN-OTA-N9A7C3       Local Over the Air Broadcast (Antenna N9A7C3)
> >>   > Specify a Schedules Direct account lineup management action
> >>   > 0: Exit lineup management
> >>   > 1: Add an additional lineup to your account
> >>   > 2: Delete an existing lineup from your account
> >>   > 3: Display your password hash
> >>   > 4: Delete any password hash stored in the database
> >>   > 5: Initialize/update the local database
> >>   > 6: Manage database lineup channel selection
> >>   > Select one: [0,1,2,3,4,5,6 (default=0)] 5
> >>   >
> >>   > Enter your database[/home/mythtv/.xmltv/SchedulesDirect.DB]:
> >>   > Initializing database /home/mythtv/.xmltv/SchedulesDirect.DB
> >>   > Unable to create settings table in database
> >>   > /home/mythtv/.xmltv/SchedulesDirect.DB: attempt to write a readonly
> >> database
> >>   > $
> >>   > And if I try to proceed:
> >>   >
> >>   >  $ tv_grab_zz_sdjson_sqlite --configure --config-file
> >>   > $HOME/.mythtv/antenna.xmltv
> >>   > Failed to write to /home/mythtv/.mythtv/antenna.xmltv.TMP at
> >>   > /usr/local/share/perl/5.34.0/XMLTV/Configure.pm line 187.
> >>   > $
> >>   >
> >>   > I'm open to suggestions.   TIA  Daryl
> >>
> >>
> >> It appears that you're running the above as  user mythtv - that's good.
> >>
> >> But the permissions on the files and/or directories are preventing it
> from
> >> working.
> >>
> >> I assumed you meant to copy the mythtv user files/directories from the
> old
> >> host to the new one.
> >>
> > That was my initial attempt, but when mythfilldatabase failed again I
> went
> > back to the wiki
> >
> >> If mythfilldatabase and the grabber were working there, I don't believe
> >> there's a need to start
> >> configuring it from scratch like the above.
> >>
> >> Check permissions with this:
> >>
> >>       ls -ld ~mythtv/.mythtv/*.xmltv ~mythtv/.xmltv
> >
> >
> >   daryl at trieli:~$  ls -ld ~mythtv/.mythtv/*.xmltv ~mythtv/.xmltv
> > ls: cannot access '/home/mythtv/.mythtv/*.xmltv': No such file or
> directory
> > drwxrwxr-x 3 gdm lxd 4096 Mar 17 10:24  /home/mythtv/.xmltv
> > but :
> > daryl at trieli:~$ ls -al /home/mythtv
> > total 24
> > drwxr-x--- 5 mythtv mythtv 4096 Mar 17 10:25 .
> > drwxr-xr-x 5 root   root   4096 Mar 17 10:48 ..
> > -rw-r--r-- 1 gdm    lxd     143 Mar 17 10:22 antenna.xmltv
> > drwxr-xr-x 8 gdm    lxd    4096 Mar 17 10:25 .mythtv
> > drwx------ 2 gdm    lxd    4096 Mar 17 10:25 .smolt
> > drwxrwxr-x 3 gdm    lxd    4096 Mar 17 10:24 .xmltv
> > And:
> > daryl at trieli:~$ ls -ld /home/mythtv
> > drwxr-x--- 5 mythtv mythtv 4096 Mar 17 10:25 /home/mythtv
> > daryl at trieli:~$
> >
> >>
> >> ~mythtv/.xmltv/SchedulesDirect.DB
> >> Everything should be owner:group mythtv:mythtv.
> >>
> >
> > So it looks like I'm messed up here
> >
> Yup. When you copy it passes the *numeric* value of userid and groupid. On
> your new system, this is
> likely different because, when the OS is installed, the system users may
> be created in a random order.
>
> This is why, when I do something like that, I create the "mythtv" group
> and user /before/ I install
> any mythtv components.
>
> It's too late for you, but next time:
>
> #groupadd -g 1006 mythtv
> #useradd -u 1006 -g 1006 -m -s /bin/bash mythtv
>
> I choose 1006 for those values. Yours may differ if you have other users.
> Syetem users start at 1,
> 'proper' users start at 1000, which is usually allocated to the user you
> had to create when you
> installed the system. -m says create the user's directory under /home,
> which means that it should
> not get trashed if you get problems. System users go somewhere under
> /var.  -s says use bash as the
> shell.
>
> Oh, if you need to, don't forget:
>
> #passwd mythtv
>
> To fix *your* problem, go to /home and enter, as root (or via sudo):
>
> chown -R mythtv:mythtv mythtv
>
> --
>
> Mike Perkins
>
> When I copied  from the working system they copied with mythtv or root
ownership, so I chown'd them like the working system. I make the changes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20230317/35e4a2ba/attachment.htm>


More information about the mythtv-users mailing list