[SOLVED] service Mythbackend can't start

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

[SOLVED] service Mythbackend can't start

Postby anp66 » Nov 2nd, '17, 18:06

Hi

I have problems starting the mythbackend service.

I have trayed to followed this steps in Bug 19127 - mythtv install problems (https://bugs.mageia.org/show_bug.cgi?id=19127).

The error I get is:
Access denied for user 'mythtv'@'localhost' (using password: YES)

What am I doing wrong/missing ?
Hope someone can "take my hand" and guide me in the right direction :-)

Best regards
Anders


This is what I am doing:
Code: Select all
[anders@localhost initialdb]$ pwd
/usr/share/mythtv/initialdb
[anders@localhost initialdb]$ ls -l
total 4
-rw-r--r-- 1 root root 338 Nov  2 16:32 mc.sql


Code: Select all
[anders@localhost initialdb]$ [b]cat mc.sql [/b]

CREATE DATABASE IF NOT EXISTS mythconverg;
GRANT ALL ON mythconverg.* TO mythtv@127.0.0.1 IDENTIFIED BY "mythtv_Password";
FLUSH PRIVILEGES;
GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv@127.0.0.1 IDENTIFIED BY "mythtv_Password";
FLUSH PRIVILEGES;
ALTER DATABASE mythconverg DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;


Code: Select all
[anders@localhost initialdb]$ [b]mysql -u root -p < mc.sql[/b]
Enter password:
[anders@localhost initialdb]$

Code: Select all
[anders@localhost initialdb]$ ls -l /etc/systemd/system/mythbackend.service.d/local.conf
-rw-r--r-- 1 root root 91 Nov  2 08:20 /etc/systemd/system/mythbackend.service.d/local.conf

Code: Select all
[anders@localhost initialdb]$ [b]cat /etc/systemd/system/mythbackend.service.d/local.conf[/b]
[Service]
Environment=MYTHTV_HOME=/var/lib/mythtv
Environment=MYTHCONFDIR=/var/lib/mythtv



Code: Select all
[anders@localhost mythtv]$ pwd
/var/log/mythtv
[anders@localhost mythtv]$ [b]systemctl start mythbackend[/b]


Code: Select all
[anders@localhost mythtv]$ [b]cat mythbackend.20171102154925.11790.log[/b]

2017-11-02 16:49:25.913063 C [11790/11790] thread_unknown mythcommandlineparser.cpp:2599 (ConfigureLogging) - mythbackend version: fixes/0.28.1 [0.28.1-20170528.6.mga6.tainted (aka v0.28.1-23-gaf9826)] http://www.mythtv.org
2017-11-02 16:49:25.913074 C [11790/11790] thread_unknown mythcommandlineparser.cpp:2601 (ConfigureLogging) - Qt version: compile: 5.6.2, runtime: 5.6.2
2017-11-02 16:49:25.913075 N [11790/11790] thread_unknown mythcommandlineparser.cpp:2603 (ConfigureLogging) - Enabled verbose msgs:  general
2017-11-02 16:49:25.913114 N [11790/11790] thread_unknown logging.cpp:920 (logStart) - Setting Log Level to LOG_INFO
2017-11-02 16:49:25.923549 I [11790/11796] Logger logging.cpp:313 (run) - Added logging to the console
2017-11-02 16:49:25.923738 I [11790/11790] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Interrupt handler
2017-11-02 16:49:25.923742 I [11790/11790] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Terminated handler
2017-11-02 16:49:25.923745 I [11790/11790] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Segmentation fault handler
2017-11-02 16:49:25.923748 I [11790/11790] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Aborted handler
2017-11-02 16:49:25.923751 I [11790/11790] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Bus error handler
2017-11-02 16:49:25.923754 I [11790/11790] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Floating point exception handler
2017-11-02 16:49:25.923756 I [11790/11790] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Illegal instruction handler
2017-11-02 16:49:25.923761 I [11790/11790] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Real-time signal 0 handler
2017-11-02 16:49:25.923764 I [11790/11790] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Hangup handler
2017-11-02 16:49:25.923779 N [11790/11790] thread_unknown mythdirs.cpp:33 (InitializeMythDirs) - Read conf dir = /var/lib/mythtv
2017-11-02 16:49:25.923791 N [11790/11790] thread_unknown mythdirs.cpp:192 (InitializeMythDirs) - Using runtime prefix = /usr
2017-11-02 16:49:25.923793 N [11790/11790] thread_unknown mythdirs.cpp:194 (InitializeMythDirs) - Using configuration directory = /var/lib/mythtv
2017-11-02 16:49:25.923820 I [11790/11790] CoreContext mythcorecontext.cpp:266 (Init) - Assumed character encoding: en_DK.UTF-8
2017-11-02 16:49:25.923876 E [11790/11790] CoreContext mythdbparams.cpp:39 (IsValid) - DBHostName is not set in config.xml
2017-11-02 16:49:25.923885 E [11790/11790] CoreContext mythdbparams.cpp:39 (IsValid) - DBHostName is not set in config.xml
2017-11-02 16:49:25.923892 N [11790/11790] CoreContext mythcontext.cpp:505 (LoadDatabaseSettings) - Empty LocalHostName.
2017-11-02 16:49:25.923894 I [11790/11790] CoreContext mythcontext.cpp:513 (LoadDatabaseSettings) - Using localhost value of localhost
2017-11-02 16:49:25.928397 E [11790/11790] CoreContext mythdbcon.cpp:229 (OpenDatabase) - [DBManager0] Unable to connect to database!
2017-11-02 16:49:25.928410 E [11790/11790] CoreContext mythdbcon.cpp:230 (OpenDatabase) - Driver error was [1/1045]:
QMYSQL: Unable to connect
Database error was:
[b]Access denied for user 'mythtv'@'localhost' (using password: YES)[/b]

2017-11-02 16:49:25.928426 I [11790/11790] CoreContext mythcontext.cpp:809 (UPnPautoconf) - UPNP Search 2 secs
2017-11-02 16:49:26.023909 I [11790/11795] LogForward loggingserver.cpp:142 (FileLogger) - Added logging to /var/log/mythtv/mythbackend.20171102154925.11790.log
2017-11-02 16:49:26.283376 I [11790/11790] CoreContext mythcontext.cpp:824 (UPnPautoconf) - UPNP Search 1 secs
2017-11-02 16:49:26.605826 I [11790/11790] CoreContext mythcontext.cpp:824 (UPnPautoconf) - UPNP Search 1 secs
2017-11-02 16:49:28.055551 I [11790/11790] CoreContext mythcontext.cpp:834 (UPnPautoconf) - No UPnP backends found
2017-11-02 16:49:28.055608 C [11790/11790] CoreContext main.cpp:132 (main) - Failed to init MythContext.
[anders@localhost mythtv]$
Last edited by anp66 on Nov 4th, '17, 11:57, edited 4 times in total.
anp66
 
Posts: 34
Joined: Jul 18th, '17, 23:49

Re: service Mythbackend can't start

Postby wintpe » Nov 2nd, '17, 18:24

not sure of your linux knowlage

but linux does not have the concept that users are also administrators.

theres only one admin, thats root

su -
password:enterrootpassword
[root@localhost mythtv]$ systemctl start mythbackend


root can do anything including trash your system, so use it sparingly

so only use root for starting and stopping processes or creating users etc.

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: service Mythbackend can't start

Postby anp66 » Nov 2nd, '17, 20:10

Hi Peter

Thanks for your advice.

I started the service as user root, but the result is still the same when looking in the log file:
Access denied for user 'mythtv'@'localhost' (using password: YES)

Best regards
Anders
anp66
 
Posts: 34
Joined: Jul 18th, '17, 23:49

Re: service Mythbackend can't start

Postby bittwister » Nov 3rd, '17, 13:32

anp66 wrote:Hi

I have problems starting the mythbackend service.

I have trayed to followed this steps in Bug 19127 - mythtv install problems (https://bugs.mageia.org/show_bug.cgi?id=19127).

The error I get is:
Access denied for user 'mythtv'@'localhost' (using password: YES)

What am I doing wrong/missing ?


First guess you missed setting the new mythtv password in one of the files.
/usr/share/mythtv/initialdb/mc.sql
/var/lib/mythtv/config.xml

Users:
$HOME/.mythtv/config.xml

Once those are set, I have to guess the local host mysql root database admin password must be set to a password which will pass the new password requirement/test.

What I do is create /var/lib/mysql/mysql-init with the new database root password. Sequence is as follows:
Code: Select all
      systemctl stop mythbackend
      systemctl stop mysqld
      pkill --signal  SIGTERM -f mysqld
      rm -f /var/log/mysqld/*
      echo "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('new_root_pw_here');" > /var/lib/mysql/mysql-init
      echo "-- ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_root_pw_here';" >> /var/lib/mysql/mysql-init
      echo "flush privileges;" >> /var/lib/mysql/mysql-init
      chmod 600 /var/lib/mysql/mysql-init
      chown mysql:mysql /var/lib/mysql/mysql-init
      mysqld_safe --init-file=/var/lib/mysql/mysql-init &
      cat /var/log/mysqld/*
      rm -f /var/lib/mysql/mysql-init
      pkill --signal  SIGTERM -f mysqld
     rm -f /var/log/mysqld/*
     systemctl start mysqld


Now you can go back to the mythtv install.
bittwister
 
Posts: 47
Joined: Oct 5th, '13, 21:48

Re: service Mythbackend can't start

Postby anp66 » Nov 3rd, '17, 15:25

Hi Bittwister

Thank You wery mutch for your quick answer !

I still got the same error:
Access denied for user 'mythtv'@'localhost' (using password: YES)

Is it correct that I use 127.0.0.1 instead of localhost ?

Here are the files you mentioned:

Code: Select all
[anders@localhost mythtv]$ ls -l /usr/share/mythtv/initialdb/mc.sql
-rw-r--r-- 1 root root 324 Nov  3 07:26 /usr/share/mythtv/initialdb/mc.sql

[anders@localhost mythtv]$ cat /usr/share/mythtv/initialdb/mc.sql
CREATE DATABASE IF NOT EXISTS mythconverg;
GRANT ALL ON mythconverg.* TO mythtv@127.0.0.1 IDENTIFIED BY "????????";
FLUSH PRIVILEGES;
GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv@127.0.0.1 IDENTIFIED BY "????????";
FLUSH PRIVILEGES;
ALTER DATABASE mythconverg DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
[anders@localhost mythtv]$ ls -l /var/lib/mythtv/config.xml
-rw-r--r-- 1 mythtv mythtv 554 Nov  3 08:31 /var/lib/mythtv/config.xml
[anders@localhost mythtv]$ cat /var/lib/mythtv/config.xml
<Configuration>
  <LocalHostName>my-unique-identifier-goes-here</LocalHostName>
  <Database>
    <PingHost>1</PingHost>
    <Host>127.0.0.1</Host>
    <DBHostName>127.0.0.1</DBHostName>
    <UserName>mythtv</UserName>
    <Password>????????</Password>
    <DatabaseName>mythconverg</DatabaseName>
    <Port>3306</Port>
  </Database>
  <WakeOnLAN>
    <Enabled>0</Enabled>
    <SQLReconnectWaitTime>0</SQLReconnectWaitTime>
    <SQLConnectRetry>5</SQLConnectRetry>
    <Command>echo 'WOLsqlServerCommand not set'</Command>
  </WakeOnLAN>
</Configuration>



Code: Select all
[anders@localhost mythtv]$ ls -l /var/lib/mythtv/config.xml
-rw-r--r-- 1 mythtv mythtv 554 Nov  3 08:31 /var/lib/mythtv/config.xml
[anders@localhost mythtv]$ cat /var/lib/mythtv/config.xml
<Configuration>
  <LocalHostName>my-unique-identifier-goes-here</LocalHostName>
  <Database>
    <PingHost>1</PingHost>
    <Host>127.0.0.1</Host>
    <DBHostName>127.0.0.1</DBHostName>
    <UserName>mythtv</UserName>
    <Password>????????</Password>
    <DatabaseName>mythconverg</DatabaseName>
    <Port>3306</Port>
  </Database>
  <WakeOnLAN>
    <Enabled>0</Enabled>
    <SQLReconnectWaitTime>0</SQLReconnectWaitTime>
    <SQLConnectRetry>5</SQLConnectRetry>
    <Command>echo 'WOLsqlServerCommand not set'</Command>
  </WakeOnLAN>
</Configuration>






Code: Select all
[anders@localhost mythtv]$ ls -l $HOME/.mythtv/config.xml
-rw-r--r-- 1 anders anders 554 Nov  3 10:24 /home/anders/.mythtv/config.xml

[anders@localhost mythtv]$ cat $HOME/.mythtv/config.xml
<Configuration>
  <LocalHostName>my-unique-identifier-goes-here</LocalHostName>
  <Database>
    <PingHost>1</PingHost>
    <Host>127.0.0.1</Host>
    <DBHostName>127.0.0.1</DBHostName>
    <UserName>mythtv</UserName>
    <Password>????????</Password>
    <DatabaseName>mythconverg</DatabaseName>
    <Port>3306</Port>
  </Database>
  <WakeOnLAN>
    <Enabled>0</Enabled>
    <SQLReconnectWaitTime>0</SQLReconnectWaitTime>
    <SQLConnectRetry>5</SQLConnectRetry>
    <Command>echo 'WOLsqlServerCommand not set'</Command>
  </WakeOnLAN>
</Configuration>


Here is what I then did, as user root:

Code: Select all
[root@localhost mythtv]# systemctl stop mythbackend
[root@localhost mythtv]# systemctl stop mysqld
[root@localhost mythtv]# pkill --signal  SIGTERM -f mysqld
[root@localhost mythtv]# rm -f /var/log/mysqld/*
[root@localhost mythtv]# echo "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('????????');" > /var/lib/mysql/mysql-init
[root@localhost mythtv]# echo "-- ALTER USER 'root'@'localhost' IDENTIFIED BY '????????';" >> /var/lib/mysql/mysql-init
[root@localhost mythtv]# echo "flush privileges;" >> /var/lib/mysql/mysql-init
[root@localhost mythtv]# chmod 600 /var/lib/mysql/mysql-init
[root@localhost mythtv]# chown mysql:mysql /var/lib/mysql/mysql-init


Code: Select all
[root@localhost mythtv]# mysqld_safe --init-file=/var/lib/mysql/mysql-init &
[1] 6245
[root@localhost mythtv]# 171103 13:43:04 mysqld_safe Logging to '/var/log/mysqld/mysqld.log'.
171103 13:43:04 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql


Code: Select all
[root@localhost mythtv]# cat /var/log/mysqld/*
171103 13:43:04 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2017-11-03 13:43:04 140041410930752 [Note] Using unique option prefix 'key_buffer' is error-prone and can break in the future. Please use the full name 'key_buffer_size' instead.
2017-11-03 13:43:04 140041410930752 [Note] /usr/sbin/mysqld (mysqld 10.1.28-MariaDB) starting as process 6449 ...
handlersocket: initialized
2017-11-03 13:43:04 140041410930752 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.
2017-11-03 13:43:04 140041410930752 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2017-11-03 13:43:04 140041410930752 [Note] InnoDB: The InnoDB memory heap is disabled
2017-11-03 13:43:04 140041410930752 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-11-03 13:43:04 140041410930752 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2017-11-03 13:43:04 140041410930752 [Note] InnoDB: Compressed tables use zlib 1.2.11
2017-11-03 13:43:04 140041410930752 [Note] InnoDB: Using Linux native AIO
2017-11-03 13:43:04 140041410930752 [Note] InnoDB: Using SSE crc32 instructions
2017-11-03 13:43:04 140041410930752 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2017-11-03 13:43:04 140041410930752 [Note] InnoDB: Completed initialization of buffer pool
2017-11-03 13:43:05 140041410930752 [Note] InnoDB: Highest supported file format is Barracuda.
2017-11-03 13:43:05 140041410930752 [Note] InnoDB: 128 rollback segment(s) are active.
2017-11-03 13:43:05 140041410930752 [Note] InnoDB: Waiting for purge to start
2017-11-03 13:43:05 140041410930752 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.36-82.2 started; log sequence number 1617115
2017-11-03 13:43:05 140040728475392 [Note] InnoDB: Dumping buffer pool(s) not yet started
2017-11-03 13:43:05 140041410930752 [Warning] mysqld: GSSAPI plugin : default principal 'mariadb/localhost@' not found in keytab
2017-11-03 13:43:05 140041410930752 [ERROR] mysqld: Server GSSAPI error (major 851968, minor 2529639093) : gss_acquire_cred failed -Unspecified GSS failure.  Minor code may provide more information. Keytab FILE:/etc/krb5.keytab is nonexistent or empty.
2017-11-03 13:43:05 140041410930752 [ERROR] Plugin 'gssapi' init function returned error.
171103 13:43:05 server_audit: MariaDB Audit Plugin version 1.4.2 STARTED.
171103 13:43:05 server_audit: Query cache is enabled with the TABLE events. Some table reads can be veiled.2017-11-03 13:43:05 140041410930752 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.1.28-MariaDB'  socket: '/var/lib/mysql/mysql.sock'  port: 0  Mageia MariaDB Server


Code: Select all
[root@localhost mythtv]# rm -f /var/lib/mysql/mysql-init
[root@localhost mythtv]# pkill --signal  SIGTERM -f mysqld
[root@localhost mythtv]# rm -f /var/log/mysqld/*
[1]+  Done                    mysqld_safe --init-file=/var/lib/mysql/mysql-init

[root@localhost mythtv]# systemctl start mysqld
[root@localhost mythtv]# systemctl start mythbackend


Code: Select all
[root@localhost mythtv]# pwd
/var/log/mythtv
[root@localhost mythtv]# ls -alrt
total 68
-rw-r--r--  1 mythtv mythtv 3967 Oct 25 20:08 mythbackend.20171025180854.2213.log
-rw-r--r--  1 mythtv mythtv 4076 Oct 26 23:46 mythbackend.20171026214649.2315.log
-rw-r--r--  1 mythtv mythtv 3967 Nov  2 07:41 mythbackend.20171102064105.2180.log
-rw-r--r--  1 mythtv mythtv 4076 Nov  2 08:25 mythbackend.20171102072550.6575.log
-rw-r--r--  1 mythtv mythtv 3961 Nov  2 08:29 mythbackend.20171102072923.7247.log
-rw-r--r--  1 mythtv mythtv 4070 Nov  2 08:50 mythbackend.20171102075045.9733.log
-rw-r--r--  1 mythtv mythtv 3961 Nov  2 16:28 mythbackend.20171102152828.8957.log
-rw-r--r--  1 mythtv mythtv 4022 Nov  2 16:31 mythbackend.20171102153136.10271.log
-rw-r--r--  1 mythtv mythtv 4022 Nov  2 16:49 mythbackend.20171102154925.11790.log
-rw-r--r--  1 mythtv mythtv 4133 Nov  2 18:04 mythbackend.20171102170403.15144.log
drwxr-xr-x 17 root   root   4096 Nov  3 04:02 ../
-rw-r--r--  1 mythtv mythtv 4022 Nov  3 08:00 mythbackend.20171103070037.21164.log
-rw-r--r--  1 mythtv mythtv 3328 Nov  3 08:37 mythbackend.20171103073727.23392.log
-rw-r--r--  1 mythtv mythtv 3328 Nov  3 10:12 mythbackend.20171103091220.28101.log
-rw-r--r--  1 mythtv mythtv 3279 Nov  3 13:46 mythbackend.20171103124600.6675.log
drwxr-xr-x  2 mythtv mythtv 4096 Nov  3 13:46 ./

[root@localhost mythtv]# cat mythbackend.20171103124600.6675.log
2017-11-03 13:46:00.349346 C [6675/6675] thread_unknown mythcommandlineparser.cpp:2599 (ConfigureLogging) - mythbackend version: fixes/0.28.1 [0.28.1-20170528.6.mga6.tainted (aka v0.28.1-23-gaf9826)] www.mythtv.org
2017-11-03 13:46:00.349355 C [6675/6675] thread_unknown mythcommandlineparser.cpp:2601 (ConfigureLogging) - Qt version: compile: 5.6.2, runtime: 5.6.2
2017-11-03 13:46:00.349357 N [6675/6675] thread_unknown mythcommandlineparser.cpp:2603 (ConfigureLogging) - Enabled verbose msgs:  general
2017-11-03 13:46:00.349391 N [6675/6675] thread_unknown logging.cpp:920 (logStart) - Setting Log Level to LOG_INFO
2017-11-03 13:46:00.359852 I [6675/6681] Logger logging.cpp:313 (run) - Added logging to the console
2017-11-03 13:46:00.360053 I [6675/6675] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Interrupt handler
2017-11-03 13:46:00.360057 I [6675/6675] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Terminated handler
2017-11-03 13:46:00.360060 I [6675/6675] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Segmentation fault handler
2017-11-03 13:46:00.360062 I [6675/6675] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Aborted handler
2017-11-03 13:46:00.360067 I [6675/6675] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Bus error handler
2017-11-03 13:46:00.360070 I [6675/6675] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Floating point exception handler
2017-11-03 13:46:00.360073 I [6675/6675] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Illegal instruction handler
2017-11-03 13:46:00.360076 I [6675/6675] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Real-time signal 0 handler
2017-11-03 13:46:00.360080 I [6675/6675] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Hangup handler
2017-11-03 13:46:00.360093 N [6675/6675] thread_unknown mythdirs.cpp:33 (InitializeMythDirs) - Read conf dir = /var/lib/mythtv
2017-11-03 13:46:00.360105 N [6675/6675] thread_unknown mythdirs.cpp:192 (InitializeMythDirs) - Using runtime prefix = /usr
2017-11-03 13:46:00.360106 N [6675/6675] thread_unknown mythdirs.cpp:194 (InitializeMythDirs) - Using configuration directory = /var/lib/mythtv
2017-11-03 13:46:00.360133 I [6675/6675] CoreContext mythcorecontext.cpp:266 (Init) - Assumed character encoding: en_DK.UTF-8
2017-11-03 13:46:00.360261 N [6675/6675] CoreContext mythcontext.cpp:505 (LoadDatabaseSettings) - Empty LocalHostName.
2017-11-03 13:46:00.360264 I [6675/6675] CoreContext mythcontext.cpp:513 (LoadDatabaseSettings) - Using localhost value of localhost
2017-11-03 13:46:00.364578 E [6675/6675] CoreContext mythdbcon.cpp:229 (OpenDatabase) - [DBManager0] Unable to connect to database!
2017-11-03 13:46:00.364589 E [6675/6675] CoreContext mythdbcon.cpp:230 (OpenDatabase) - Driver error was [1/1045]:
QMYSQL: Unable to connect
Database error was:
Access denied for user 'mythtv'@'localhost' (using password: YES)

2017-11-03 13:46:00.364668 C [6675/6675] CoreContext main.cpp:132 (main) - Failed to init MythContext.
2017-11-03 13:46:00.460192 I [6675/6680] LogForward loggingserver.cpp:142 (FileLogger) - Added logging to /var/log/mythtv/mythbackend.20171103124600.6675.log


Code: Select all
[root@localhost mythtv]# mythtv-setup
Gtk-Message: Failed to load module "canberra-gtk-module"
Gtk-Message: Failed to load module "canberra-gtk-module"
Qt: Session management error: None of the authentication protocols specified are supported
2017-11-03 13:49:06.047018 I  Setup Interrupt handler
2017-11-03 13:49:06.047028 I  Setup Terminated handler
2017-11-03 13:49:06.047032 I  Setup Segmentation fault handler
2017-11-03 13:49:06.047035 I  Setup Aborted handler
2017-11-03 13:49:06.047038 I  Setup Bus error handler
2017-11-03 13:49:06.047041 I  Setup Floating point exception handler
2017-11-03 13:49:06.047044 I  Setup Illegal instruction handler
2017-11-03 13:49:06.047048 I  Setup Real-time signal 0 handler
2017-11-03 13:49:06.047051 I  Setup Hangup handler
2017-11-03 13:49:06.047104 C  mythtv-setup version: fixes/0.28.1 [0.28.1-20170528.6.mga6.tainted (aka v0.28.1-23-gaf9826)] www.mythtv.org
2017-11-03 13:49:06.047107 C  Qt version: compile: 5.6.2, runtime: 5.6.2
2017-11-03 13:49:06.047108 N  Enabled verbose msgs:  general
2017-11-03 13:49:06.047114 N  Setting Log Level to LOG_INFO
2017-11-03 13:49:06.057550 I  Added logging to the console
2017-11-03 13:49:06.256367 N  Using runtime prefix = /usr
2017-11-03 13:49:06.256370 N  Using configuration directory = /root/.mythtv
2017-11-03 13:49:06.256405 I  Assumed character encoding: en_DK.UTF-8
2017-11-03 13:49:06.256621 N  Empty LocalHostName.
2017-11-03 13:49:06.256624 I  Using localhost value of localhost
libcec.so.4: cannot open shared object file: No such file or directory
2017-11-03 13:49:06.261024 E  [DBManager0] Unable to connect to database!
2017-11-03 13:49:06.261033 E  Driver error was [1/1045]:
QMYSQL: Unable to connect
Database error was:
Access denied for user 'mythtv'@'localhost' (using password: YES)

2017-11-03 13:49:06.278396 N  Desktop video mode: 1920x1080 60.000 Hz
2017-11-03 13:49:06.350808 E  LIRC: Failed to connect to Unix socket '/var/run/lirc/lircd'
         eno: Connection refused (111)
2017-11-03 13:49:06.350819 I  No joystick configuration found, not enabling joystick control
2017-11-03 13:49:06.350919 E  CECAdapter: Failed to load libcec.
2017-11-03 13:49:06.350932 I  UDPListener: Enabling
2017-11-03 13:49:06.351134 I  Binding to UDP 127.0.0.1:0
2017-11-03 13:49:06.351152 I  Binding to UDP 192.168.1.15:0
2017-11-03 13:49:06.351169 I  Binding to UDP [::1]:0
2017-11-03 13:49:06.351211 I  Binding to UDP [fe80::724d:7bff:fea4:fd24%enp4s0]:0
2017-11-03 13:49:06.351230 I  Binding to UDP 192.168.1.255:0
2017-11-03 13:49:06.361731 I  Using Frameless Window
2017-11-03 13:49:06.361733 I  Using Full Screen Window
2017-11-03 13:49:06.368617 I  UI Screen Resolution: 1920 x 1080
2017-11-03 13:49:06.372449 I  Using the Qt painter
2017-11-03 13:49:06.393921 N  Setting QT default locale to en_US
2017-11-03 13:49:06.499659 I  MythUIWebBrowser: Loading css from - file:///usr/share/mythtv/themes/default/htmls/mythbrowser.css
2017-11-03 13:49:06.502675 I  MythUIWebBrowser: enabling plugins
2017-11-03 13:49:06.648776 I  System Locale (en_US), Country (US), Language (en)
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::begin: Paint device returned engine == 0, type: 3
2017-11-03 13:49:19.539962 E  MythPainter::GetImageFromTextLayout: Invalid canvas.
2017-11-03 13:49:19.550394 E  MythPainter::GetImageFromTextLayout: Invalid canvas.
2017-11-03 13:49:19.578272 E  MythPainter::GetImageFromTextLayout: Invalid canvas.
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::begin: Paint device returned engine == 0, type: 3
2017-11-03 13:49:19.593845 E  MythPainter::GetImageFromTextLayout: Invalid canvas.
2017-11-03 13:49:19.607565 E  MythPainter::GetImageFromTextLayout: Invalid canvas.
2017-11-03 13:49:19.621595 E  MythPainter::GetImageFromTextLayout: Invalid canvas.
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::begin: Paint device returned engine == 0, type: 3
2017-11-03 13:49:19.946249 E  MythPainter::GetImageFromTextLayout: Invalid canvas.
2017-11-03 13:49:19.960499 E  MythPainter::GetImageFromTextLayout: Invalid canvas.
2017-11-03 13:49:29.681300 E  Error Loading en_us translation for module mythfrontend
libcec.so.4: cannot open shared object file: No such file or directory
2017-11-03 13:50:03.642708 E  [DBManager1] Unable to connect to database!
2017-11-03 13:50:03.642715 E  Driver error was [1/1045]:
QMYSQL: Unable to connect
Database error was:
Access denied for user 'mythtv'@'localhost' (using password: YES)

2017-11-03 13:50:03.642724 A  Cannot login to database
2017-11-03 13:50:03.644610 E  LIRC: Failed to connect to Unix socket '/var/run/lirc/lircd'
         eno: Connection refused (111)
2017-11-03 13:50:03.644620 I  No joystick configuration found, not enabling joystick control
2017-11-03 13:50:03.644726 E  CECAdapter: Failed to load libcec.
2017-11-03 13:50:03.644732 I  UDPListener: Enabling
2017-11-03 13:50:03.644804 I  Binding to UDP 127.0.0.1:0
2017-11-03 13:50:03.644819 I  Binding to UDP 192.168.1.15:0
2017-11-03 13:50:03.644835 I  Binding to UDP [::1]:0
2017-11-03 13:50:03.644859 I  Binding to UDP [fe80::724d:7bff:fea4:fd24%enp4s0]:0
2017-11-03 13:50:03.644878 I  Binding to UDP 192.168.1.255:0
2017-11-03 13:50:03.655403 I  Using Frameless Window
2017-11-03 13:50:03.655406 I  Using Full Screen Window
2017-11-03 13:50:03.656618 I  UI Screen Resolution: 1920 x 1080
2017-11-03 13:50:03.656932 I  Using the Qt painter
2017-11-03 13:50:03.697784 I  MythUIWebBrowser: Loading css from - file:///usr/share/mythtv/themes/default/htmls/mythbrowser.css
2017-11-03 13:50:03.699897 I  MythUIWebBrowser: enabling plugins
2017-11-03 13:50:03.823323 I  System Locale (en_US), Country (US), Language (en)
2017-11-03 13:50:07.336839 E  Error Loading en_us translation for module mythfrontend
2017-11-03 13:50:13.329106 A  User cancelled database configuration
2017-11-03 13:50:13.334440 E  Failed to init MythContext, exiting.


Code: Select all
[root@localhost mythtv]# mythbackend -v

Cannot login to database

Would you like to configure the database connection now? [no]  2017-11-03 13:51:34.296964 C  mythbackend version: fixes/0.28.1 [0.28.1-20170528.6.mga6.tainted (aka v0.28.1-23-gaf9826)] www.mythtv.org
2017-11-03 13:51:34.296973 C  Qt version: compile: 5.6.2, runtime: 5.6.2
2017-11-03 13:51:34.296974 N  Enabled verbose msgs:  general
2017-11-03 13:51:34.296979 N  Setting Log Level to LOG_INFO
2017-11-03 13:51:34.307447 I  Added logging to the console
2017-11-03 13:51:34.307664 I  Setup Interrupt handler
2017-11-03 13:51:34.307668 I  Setup Terminated handler
2017-11-03 13:51:34.307671 I  Setup Segmentation fault handler
2017-11-03 13:51:34.307674 I  Setup Aborted handler
2017-11-03 13:51:34.307676 I  Setup Bus error handler
2017-11-03 13:51:34.307679 I  Setup Floating point exception handler
2017-11-03 13:51:34.307682 I  Setup Illegal instruction handler
2017-11-03 13:51:34.307685 I  Setup Real-time signal 0 handler
2017-11-03 13:51:34.307689 I  Setup Hangup handler
2017-11-03 13:51:34.307711 N  Using runtime prefix = /usr
2017-11-03 13:51:34.307713 N  Using configuration directory = /root/.mythtv
2017-11-03 13:51:34.307739 I  Assumed character encoding: en_DK.UTF-8
2017-11-03 13:51:34.307862 N  Empty LocalHostName.
2017-11-03 13:51:34.307864 I  Using localhost value of localhost
2017-11-03 13:51:34.312242 E  [DBManager0] Unable to connect to database!
2017-11-03 13:51:34.312266 E  Driver error was [1/1045]:
QMYSQL: Unable to connect
Database error was:
Access denied for user 'mythtv'@'localhost' (using password: YES)

^C^X^Z
[1]+  Stopped                 mythbackend -v
[root@localhost mythtv]#
anp66
 
Posts: 34
Joined: Jul 18th, '17, 23:49

Re: service Mythbackend can't start

Postby bittwister » Nov 3rd, '17, 22:35

anp66 wrote:Hi

I have problems starting the mythbackend service.

I have trayed to followed this steps in Bug 19127 - mythtv install problems (https://bugs.mageia.org/show_bug.cgi?id=19127).

The error I get is:
Access denied for user 'mythtv'@'localhost' (using password: YES)

What am I doing wrong/missing ?


Code: Select all

Looking through the logs and password scripts, I notice you are not consistent with the node name. In the database it matters and 217.0.0.1 and localhost are two different users. Either change your commands or add all the node names needed to the database.

It also matters that you have set the password for that entry.. On a clean install, there is no password, and I will guess providing a password will fail if the entry is set  to not require one. Here is my setup at the moment.
[code]
$ mysql --user=root mysql
SELECT User, Host, Password FROM mysql.user;
+------+--------------+-------------+
| User | Host          | Password |
+------+-----------------+----------+
| root | localhost        |             |
| root | wb.home.test |            |
| root | 127.0.0.1       |            |
| root | ::1                  |             |
|      | localhost          |             |
|      | wb.home.test  |             |
+------+------------------+----------+
6 rows in set (0.49 sec)

Note: no passwords required.
Now to set password the same for the above.

UPDATE user SET password = PASSWORD("new_root_pw_here") WHERE User='root';
Query OK, 4 rows affected (0.04 sec)
Rows matched: 4  Changed: 4  Warnings: 0

 SELECT User, Host, Password FROM mysql.user;
+------+------------------+-------------------------------------------+
| User | Host               | Password                                      |
+------+------------------+-------------------------------------------+
| root | localhost         | *15EDA3F4640E381E8F712DD6FC9B9F0F8A9F36A6 |
| root | wb.home.test | *15EDA3F4640E381E8F712DD6FC9B9F0F8A9F36A6 |
| root | 127.0.0.1       | *15EDA3F4640E381E8F712DD6FC9B9F0F8A9F36A6 |
| root | ::1                  | *15EDA3F4640E381E8F712DD6FC9B9F0F8A9F36A6 |
|      | localhost          |                                                     |
|      | wb.home.test   |                                                     |
+------+--------------+-------------------------------------------+

I am removing the bottom three rows.

MariaDB [mysql]> DELETE FROM `user` WHERE`User` = '';
Query OK, 2 rows affected (0.00 sec)

MariaDB [mysql]>  DELETE FROM `user` WHERE`Host` = '::1' AND `User` = 'root';
Query OK, 1 row affected (0.00 sec)

[/code]

If your mythtv node is a server to other nodes on your lan, it might also help to grant them access after you nave the backend up and running. I script all my changes.
 
# cat mysql_grant
[code]
#******************* start of mysql_grant ****************************
      #
      # created by /local/bin/my_cnf_changes

      #**********************************************
      #* grant mythfrontend access from any LAN node
      #* UPDATE user SET password=PASSWORD(mythtv_pw_here) WHERE User='mythtv';
      #**********************************************

mysql --user=root --password=root_db_pw_here <<EOD
grant all on mythconverg.* to mythtv@"192.168.11.%" identified by "mythtv_pw_here" ;
DELETE FROM mysql.user WHERE Host = '::1' AND User = 'root';
flush privileges;
quit
EOD

#******************* end of mysql_grant ******************************


Be sure to change 192.168.11. to your lan's value.
bittwister
 
Posts: 47
Joined: Oct 5th, '13, 21:48

Re: service Mythbackend can't start

Postby anp66 » Nov 3rd, '17, 23:40

Bittwister wrote:

Looking through the logs and password scripts, I notice you are not consistent with the node name. In the database it matters and 217.0.0.1 and localhost are two different users. Either change your commands or add all the node names needed to the database.


I don't understand :
Do I change my commands back so the use localhost instead of 127.0.0.1 ?
anp66
 
Posts: 34
Joined: Jul 18th, '17, 23:49

Re: service Mythbackend can't start

Postby bittwister » Nov 4th, '17, 00:36

anp66 wrote:Bittwister wrote:

Looking through the logs and password scripts, I notice you are not consistent with the node name. In the database it matters and 217.0.0.1 and localhost are two different users. Either change your commands or add all the node names needed to the database.


I don't understand :
Do I change my commands back so the use localhost instead of 127.0.0.1 ?


Use whichever one that you have set a password for. Here log into mysql and display what passwords are set.
Code: Select all
mysql --user=root --password=new_root_pw_here  mysql
SELECT User, Host, Password FROM mysql.user;
quit
bittwister
 
Posts: 47
Joined: Oct 5th, '13, 21:48

Re: service Mythbackend can't start

Postby anp66 » Nov 4th, '17, 01:36

Hi again Bittwister
and THANK YOU for your time and advice !.

Here is the users in mysql:

Code: Select all
[anders@localhost ~]$ mysql --user=root -p mysql
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.1.28-MariaDB Mageia MariaDB Server

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [mysql]> SELECT User, Host, Password FROM mysql.user;
+--------+-----------+-------------------------------------------+
| User   | Host      | Password                                  |
+--------+-----------+-------------------------------------------+
| root   | localhost | *90ABD4F3FC31A14AC12BFD89669D2CF7FF2296A3 |
| root   | 127.0.0.1 | *90ABD4F3FC31A14AC12BFD89669D2CF7FF2296A3 |
| mythtv | localhost | *90ABD4F3FC31A14AC12BFD89669D2CF7FF2296A3 |
+--------+-----------+-------------------------------------------+
3 rows in set (0.00 sec)

MariaDB [mysql]> exit
Bye


Here is the config files, now they are turned back to localhost:

Code: Select all
[anders@localhost ~]$ ls -l /usr/share/mythtv/initialdb/mc.sql
-rw-r--r-- 1 root root 324 Nov  3 23:34 /usr/share/mythtv/initialdb/mc.sql
[anders@localhost ~]$
[anders@localhost ~]$ cat /usr/share/mythtv/initialdb/mc.sql
CREATE DATABASE IF NOT EXISTS mythconverg;
GRANT ALL ON mythconverg.* TO mythtv@localhost IDENTIFIED BY "????????";
FLUSH PRIVILEGES;
GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv@localhost IDENTIFIED BY "????????";
FLUSH PRIVILEGES;
ALTER DATABASE mythconverg DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;


Code: Select all
[anders@localhost ~]$ ls -l /var/lib/mythtv/config.xml
-rw-r--r-- 1 mythtv mythtv 554 Nov  3 23:46 /var/lib/mythtv/config.xml
[anders@localhost ~]$
[anders@localhost ~]$ cat /var/lib/mythtv/config.xml
<Configuration>
  <LocalHostName>my-unique-identifier-goes-here</LocalHostName>
  <Database>
    <PingHost>1</PingHost>
    <Host>localhost</Host>
    <DBHostName>localhost</DBHostName>
    <UserName>mythtv</UserName>
    <Password>????????</Password>
    <DatabaseName>mythconverg</DatabaseName>
    <Port>3306</Port>
  </Database>
  <WakeOnLAN>
    <Enabled>0</Enabled>
    <SQLReconnectWaitTime>0</SQLReconnectWaitTime>
    <SQLConnectRetry>5</SQLConnectRetry>
    <Command>echo 'WOLsqlServerCommand not set'</Command>
  </WakeOnLAN>
</Configuration>


Code: Select all
[anders@localhost ~]$ ls -l $HOME/.mythtv/config.xml
-rw-r--r-- 1 anders anders 554 Nov  4 00:01 /home/anders/.mythtv/config.xml
[anders@localhost ~]$
[anders@localhost ~]$ cat $HOME/.mythtv/config.xml
<Configuration>
  <LocalHostName>my-unique-identifier-goes-here</LocalHostName>
  <Database>
    <PingHost>1</PingHost>
    <Host>localhost</Host>
    <DBHostName>localhost</DBHostName>
    <UserName>mythtv</UserName>
    <Password>????????</Password>
    <DatabaseName>mythconverg</DatabaseName>
    <Port>3306</Port>
  </Database>
  <WakeOnLAN>
    <Enabled>0</Enabled>
    <SQLReconnectWaitTime>0</SQLReconnectWaitTime>
    <SQLConnectRetry>5</SQLConnectRetry>
    <Command>echo 'WOLsqlServerCommand not set'</Command>
  </WakeOnLAN>
</Configuration>


When I start the service, I got a NEW error :-)

Code: Select all
root@localhost mythtv]# systemctl start mythbackend


Code: Select all
[root@localhost mythtv]# cat mythbackend.20171103232826.8197.log
2017-11-04 00:28:26.014633 C [8197/8197] thread_unknown mythcommandlineparser.cpp:2599 (ConfigureLogging) - mythbackend version: fixes/0.28.1 [0.28.1-20170528.6.mga6.tainted (aka v0.28.1-23-gaf9826)] www.mythtv.org
2017-11-04 00:28:26.014642 C [8197/8197] thread_unknown mythcommandlineparser.cpp:2601 (ConfigureLogging) - Qt version: compile: 5.6.2, runtime: 5.6.2
2017-11-04 00:28:26.014643 N [8197/8197] thread_unknown mythcommandlineparser.cpp:2603 (ConfigureLogging) - Enabled verbose msgs:  general
2017-11-04 00:28:26.014677 N [8197/8197] thread_unknown logging.cpp:920 (logStart) - Setting Log Level to LOG_INFO
2017-11-04 00:28:26.025128 I [8197/8203] Logger logging.cpp:313 (run) - Added logging to the console
2017-11-04 00:28:26.025332 I [8197/8197] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Interrupt handler
2017-11-04 00:28:26.025336 I [8197/8197] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Terminated handler
2017-11-04 00:28:26.025339 I [8197/8197] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Segmentation fault handler
2017-11-04 00:28:26.025342 I [8197/8197] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Aborted handler
2017-11-04 00:28:26.025345 I [8197/8197] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Bus error handler
2017-11-04 00:28:26.025348 I [8197/8197] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Floating point exception handler
2017-11-04 00:28:26.025350 I [8197/8197] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Illegal instruction handler
2017-11-04 00:28:26.025354 I [8197/8197] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Real-time signal 0 handler
2017-11-04 00:28:26.025357 I [8197/8197] thread_unknown signalhandling.cpp:194 (SetHandlerPrivate) - Setup Hangup handler
2017-11-04 00:28:26.025371 N [8197/8197] thread_unknown mythdirs.cpp:33 (InitializeMythDirs) - Read conf dir = /var/lib/mythtv
2017-11-04 00:28:26.025382 N [8197/8197] thread_unknown mythdirs.cpp:192 (InitializeMythDirs) - Using runtime prefix = /usr
2017-11-04 00:28:26.025384 N [8197/8197] thread_unknown mythdirs.cpp:194 (InitializeMythDirs) - Using configuration directory = /var/lib/mythtv
2017-11-04 00:28:26.025409 I [8197/8197] CoreContext mythcorecontext.cpp:266 (Init) - Assumed character encoding: en_DK.UTF-8
2017-11-04 00:28:26.025568 N [8197/8197] CoreContext mythcontext.cpp:505 (LoadDatabaseSettings) - Empty LocalHostName.
2017-11-04 00:28:26.025571 I [8197/8197] CoreContext mythcontext.cpp:513 (LoadDatabaseSettings) - Using localhost value of localhost
2017-11-04 00:28:26.054915 N [8197/8197] CoreContext mythcorecontext.cpp:1670 (InitLocale) - Setting QT default locale to en_US
2017-11-04 00:28:26.054921 I [8197/8197] CoreContext mythcorecontext.cpp:1703 (SaveLocaleDefaults) - Current locale en_US
2017-11-04 00:28:26.054943 N [8197/8197] CoreContext mythlocale.cpp:123 (LoadDefaultsFromXML) - Reading locale defaults from /usr/share/mythtv//locales/en_us.xml
2017-11-04 00:28:26.066909 E [8197/8197] CoreContext mythtranslation.cpp:81 (load) - Error Loading en_us translation for module mythfrontend
2017-11-04 00:28:26.106037 I [8197/8197] CoreContext schemawizard.cpp:120 (Compare) - Current MythTV Schema Version (DBSchemaVer): 1344
2017-11-04 00:28:26.106114 E [8197/8197] CoreContext mythtranslation.cpp:81 (load) - Error Loading en_us translation for module mythfrontend
[b]2017-11-04 00:28:26.113788 E [8197/8206] MythSocketThread(-1) mythsocket.cpp:729 (ConnectToHostReal) - MythSocket(a71c20:-1): Failed to connect to (127.0.0.1:6543) Connection refused
2017-11-04 00:28:26.114968 E [8197/8197] CoreContext mythcorecontext.cpp:979 (GetBackendServerIP) - MythCoreContext::GetBackendServerIP(): No address defined for host: localhost
[/b]2017-11-04 00:28:26.125456 I [8197/8202] LogForward loggingserver.cpp:142 (FileLogger) - Added logging to /var/log/mythtv/mythbackend.20171103232826.8197.log
anp66
 
Posts: 34
Joined: Jul 18th, '17, 23:49

Re: service Mythbackend can't start

Postby bittwister » Nov 4th, '17, 02:45

anp66 wrote:Hi again Bittwister
and THANK YOU for your time and advice !.

Here is the users in mysql:

Code: Select all
[anders@localhost ~]$ mysql --user=root -p mysql
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.1.28-MariaDB Mageia MariaDB Server

Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [mysql]> SELECT User, Host, Password FROM mysql.user;
+--------+-----------+-------------------------------------------+
| User   | Host      | Password                                  |
+--------+-----------+-------------------------------------------+
| root   | localhost | *90ABD4F3FC31A14AC12BFD89669D2CF7FF2296A3 |
| root   | 127.0.0.1 | *90ABD4F3FC31A14AC12BFD89669D2CF7FF2296A3 |
| mythtv | localhost | *90ABD4F3FC31A14AC12BFD89669D2CF7FF2296A3 |
+--------+-----------+-------------------------------------------+
3 rows in set (0.00 sec)


You have a slight security problem if you continue to use the same password for database root access and mythtv access.

Chopped out lots of stuff just to focus on error messages and possible solutions.

thread_unknown mythdirs.cpp:33 (InitializeMythDirs)
- Read conf dir = /var/lib/mythtv

thread_unknown mythdirs.cpp:194 (InitializeMythDirs)
- Using configuration directory = /var/lib/mythtv

Going to guess you missed setting two setup files seen in the https://bugs.mageia.org/show_bug.cgi?id=19127 report.
First change
Code: Select all
Rather than change /usr/lib/systemd/system/mythbackend.service if supplied via upstream, and may change over time, do the following:

mkdir -p /etc/systemd/system/mythbackend.service.d/
cat > /etc/systemd/system/mythbackend.service.d/local.conf
[Service]
Environment=MYTHCONFDIR=/var/lib/mythtv
^d

The ^d is a Ctrl+d used to close cat input to /etc/systemd/system/mythbackend.service.d/local.conf


And follow the instructions in comment 1.
https://bugs.mageia.org/show_bug.cgi?id=19127#c1

If you are lucky that will fix the /locales/en_us error messages.

Failed to connect to (127.0.0.1:6543) Connection refused
GetBackendServerIP(): No address defined for host: localhost

Guessing you need a definition in /etc/hosts, add this line to top of /etc/hosts
Code: Select all
127.0.0.1 localhost.localdomain localhost


Just a reference point, here is a copy of my database ids on my mythtv node
Code: Select all
SELECT User, Host, Password FROM mysql.user;
+--------+--------------+-------------------------------------------+
| User   | Host         | Password                                  |
+--------+--------------+-------------------------------------------+
| root   | localhost    | *15EDA3F4640E381E8F712DD6FC9B9F0F8A9F36A6 |
| root   | 127.0.0.1    | *15EDA3F4640E381E8F712DD6FC9B9F0F8A9F36A6 |
| mythtv | 192.168.11.% | *A2D6097F8B5E372A7A4DA1A8718138BA079E5EF9 |
| mythtv | localhost    | *A2D6097F8B5E372A7A4DA1A8718138BA079E5EF9 |
+--------+--------------+-------------------------------------------+
4 rows in set (0.03 sec)
bittwister
 
Posts: 47
Joined: Oct 5th, '13, 21:48

Re: service Mythbackend can't start

Postby anp66 » Nov 4th, '17, 11:14

Thank you Bittwister

Now the mythbackend service is running :-).
I think the larst thing I was missing was the change in the hosts file.

Here is the local.conf file:
Code: Select all
[anders@localhost mythtv]$ ls -l /etc/systemd/system/mythbackend.service.d/
total 4
-rw-r--r-- 1 root root 91 Nov  2 08:20 local.conf
[anders@localhost mythtv]$ cat /etc/systemd/system/mythbackend.service.d/local.conf
[Service]
Environment=MYTHTV_HOME=/var/lib/mythtv
Environment=MYTHCONFDIR=/var/lib/mythtv


[anders@localhost mythtv]$ ls -l /var/lib/mythtv/
total 8
-rw-r--r-- 1 mythtv mythtv  554 Nov  3 23:46 config.xml
drwxr-xr-x 2 mythtv mythtv 4096 Jun 25 09:07 recordings/


This is the old hosts file:

Code: Select all
[anders@localhost mythtv]$ ls -l /etc/hosts
-rw-r--r-- 1 root root 56 Aug 31  2016 /etc/hosts
[anders@localhost mythtv]$ cat /etc/hosts
127.0.0.1               localhost
::1         localhost


After the change in the hosts file, it look like this:

Code: Select all
[anders@localhost mythtv]$ cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
::1         localhost


From the control center, service mythbackend can now be started.
From the graphical environment, mythtv setup can now also be started and there is connection to the database.

Now I'm going to install and setup mythtv frontend. I'm only interested in the video section to my home videos, so I expect to use a dummy video card.

Thanks again for your time and good help.

Best regards
Anders
anp66
 
Posts: 34
Joined: Jul 18th, '17, 23:49

Re: service Mythbackend can't start

Postby isadora » Nov 4th, '17, 11:44

Please anp66, don't forget to mark the topic [SOLVED].
You can do so, by editing the subject/title in the first message in this topic.
Write [SOLVED] to the left of subject/title, thanks ahead. ;)
..........bird from paradise..........

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
—Antoine de Saint-Exupéry
User avatar
isadora
 
Posts: 2763
Joined: Mar 25th, '11, 16:03
Location: Netherlands


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest