[mythtv-users] mythfilldatgabase failure

Daryl McDonald darylangela at gmail.com
Fri Mar 17 18:25:29 UTC 2023


On Fri, Mar 17, 2023 at 1:27 PM Hika van den Hoven <hikavdh at gmail.com>
wrote:

> Hoi Daryl,
>
> Friday, March 17, 2023, 6:06:26 PM, you wrote:
>
>
>
>
> > On Fri, Mar 17, 2023 at 12:35 PM Daryl McDonald <darylangela at gmail.com>
> wrote:
>
>
>
>
> > 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
>
>
>
> > Now it errors in a different way:
>
>
> >  $ mythfilldatabase2023-03-17 13:04:45.552310 C  mythfilldatabase
> > version: fixes/32 [v32.0+fixes.20220325.f69ce764b7-0ubuntu1]
> www.mythtv.org
> > 2023-03-17 13:04:45.552320 C  Qt version: compile: 5.15.2, runtime:
> 5.15.3
> > 2023-03-17 13:04:45.552352 I  Ubuntu 22.04.2 LTS (x86_64)
> > 2023-03-17 13:04:45.552354 N  Enabled verbose msgs:  general
> > 2023-03-17 13:04:45.552361 N  Setting Log Level to LOG_INFO
> > 2023-03-17 13:04:45.562915 I  Added logging to the console
> > 2023-03-17 13:04:45.563082 I  Setup Interrupt handler
> > 2023-03-17 13:04:45.563087 I  Setup Terminated handler
> > 2023-03-17 13:04:45.563091 I  Setup Segmentation fault handler
> > 2023-03-17 13:04:45.563094 I  Setup Aborted handler
> > 2023-03-17 13:04:45.563097 I  Setup Bus error handler
> > 2023-03-17 13:04:45.563100 I  Setup Floating point exception handler
> > 2023-03-17 13:04:45.563129 I  Setup Illegal instruction handler
> > 2023-03-17 13:04:45.563147 I  Setup Real-time signal 0 handler
> > 2023-03-17 13:04:45.563151 I  Setup Hangup handler
> > 2023-03-17 13:04:45.563246 N  Using runtime prefix = /usr
> > 2023-03-17 13:04:45.563248 N  Using configuration directory =
> /home/mythtv/.mythtv
> > 2023-03-17 13:04:45.563276 I  Assumed character encoding: en_CA.UTF-8
> > 2023-03-17 13:04:45.563457 E  Error parsing:
> > /home/mythtv/.mythtv/config.xml at line: 1  column: 1
> > 2023-03-17 13:04:45.563459 E  Error Msg: unexpected end of file
> > 2023-03-17 13:04:45.563493 E  DBHostName is not set in config.xml
> > 2023-03-17 13:04:45.563501 E  DBHostName is not set in config.xml
> > 2023-03-17 13:04:45.563513 I  Empty LocalHostName. This is typical.
> > 2023-03-17 13:04:45.563516 I  Using a profile name of: 'trieli'
> > (Usually the same as this host's name.)
> > 2023-03-17 13:04:45.563558 I  Start up testing connections. DB
> > localhost, BE , attempt 0, status dbAwake, Delay: 2000
> > 2023-03-17 13:04:46.578019 E  [DBManager0] Unable to connect to database!
> > 2023-03-17 13:04:46.578051 E  Driver error was [1/1045]:
> > QMYSQL: Unable to connect
> > Database error was:
> > Access denied for user 'mythtv'@'localhost' (using password: YES)
>
> > 2023-03-17 13:04:47.578495 I  Start up failure. host localhost, status
> dbStartedFail
> > 2023-03-17 13:04:47.578526 I  UPNP Search 2 secs
> > 2023-03-17 13:04:47.578774 E  Error parsing:
> > /home/mythtv/.mythtv/config.xml at line: 1  column: 1
> > 2023-03-17 13:04:47.578779 E  Error Msg: unexpected end of file
> > 2023-03-17 13:04:47.985447 I  UPNP Search 1 secs
> > 2023-03-17 13:04:48.330362 I  UPNP Search 1 secs
> > 2023-03-17 13:04:49.752160 I  Found 1 UPnP backends
> > 2023-03-17 13:04:50.256477 E  SOAPClient::SendSOAPRequest: request
> > failed: http://192.168.0.183:6544/Myth
> > 2023-03-17 13:04:50.256591 E  MythXMLClient::GetConnectionInfo
> > Failed - (32002) unexpected end of file
>
> > Cannot login to database
>
> > Would you like to configure the database connection now? [no]
>
> /home/mythtv/.mythtv/config.xml is not properly setup. It's a text
> file so you can open it in a text editor. It should contain info on
> how to access the database.
> You can compare it to the one on your old system.
> Probably the hostname has changed. If you have copied it from the old
> system change it here to the new hostname and also if they are not the
> same as on the old system change the username and password to those
> you have set for the new database.
>
>
> Tot mails,
>   Hika                            mailto:hikavdh at gmail.com
>
> "Zonder hoop kun je niet leven
> Zonder leven is er geen hoop
> Het eeuwige dilemma
> Zeker als je hoop moet vernietigen om te kunnen overleven!"
>
> De lerende Mens
>

 OK, where do I find the new system password?  "/etc/mythtv/config.xml was
an empty file on the new system so I cp'd from the old and now:
2023-03-17 14:20:49.656660 I  Start up testing connections. DB localhost,
BE , attempt 10, status dbStarted, Delay: 2000
2023-03-17 14:20:49.657860 E  [DBManager10] Unable to connect to database!
2023-03-17 14:20:49.657875 E  Driver error was [1/1045]:
QMYSQL: Unable to connect
Database error was:
Access denied for user 'mythtv'@'localhost' (using password: YES)
This repeats five times at the end of the run

> _______________________________________________
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20230317/4116ce93/attachment.htm>


More information about the mythtv-users mailing list