[Solved] Myth fails to find DB after upgrade to v33
Moderator: Forum Moderators
- AnalogBill
- Junior
- Posts: 29
- Joined: Fri Feb 10, 2017 2:11 am
[Solved] Myth fails to find DB after upgrade to v33
Upgraded Ubuntu from 20 > 22, then Myth from 30 >33 using the Myth Control Panel. After a reboot I see:
Waking up database machine
Database machine failed to wake up.
I can connect to the database, but the backend does not.
BE log shows using the /home/mythtv/.mythtv/config.xml file
I've been checking ideas from similar posts with no success.
Backend log attached. Suggestions? I'm lost!
Waking up database machine
Database machine failed to wake up.
I can connect to the database, but the backend does not.
BE log shows using the /home/mythtv/.mythtv/config.xml file
I've been checking ideas from similar posts with no success.
Backend log attached. Suggestions? I'm lost!
Last edited by AnalogBill on Wed Sep 20, 2023 7:27 pm, edited 2 times in total.
-
- Senior
- Posts: 167
- Joined: Thu Feb 23, 2023 8:55 pm
- Location: Safe outside my gilded cage
Re: Myth fails to find DB after upgrade to v33
We can't post attachments, so you'll need to upload the log to a hosting site or something. If you look at the log, every line has an I, or W, or E, etc. E is for error, that may help you narrow it down enough to post a snippet here as well.
I don't know MCP, but I'd first check mythtv-setup (as user mythtv) in the database connection section, particularly the "this machine is the master" (or something like that).
I don't know MCP, but I'd first check mythtv-setup (as user mythtv) in the database connection section, particularly the "this machine is the master" (or something like that).
Re: Myth fails to find DB after upgrade to v33
Or you can put the first 50 or so lines from the log in a code block within a post that shows the BE starting up and attempting to login to the database. Hopefully that should give us a clue what sort of things to look at.
- AnalogBill
- Junior
- Posts: 29
- Joined: Fri Feb 10, 2017 2:11 am
Re: Myth fails to find DB after upgrade to v33
1st 50 lines of BE log after reboot
Looking for instructions oh using this forum properly?
Code: Select all
Sep 19 10:37:17 mythdvr mythbackend: mythbackend[1065]: C thread_unknown mythcommandlineparser.cpp:2903 (ConfigureLogging) mythbackend version: fixes/33 [v33.1+fixes.202308152218.21d2d9d951~ubuntu20.04.1] www.mythtv.org
Sep 19 10:37:17 mythdvr mythbackend: mythbackend[1065]: C thread_unknown mythcommandlineparser.cpp:2907 (ConfigureLogging) Qt version: compile: 5.12.8, runtime: 5.15.3
Sep 19 10:37:17 mythdvr mythbackend: mythbackend[1065]: I thread_unknown mythcommandlineparser.cpp:2909 (ConfigureLogging) Ubuntu 22.04.3 LTS (x86_64)
Sep 19 10:37:17 mythdvr mythbackend: mythbackend[1065]: N thread_unknown mythcommandlineparser.cpp:2911 (ConfigureLogging) Enabled verbose msgs: general
Sep 19 10:37:17 mythdvr mythbackend: mythbackend[1065]: N thread_unknown logging.cpp:689 (logStart) Setting Log Level to LOG_INFO
Sep 19 10:37:17 mythdvr mythbackend: mythbackend[1065]: I Logger logging.cpp:277 (run) Added logging to the console
Sep 19 10:37:17 mythdvr mythbackend: mythbackend[1065]: I thread_unknown signalhandling.cpp:182 (SetHandlerPrivate) Setup Interrupt handler
Sep 19 10:37:17 mythdvr mythbackend: mythbackend[1065]: I thread_unknown signalhandling.cpp:182 (SetHandlerPrivate) Setup Terminated handler
Sep 19 10:37:17 mythdvr mythbackend: mythbackend[1065]: I thread_unknown signalhandling.cpp:182 (SetHandlerPrivate) Setup Segmentation fault handler
Sep 19 10:37:17 mythdvr mythbackend: mythbackend[1065]: I thread_unknown signalhandling.cpp:182 (SetHandlerPrivate) Setup Aborted handler
Sep 19 10:37:17 mythdvr mythbackend: mythbackend[1065]: I thread_unknown signalhandling.cpp:182 (SetHandlerPrivate) Setup Floating point exception handler
Sep 19 10:37:17 mythdvr mythbackend: mythbackend[1065]: I thread_unknown signalhandling.cpp:182 (SetHandlerPrivate) Setup Illegal instruction handler
Sep 19 10:37:17 mythdvr mythbackend: mythbackend[1065]: I thread_unknown signalhandling.cpp:182 (SetHandlerPrivate) Setup Bus error handler
Sep 19 10:37:17 mythdvr mythbackend: mythbackend[1065]: I thread_unknown signalhandling.cpp:182 (SetHandlerPrivate) Setup Real-time signal 0 handler
Sep 19 10:37:17 mythdvr mythbackend: mythbackend[1065]: I thread_unknown signalhandling.cpp:182 (SetHandlerPrivate) Setup Hangup handler
Sep 19 10:37:17 mythdvr mythbackend: mythbackend[1065]: I LogForward loggingserver.cpp:219 (SyslogLogger) Added syslogging
Sep 19 10:37:17 mythdvr mythbackend: mythbackend[1065]: N thread_unknown mythdirs.cpp:203 (InitializeMythDirs) Using runtime prefix = /usr
Sep 19 10:37:17 mythdvr mythbackend: mythbackend[1065]: N thread_unknown mythdirs.cpp:204 (InitializeMythDirs) Using configuration directory = /home/mythtv/.mythtv
Sep 19 10:37:17 mythdvr mythbackend: mythbackend[1065]: I CoreContext mythcorecontext.cpp:261 (Init) Assumed character encoding: en_US.UTF-8
Sep 19 10:37:17 mythdvr mythbackend: mythbackend[1065]: I CoreContext mythcontext.cpp:584 (LoadDatabaseSettings) Empty LocalHostName. This is typical.
Sep 19 10:37:17 mythdvr mythbackend: mythbackend[1065]: I CoreContext mythcontext.cpp:635 (LoadDatabaseSettings) Using a profile name of: 'mythdvr' (Usually the same as this host's name.)
Sep 19 10:37:17 mythdvr mythbackend: mythbackend[1065]: I CoreContext mythcontext.cpp:872 (TestDBconnection) Start up testing connections. DB mythdvr, BE , attempt 0, status dbAwake, Delay: 2000
Sep 19 10:37:18 mythdvr mythbackend: mythbackend[1065]: I CoreContext mythcontext.cpp:872 (TestDBconnection) Start up testing connections. DB mythdvr, BE , attempt 1, status dbAwake, Delay: 2000
Sep 19 10:37:23 mythdvr mythbackend: mythbackend[1065]: I CoreContext mythcontext.cpp:872 (TestDBconnection) Start up testing connections. DB mythdvr, BE , attempt 2, status dbAwake, Delay: 2000
Sep 19 10:37:28 mythdvr mythbackend: mythbackend[1065]: I CoreContext mythcontext.cpp:872 (TestDBconnection) Start up testing connections. DB mythdvr, BE , attempt 3, status dbAwake, Delay: 2000
Sep 19 10:37:33 mythdvr mythbackend: mythbackend[1065]: I CoreContext mythcontext.cpp:872 (TestDBconnection) Start up testing connections. DB mythdvr, BE , attempt 4, status dbAwake, Delay: 2000
Sep 19 10:37:38 mythdvr mythbackend: mythbackend[1065]: I CoreContext mythcontext.cpp:872 (TestDBconnection) Start up testing connections. DB mythdvr, BE , attempt 5, status dbAwake, Delay: 2000
Sep 19 10:37:43 mythdvr mythbackend: mythbackend[1065]: I CoreContext mythcontext.cpp:872 (TestDBconnection) Start up testing connections. DB mythdvr, BE , attempt 6, status dbAwake, Delay: 2000
Sep 19 10:37:48 mythdvr mythbackend: mythbackend[1065]: I CoreContext mythcontext.cpp:872 (TestDBconnection) Start up testing connections. DB mythdvr, BE , attempt 7, status dbAwake, Delay: 2000
Sep 19 10:37:53 mythdvr mythbackend: mythbackend[1065]: I CoreContext mythcontext.cpp:872 (TestDBconnection) Start up testing connections. DB mythdvr, BE , attempt 8, status dbAwake, Delay: 2000
Sep 19 10:37:58 mythdvr mythbackend: mythbackend[1065]: I CoreContext mythcontext.cpp:872 (TestDBconnection) Start up testing connections. DB mythdvr, BE , attempt 9, status dbAwake, Delay: 2000
Sep 19 10:38:03 mythdvr mythbackend: mythbackend[1065]: I CoreContext mythcontext.cpp:872 (TestDBconnection) Start up testing connections. DB mythdvr, BE , attempt 10, status dbAwake, Delay: 2000
Sep 19 10:38:08 mythdvr mythbackend: mythbackend[1065]: I CoreContext mythcontext.cpp:1000 (TestDBconnection) Start up failure. host mythdvr, status dbAwakeFail
Sep 19 10:38:09 mythdvr mythbackend: mythbackend[1065]: C CoreContext mythbackend.cpp:134 (main) Failed to init MythContext.
Sep 19 10:38:09 mythdvr mythbackend: mythbackend[1065]: I CoreContext mythcontext.cpp:1684 (~MythContext) Exiting
Sep 19 10:38:11 mythdvr mythbackend: mythbackend[2222]: C thread_unknown mythcommandlineparser.cpp:2903 (ConfigureLogging) mythbackend version: fixes/33 [v33.1+fixes.202308152218.21d2d9d951~ubuntu20.04.1] www.mythtv.org
Sep 19 10:38:11 mythdvr mythbackend: mythbackend[2222]: C thread_unknown mythcommandlineparser.cpp:2907 (ConfigureLogging) Qt version: compile: 5.12.8, runtime: 5.15.3
Sep 19 10:38:11 mythdvr mythbackend: mythbackend[2222]: I thread_unknown mythcommandlineparser.cpp:2909 (ConfigureLogging) Ubuntu 22.04.3 LTS (x86_64)
Sep 19 10:38:11 mythdvr mythbackend: mythbackend[2222]: N thread_unknown mythcommandlineparser.cpp:2911 (ConfigureLogging) Enabled verbose msgs: general
Sep 19 10:38:11 mythdvr mythbackend: mythbackend[2222]: N thread_unknown logging.cpp:689 (logStart) Setting Log Level to LOG_INFO
Sep 19 10:38:11 mythdvr mythbackend: mythbackend[2222]: I Logger logging.cpp:277 (run) Added logging to the console
Sep 19 10:38:11 mythdvr mythbackend: mythbackend[2222]: I thread_unknown signalhandling.cpp:182 (SetHandlerPrivate) Setup Interrupt handler
Sep 19 10:38:11 mythdvr mythbackend: mythbackend[2222]: I thread_unknown signalhandling.cpp:182 (SetHandlerPrivate) Setup Terminated handler
Sep 19 10:38:11 mythdvr mythbackend: mythbackend[2222]: I thread_unknown signalhandling.cpp:182 (SetHandlerPrivate) Setup Segmentation fault handler
Sep 19 10:38:11 mythdvr mythbackend: mythbackend[2222]: I thread_unknown signalhandling.cpp:182 (SetHandlerPrivate) Setup Aborted handler
Sep 19 10:38:11 mythdvr mythbackend: mythbackend[2222]: I thread_unknown signalhandling.cpp:182 (SetHandlerPrivate) Setup Floating point exception handler
Sep 19 10:38:11 mythdvr mythbackend: mythbackend[2222]: I thread_unknown signalhandling.cpp:182 (SetHandlerPrivate) Setup Illegal instruction handler
Sep 19 10:38:11 mythdvr mythbackend: mythbackend[2222]: I thread_unknown signalhandling.cpp:182 (SetHandlerPrivate) Setup Bus error handler
Sep 19 10:38:11 mythdvr mythbackend: mythbackend[2222]: I LogForward loggingserver.cpp:219 (SyslogLogger) Added syslogging
Re: Myth fails to find DB after upgrade to v33
Hi,
Using the credentials in /home/mythtv/.mythtv/config.xml, can we assume you were referring
to this when you said you can connect to the DB? Only with your own entries in config.xml:
Using the credentials in /home/mythtv/.mythtv/config.xml, can we assume you were referring
to this when you said you can connect to the DB? Only with your own entries in config.xml:
Code: Select all
mysql --host=localhost --user=mythtv --password=mythtv mythconverg
-
- Senior
- Posts: 167
- Joined: Thu Feb 23, 2023 8:55 pm
- Location: Safe outside my gilded cage
Re: Myth fails to find DB after upgrade to v33
Perhaps also
as localhost will almost certainly resolve to 127.0.0.1, but mythdvr may not?
and
Code: Select all
mysql --host=mythdvr --user=mythtv --password=mythtv mythconverg
and
Code: Select all
netstat -an | grep 3306
Re: Myth fails to find DB after upgrade to v33
Assuming (I know) that this is a master, then the <Host></Host> line should always contain localhost.
if the DB is on the same host. It's OK if it isn't but that means a TCP connection will be used where
a socket is preferred.
if the DB is on the same host. It's OK if it isn't but that means a TCP connection will be used where
a socket is preferred.
- AnalogBill
- Junior
- Posts: 29
- Joined: Fri Feb 10, 2017 2:11 am
Re: Myth fails to find DB after upgrade to v33
Yes, mysql --host=mythdvr --user=mythtv --password=mythtv mythconverg takes me right to my database.
/home/mythtv/.mythtv/config.xml
/home/wanash/.mythtv/config.xml
wanash@mythdvr:/var/log/mythtv$ netstat -an | grep 3306
tcp6 0 0 :::3306 :::* LISTEN
/home/mythtv/.mythtv/config.xml
Code: Select all
<Configuration>
<Database>
<PingHost>true</PingHost>
<Host>mythdvr</Host>
<UserName>mythtv</UserName>
<Password>mythtv</Password>
<DatabaseName>mythconverg</DatabaseName>
<Port>3306</Port>
</Database>
<WakeOnLAN>
<Enabled>false</Enabled>
<SQLReconnectWaitTime>0</SQLReconnectWaitTime>
<SQLConnectRetry>5</SQLConnectRetry>
<Command>echo 'WOLsqlServerCommand not set'</Command>
</WakeOnLAN>
<UPnP>
<UDN>
<MediaServer>38cc7e9b-1537-4355-83c9-ca0f8c050df6</MediaServer>
<MasterMediaServer>0b8d48bb-bdbd-4105-814b-9cd54a3ddced</MasterMediaServer>
</UDN>
</UPnP>
<LocalHostName></LocalHostName>
</Configuration>
Code: Select all
<Configuration>
<Database>
<PingHost>true</PingHost>
<Host>mythdvr</Host>
<UserName>mythtv</UserName>
<Password>mythtv</Password>
<DatabaseName>mythconverg</DatabaseName>
<Port>3306</Port>
</Database>
<WakeOnLAN>
<Enabled>false</Enabled>
<SQLReconnectWaitTime>0</SQLReconnectWaitTime>
<SQLConnectRetry>5</SQLConnectRetry>
<Command>echo 'WOLsqlServerCommand not set'</Command>
</WakeOnLAN>
<LocalHostName></LocalHostName>
<UPnP>
<UDN>
<MediaRenderer>4548b4a6-e042-41bf-9878-d6a8853912db</MediaRenderer>
</UDN>
</UPnP>
</Configuration>
tcp6 0 0 :::3306 :::* LISTEN
- AnalogBill
- Junior
- Posts: 29
- Joined: Fri Feb 10, 2017 2:11 am
Re: Myth fails to find DB after upgrade to v33
Corrected <Host>mythdvr</Host> to <Host>localhost</Host> in both /home/wanash/.mythtv/config.xml and /home/mythtv/.mythtv/config.xml;
Rebooted, same result.
Rebooted, same result.
Re: Myth fails to find DB after upgrade to v33
That's interesting, the SQL server is only listening on IPv6. Mine is:
I was looking to see of the PortChecker in the backend (which is failing) is only using IPv4
while from the command line IPv6 is used? Don't know how those names are resolved on
your system. I do use IPv6 myself.
You could change the <Host> line to the IPv6 address of the server, I don't recall if it needs to be
in []s.
I'd look at: nmap -p3306 --reason mythdvr localhost also: grep --recursive bind.address /etc/mysql
where I'd expect bind_address=*
Code: Select all
tcp 0 0 0.0.0.0:mysql 0.0.0.0:* LISTEN 1386/mariadbd
tcp6 0 0 [::]:mysql [::]:* LISTEN 1386/mariadbd
while from the command line IPv6 is used? Don't know how those names are resolved on
your system. I do use IPv6 myself.
You could change the <Host> line to the IPv6 address of the server, I don't recall if it needs to be
in []s.
I'd look at: nmap -p3306 --reason mythdvr localhost also: grep --recursive bind.address /etc/mysql
where I'd expect bind_address=*
- dnalorernst
- Developer
- Posts: 97
- Joined: Mon Feb 17, 2020 8:03 pm
Re: Myth fails to find DB after upgrade to v33
Search for 'bind-address', as well, note the hyphen ('-' sign).
In your previous posts you stated that you are using mariadb.
If this is still the case, then read this posting: https://lists.archive.carbon60.com/mythtv/users/643520
The path used to configure mariadb is '/etc/mysql/mariadb.conf.d'
Note the asterisk (*) is probably only used for ipv4, the '::' is used for ipv6.
Leave it empty, 'bind-address=' , the default, will allow IPv4 and IPv6
Roland
In your previous posts you stated that you are using mariadb.
If this is still the case, then read this posting: https://lists.archive.carbon60.com/mythtv/users/643520
The path used to configure mariadb is '/etc/mysql/mariadb.conf.d'
Note the asterisk (*) is probably only used for ipv4, the '::' is used for ipv6.
Leave it empty, 'bind-address=' , the default, will allow IPv4 and IPv6
Roland
- AnalogBill
- Junior
- Posts: 29
- Joined: Fri Feb 10, 2017 2:11 am
Re: Myth fails to find DB after upgrade to v33
nmap not installed, but sudo grep --recursive bind.address /etc/mysql provided this:
Roland, Yes, using mariadb. Reading suggested post next.
Getting way over my head now. Thanks
Code: Select all
/etc/mysql/conf.d/mythtv.cnf.save:bind-address=::
/etc/mysql/conf.d/mythtv.cnf:#bind-address=::
/etc/mysql/mariadb.conf.d/50-server.cnf:bind-address = ::
/etc/mysql/mariadb.conf.d/50-server.cnf.dpkg-dist:bind-address = 127.0.0.1
/etc/mysql/mariadb.conf.d/60-galera.cnf:#bind-address = 0.0.0.0
Getting way over my head now. Thanks
Re: Myth fails to find DB after upgrade to v33
I did send a private message to the author of Myth Control Panel some time ago
about IPv6 and I thought he fixed it. There should be some selection to allow
remote hosts access. I believe he still uses the /etc/mysql/conf.d/mythtv.cnf
file. I agree with Roland's path though.
I use the * and it works with both IPv4 and IPv6.
AnalogBill, if you change it with the Myth Control Panel or by just editing the
file, be sure to restart the server (probably sudo systemctl restart mysql).
about IPv6 and I thought he fixed it. There should be some selection to allow
remote hosts access. I believe he still uses the /etc/mysql/conf.d/mythtv.cnf
file. I agree with Roland's path though.
I use the * and it works with both IPv4 and IPv6.
AnalogBill, if you change it with the Myth Control Panel or by just editing the
file, be sure to restart the server (probably sudo systemctl restart mysql).
Re: Myth fails to find DB after upgrade to v33
Found Ted's source for Mythbuntu Control Panel. He switched :: to * in June of 2022.
It could be you're using an old version AND near as I can tell, he doesn't have a --version switch to check it.
The most recent version is dated May 19 2023.
It could be you're using an old version AND near as I can tell, he doesn't have a --version switch to check it.
The most recent version is dated May 19 2023.
- AnalogBill
- Junior
- Posts: 29
- Joined: Fri Feb 10, 2017 2:11 am
Re: Myth fails to find DB after upgrade to v33
I added the 80-mythtv.cnf file as suggested and rebooted. Successfully running now!
Thanks to everyone!
Where can I find your tip jar or donation button?
Thanks to everyone!
Where can I find your tip jar or donation button?