[SOLVED] Mythbackend service crash due to missing credential

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[SOLVED] Mythbackend service crash due to missing credential

Postby linuxdvrfan » Jun 2nd, '21, 19:51

Hello fellow Mageians,
I have heavily edited this post to make it easier to read and stay on the topic. Thanks in advance for any help.
Running as other users it does not crash. Credentials all look good.
Settings look correct in config.xml. I can login to mythconverg database as user mythtv in mariadb.
Behavior repeats on fresh database and also on restored from backup database.
Any suggestions on how to proceed?

I am attempting to run mythtv server on Mageia 8. The mythbackend program is crashing when started. Here is the mythbackend log:

Code: Select all
2021-06-02 14:44:31.267683 C [5681/5681] thread_unknown mythcommandlineparser.cpp:2608 (ConfigureLogging) - mythbackend version: fixes/31.0 [31.0-20210323.1.1.mga8.tainted (aka v31.0-143-gdbac81)] www.mythtv.org
2021-06-02 14:44:31.267693 C [5681/5681] thread_unknown mythcommandlineparser.cpp:2612 (ConfigureLogging) - Qt version: compile: 5.15.2, runtime: 5.15.2
2021-06-02 14:44:31.267710 I [5681/5681] thread_unknown mythcommandlineparser.cpp:2614 (ConfigureLogging) - Mageia 8 (x86_64)
2021-06-02 14:44:31.267713 N [5681/5681] thread_unknown mythcommandlineparser.cpp:2616 (ConfigureLogging) - Enabled verbose msgs:  general
2021-06-02 14:44:31.267771 N [5681/5681] thread_unknown logging.cpp:724 (logStart) - Setting Log Level to LOG_INFO
2021-06-02 14:44:31.278089 I [5681/5687] Logger logging.cpp:280 (run) - Added logging to the console
2021-06-02 14:44:31.278264 I [5681/5681] thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) - Setup Interrupt handler
2021-06-02 14:44:31.278269 I [5681/5681] thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) - Setup Terminated handler
2021-06-02 14:44:31.278271 I [5681/5681] thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) - Setup Segmentation fault handler
2021-06-02 14:44:31.278274 I [5681/5681] thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) - Setup Aborted handler
2021-06-02 14:44:31.278279 I [5681/5681] thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) - Setup Bus error handler
2021-06-02 14:44:31.278281 I [5681/5681] thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) - Setup Floating point exception handler
2021-06-02 14:44:31.278284 I [5681/5681] thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) - Setup Illegal instruction handler
2021-06-02 14:44:31.278287 I [5681/5681] thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) - Setup Real-time signal 0 handler
2021-06-02 14:44:31.278291 I [5681/5681] thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) - Setup Hangup handler
2021-06-02 14:44:31.278321 N [5681/5681] thread_unknown mythdirs.cpp:37 (InitializeMythDirs) - Read conf dir = /var/lib/mythtv
2021-06-02 14:44:31.278369 N [5681/5681] thread_unknown mythdirs.cpp:203 (InitializeMythDirs) - Using runtime prefix = /usr
2021-06-02 14:44:31.278370 N [5681/5681] thread_unknown mythdirs.cpp:204 (InitializeMythDirs) - Using configuration directory = /var/lib/mythtv
2021-06-02 14:44:31.278394 I [5681/5681] CoreContext mythcorecontext.cpp:284 (Init) - Assumed character encoding: en_US.UTF-8
2021-06-02 14:44:31.278467 E [5681/5681] CoreContext mythdbparams.cpp:43 (IsValid) - DBHostName is not set in config.xml
2021-06-02 14:44:31.278473 E [5681/5681] CoreContext mythdbparams.cpp:43 (IsValid) - DBHostName is not set in config.xml
2021-06-02 14:44:31.278482 I [5681/5681] CoreContext mythcontext.cpp:629 (LoadDatabaseSettings) - Empty LocalHostName. This is typical.
2021-06-02 14:44:31.278485 I [5681/5681] CoreContext mythcontext.cpp:636 (LoadDatabaseSettings) - Using a profile name of: 'localhost' (Usually the same as this host's name.)
2021-06-02 14:44:31.278514 I [5681/5681] CoreContext mythcontext.cpp:885 (TestDBconnection) - Start up testing connections. DB localhost, BE , attempt 0, status dbAwake, Delay: 2000
2021-06-02 14:44:31.279252 I [5681/5686] LogForward loggingserver.cpp:128 (FileLogger) - Added logging to /var/log/mythtv/mythbackend.20210602184431.5681.log
2021-06-02 14:44:32.282919 E [5681/5681] CoreContext mythdbcon.cpp:235 (OpenDatabase) - [DBManager0] Unable to connect to database!
2021-06-02 14:44:32.282940 E [5681/5681] CoreContext mythdbcon.cpp:236 (OpenDatabase) - Driver error was [1/1045]:
QMYSQL: Unable to connect
Database error was:
Access denied for user 'mythtv'@'localhost' (using password: YES)

2021-06-02 14:44:33.283234 I [5681/5681] CoreContext mythcontext.cpp:1008 (TestDBconnection) - Start up failure. host localhost, status dbStartedFail
2021-06-02 14:44:33.283265 I [5681/5681] CoreContext mythcontext.cpp:1172 (UPnPautoconf) - UPNP Search 2 secs
2021-06-02 14:44:33.687044 I [5681/5681] CoreContext mythcontext.cpp:1187 (UPnPautoconf) - UPNP Search 1 secs
2021-06-02 14:44:33.992206 I [5681/5681] CoreContext mythcontext.cpp:1187 (UPnPautoconf) - UPNP Search 1 secs
2021-06-02 14:44:35.457619 I [5681/5681] CoreContext mythcontext.cpp:1198 (UPnPautoconf) - No UPnP backends found
2021-06-02 14:44:36.457906 C [5681/5681] CoreContext main.cpp:139 (main) - Failed to init MythContext.
2021-06-02 14:44:37.261229 I [5681/5681] CoreContext mythcontext.cpp:1665 (~MythContext) - Exiting
Last edited by linuxdvrfan on Jun 3rd, '21, 07:43, edited 3 times in total.
linuxdvrfan
 
Posts: 5
Joined: Jun 2nd, '21, 18:43

Re: Mythbackend service crashes due to missing credentials

Postby linuxdvrfan » Jun 2nd, '21, 20:51

Update; Here is a mythbackend log showing the error. This is taken from a virtual machine. This is a fresh install using the included Mageia 8 mc.sql. It was modified in the 2 lines to get around the password requirements. Mythtv-setup was run to setup primary ip address and a storage directory. Mythbackend does not crash if run as the normal user or as root. The crash below happens when doing service mythbackend start.

Code: Select all
2021-06-02 14:44:31.267683 C [5681/5681] thread_unknown mythcommandlineparser.cpp:2608 (ConfigureLogging) - mythbackend version: fixes/31.0 [31.0-20210323.1.1.mga8.tainted (aka v31.0-143-gdbac81)] www.mythtv.org
2021-06-02 14:44:31.267693 C [5681/5681] thread_unknown mythcommandlineparser.cpp:2612 (ConfigureLogging) - Qt version: compile: 5.15.2, runtime: 5.15.2
2021-06-02 14:44:31.267710 I [5681/5681] thread_unknown mythcommandlineparser.cpp:2614 (ConfigureLogging) - Mageia 8 (x86_64)
2021-06-02 14:44:31.267713 N [5681/5681] thread_unknown mythcommandlineparser.cpp:2616 (ConfigureLogging) - Enabled verbose msgs:  general
2021-06-02 14:44:31.267771 N [5681/5681] thread_unknown logging.cpp:724 (logStart) - Setting Log Level to LOG_INFO
2021-06-02 14:44:31.278089 I [5681/5687] Logger logging.cpp:280 (run) - Added logging to the console
2021-06-02 14:44:31.278264 I [5681/5681] thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) - Setup Interrupt handler
2021-06-02 14:44:31.278269 I [5681/5681] thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) - Setup Terminated handler
2021-06-02 14:44:31.278271 I [5681/5681] thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) - Setup Segmentation fault handler
2021-06-02 14:44:31.278274 I [5681/5681] thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) - Setup Aborted handler
2021-06-02 14:44:31.278279 I [5681/5681] thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) - Setup Bus error handler
2021-06-02 14:44:31.278281 I [5681/5681] thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) - Setup Floating point exception handler
2021-06-02 14:44:31.278284 I [5681/5681] thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) - Setup Illegal instruction handler
2021-06-02 14:44:31.278287 I [5681/5681] thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) - Setup Real-time signal 0 handler
2021-06-02 14:44:31.278291 I [5681/5681] thread_unknown signalhandling.cpp:191 (SetHandlerPrivate) - Setup Hangup handler
2021-06-02 14:44:31.278321 N [5681/5681] thread_unknown mythdirs.cpp:37 (InitializeMythDirs) - Read conf dir = /var/lib/mythtv
2021-06-02 14:44:31.278369 N [5681/5681] thread_unknown mythdirs.cpp:203 (InitializeMythDirs) - Using runtime prefix = /usr
2021-06-02 14:44:31.278370 N [5681/5681] thread_unknown mythdirs.cpp:204 (InitializeMythDirs) - Using configuration directory = /var/lib/mythtv
2021-06-02 14:44:31.278394 I [5681/5681] CoreContext mythcorecontext.cpp:284 (Init) - Assumed character encoding: en_US.UTF-8
2021-06-02 14:44:31.278467 E [5681/5681] CoreContext mythdbparams.cpp:43 (IsValid) - DBHostName is not set in config.xml
2021-06-02 14:44:31.278473 E [5681/5681] CoreContext mythdbparams.cpp:43 (IsValid) - DBHostName is not set in config.xml
2021-06-02 14:44:31.278482 I [5681/5681] CoreContext mythcontext.cpp:629 (LoadDatabaseSettings) - Empty LocalHostName. This is typical.
2021-06-02 14:44:31.278485 I [5681/5681] CoreContext mythcontext.cpp:636 (LoadDatabaseSettings) - Using a profile name of: 'localhost' (Usually the same as this host's name.)
2021-06-02 14:44:31.278514 I [5681/5681] CoreContext mythcontext.cpp:885 (TestDBconnection) - Start up testing connections. DB localhost, BE , attempt 0, status dbAwake, Delay: 2000
2021-06-02 14:44:31.279252 I [5681/5686] LogForward loggingserver.cpp:128 (FileLogger) - Added logging to /var/log/mythtv/mythbackend.20210602184431.5681.log
2021-06-02 14:44:32.282919 E [5681/5681] CoreContext mythdbcon.cpp:235 (OpenDatabase) - [DBManager0] Unable to connect to database!
2021-06-02 14:44:32.282940 E [5681/5681] CoreContext mythdbcon.cpp:236 (OpenDatabase) - Driver error was [1/1045]:
QMYSQL: Unable to connect
Database error was:
Access denied for user 'mythtv'@'localhost' (using password: YES)

2021-06-02 14:44:33.283234 I [5681/5681] CoreContext mythcontext.cpp:1008 (TestDBconnection) - Start up failure. host localhost, status dbStartedFail
2021-06-02 14:44:33.283265 I [5681/5681] CoreContext mythcontext.cpp:1172 (UPnPautoconf) - UPNP Search 2 secs
2021-06-02 14:44:33.687044 I [5681/5681] CoreContext mythcontext.cpp:1187 (UPnPautoconf) - UPNP Search 1 secs
2021-06-02 14:44:33.992206 I [5681/5681] CoreContext mythcontext.cpp:1187 (UPnPautoconf) - UPNP Search 1 secs
2021-06-02 14:44:35.457619 I [5681/5681] CoreContext mythcontext.cpp:1198 (UPnPautoconf) - No UPnP backends found
2021-06-02 14:44:36.457906 C [5681/5681] CoreContext main.cpp:139 (main) - Failed to init MythContext.
2021-06-02 14:44:37.261229 I [5681/5681] CoreContext mythcontext.cpp:1665 (~MythContext) - Exiting
linuxdvrfan
 
Posts: 5
Joined: Jun 2nd, '21, 18:43

Re: Mythbackend service crashes due to missing credentials

Postby doktor5000 » Jun 2nd, '21, 22:13

If you have some questions, at least restructure your post and put the actual questions in a separate post. Sorry but that's too much of a wall of text.

And yes, Mageia 7 is basically end of life as of May 31, 2021 - there might be a few updates here and there if maintainers feel like still pushing them, but most will only be available for Mageia 8, cf. http://advisories.mageia.org/
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Mythbackend service crashes due to missing credentials

Postby linuxdvrfan » Jun 2nd, '21, 22:18

Thank you for the Mageia 7 eol info. I will try to cleanup the post and keep it related to only the mythbackend service crash issue. I have edited the main post. I will post seperate topics for the other questions. Thank you!
linuxdvrfan
 
Posts: 5
Joined: Jun 2nd, '21, 18:43

Re: Mythbackend service crashes due to missing credentials

Postby doktor5000 » Jun 2nd, '21, 23:29

For the mythtv database user issue, have a look at https://bugs.mageia.org/show_bug.cgi?id=28289
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 17629
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Mythbackend service crashes due to missing credentials

Postby linuxdvrfan » Jun 2nd, '21, 23:39

Thank you! This looks very promising. I will report back.
linuxdvrfan
 
Posts: 5
Joined: Jun 2nd, '21, 18:43

Re: Mythbackend service crashes due to missing credentials

Postby benmc » Jun 3rd, '21, 06:22

doktor5000 wrote:Mageia 7 is basically end of life as of May 31, 2021


I understand it has been pushed (forward/back?) out to 30 June, 2021. (Re: [qa-discuss] Mageia 7 EOL Today or End of June?)

regards
benmc
 
Posts: 1175
Joined: Sep 2nd, '11, 12:45
Location: Pirongia, New Zealand

Re: Mythbackend service crashes due to missing credentials

Postby linuxdvrfan » Jun 3rd, '21, 07:42

Solved! Thank you all for your help! :D
The issue for me was no config.xml being created in /var/lib/mythtv . Creating that file with the correct database information worked.

I gathered bits of information from bug reports, forum posts, and the suggestions from above. Mageia is an awesome distro with awesome people. Thanks again!

Here is my own "errata" from today for fellow Mageians running myth. Please note I am sure if all this is "best practices".

Spoiler:
1) Modify /usr/share/mythtv/initialdb/mc.sql . Specifically lines 1 and 2. Change password 'mythtv' to something that will pass the security check.
Replace 0PasswordHere0!! with your own password of choice.
Code: Select all
CREATE USER IF NOT EXISTS 'mythtv'@'localhost' IDENTIFIED BY '0PasswordHere0!!';
ALTER USER 'mythtv'@'localhost' IDENTIFIED BY '0PasswordHere0!!';


Password Requirements
Code: Select all
For MySQL databases, to meet the minimum conditions required for a strong password, the password must contain at least:
    Nine characters
    Two uppercase letters
    Two lowercase letters
    Two numbers
    Two of the following allowed special characters:
      ‘ ~ ! @ # $ % ^ & * ( ) _ - + = { } [ ] / < > , . ; ? ' : | (space)
---


2) Setup the initial database
Code: Select all
mysql -uroot -p < /usr/share/mythtv/initialdb/mc.sql

3) Enable mysql time zones. Restart mysqld service after.
Code: Select all
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql


4) Comment out skip-networking in /etc/my.cnf. Restart mysqld.
Look for the line skip-networking. Change it to #skip-networking.

5) Either create a correct config.xml or run something like mythtv-setup to make one. Then place it in /var/lib/mythtv/.

Mythtv user "home" is found in /var/lib/mythtv/. But no config.xml file is created on mythbackend start up.
I copied the config.xml from my home directory. Replace username with your user name.
[url]cp /home/username/.mythtv/config.xml /var/lib/mythtv[/url]

6) Mythtv had to upgrade the database schema twice. It happened to me when using mythtv-setup.

This step stopped mythbackend from crashing for me.

mythbackend 2017 support thread https://forums.mageia.org/en/viewtopic.php?f=8&t=12088
password requirementshttps://bugs.mageia.org/show_bug.cgi?id=28289#c2
time zones https://www.mythtv.org/wiki/MySQL_Time_Zone_Tablesl
config.xml https://www.mythtv.org/wiki/Config.xml
linuxdvrfan
 
Posts: 5
Joined: Jun 2nd, '21, 18:43


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest

cron