-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Content-ID: <alpine.LSU.2.21.1711302217210.14421@Telcontar.valinor> On Thursday, 2017-11-30 at 20:59 +0100, Per Jessen wrote:
Carlos E. R. wrote:
On Thursday, 2017-11-30 at 18:28 +0100, Per Jessen wrote:
«Once the software has been installed, MythTV must be configured before you can use it. It needs to know what TV tuners you will use, where to store recordings and other files, how you will be using it.
This guide assumes you have already installed MythTV, MySQL, created the MySQL user id and set up your backend to automatically start. If you used a Mythbuntu or a package from the Mythbuntu PPA these have already been done.»
Note: "assumes you have already installed MySQL, created the MySQL user id and set up your backend to automatically start.
How on earth would I do that if they don't explain how to do that?
Well, they don't explain to you how to login either nor how to install the software. When you're not very familiar with mysql it's a bit of steep learning curve. As for the mysql userid, I explained that earlier today, and it is also done when you run that script, "mc.sql".
Create MySQL user id. How?
Quoting myself:
using the mysql command line interface, for instance.
"grant all privileges on <mythdb>.* to '<mythuser>'@'localhost' identified by '<passwd>'"
Password?
As it happens, it is also done automatically by the 'mc.sql' script.
But I think that the script is wrong, because the frontend complains the database is 37 versions old, to run setup to correct it. I think it is the backendsetuptool which has to create the database instead, for which the user id must be set before.
Set the backend to start automatically. Well, it refuses, it fails with cryptic errors.
It just needs the timezone tables populated. There is a script for that, it is a well-documented procedure.
Yes, but it fails. It is a documented procedure but I'm not an mysql expert to know about it.
Those instructions assume that I am an MySQL expert. I am not. I need handholding. :-(
That's what we're doing. :-)
Thanks :-)
You run the script 'mysql_tzinfo_to_sql" which will generate the necessary sql, then pipe that into the mysql client:
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
How was I supposed to know that? I have never done such a thing.
You aren't supposed to know, but the page I mentioned does explain it.
Yes, but it is a page outside of the mythtv howto pages.
Well, it asks for a password. Which one? I have not defined any password.
If you have no root password, either:
a) omit the -p option to mysql. b) logged in as root, set a password using 'mysqladmin password'.
The latter is a normal part of installing mysql - normally the mysql start script will remind you, but maybe something was lost in the conversion to systemd, I dunno.
It certainly didn't ask me anything. See later.
Notice: I have not setup mariadb AT ALL. I do nothing with it. Anything I should do with it, the mythtv people should explain in detail :-(
As far as mythtv is concerned, you only need to run the script they have provided, as well as populate the timezone tables.
I suggest the following:
set the root password using "mysqladmin password". populate the timezone tables using the tzinfo script. run the mc.sql script to set up the mythtv stuff. start the mythbackend
Ok. I will do something else: /var/lib/mysql and restart the service. Done. Success. Does not ask to setup a password. The data directory is created again. Isengard:~ # mysqladmin password New password: Confirm new password: Isengard:~ # mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql .... Done. Isengard:~ # cat /usr/share/doc/packages/mythtv-docs/database/mc.sql | mysql -u root -p mysql Enter password: Isengard:~ # Good! Finally: Isengard:~ # systemctl status mythbackend.service ● mythbackend.service - MythTV backend service Loaded: loaded (/usr/lib/systemd/system/mythbackend.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Thu 2017-11-30 22:01:16 CET; 1s ago Process: 32392 ExecStart=/usr/bin/mythbackend --logpath /var/log/mythtv $MYTHBACKEND_OPTIONS (code=exited, status=138) Main PID: 32392 (code=exited, status=138) Nov 30 22:01:16 Isengard mythbackend[32392]: 2017-11-30 22:01:16.468585 C Upgrading to MythTV schema version 1344 Nov 30 22:01:16 Isengard mythbackend[32392]: 2017-11-30 22:01:16.470940 I Database schema upgrade complete. <========== Nov 30 22:01:16 Isengard mythbackend[32392]: 2017-11-30 22:01:16.471440 I Loading en_us translation for module mythfrontend <====== Nov 30 22:01:16 Isengard mythbackend[32392]: 2017-11-30 22:01:16.476693 E MythCoreContext::GetBackendServerIP(): No address defined for host: localhost Nov 30 22:01:16 Isengard mythbackend[32392]: 2017-11-30 22:01:16.477788 E MythSocket(27f5040:-1): Failed to connect to (::1:6543) Connection refused Nov 30 22:01:16 Isengard mythbackend[32392]: 2017-11-30 22:01:16.479517 E MythCoreContext::GetBackendServerIP(): No address defined for host: Isengard Nov 30 22:01:16 Isengard mythbackend[32392]: 2017-11-30 22:01:16.572938 I Removed logging to /var/log/mythtv/mythbackend.20171130210116.32392.log Nov 30 22:01:16 Isengard systemd[1]: mythbackend.service: Main process exited, code=exited, status=138/n/a Nov 30 22:01:16 Isengard systemd[1]: mythbackend.service: Unit entered failed state. Nov 30 22:01:16 Isengard systemd[1]: mythbackend.service: Failed with result 'exit-code'. Isengard:~ # My guess is that it is trying to connect to the database via network and that is disabled by default. That would be in /etc/my.cnf. I suppose it is this: # These are commonly set, remove the # and set as required. port = 3306 socket = /var/run/mysql/mysql.sock Now try to start the backend - fails again, same error. Why is it trying (::1:6543)? mythbackend also fails: Isengard:~ # mythbackend No setting found for this machine's BackendServerIP. Please run setup on this machine and modify the first page of the general settings. 2017-11-30 22:08:03.906309 C mythbackend version: [v0.28.1] www.mythtv.org 2017-11-30 22:08:03.906344 C Qt version: compile: 5.6.1, runtime: 5.6.1 2017-11-30 22:08:03.906349 N Enabled verbose msgs: general 2017-11-30 22:08:03.906379 N Setting Log Level to LOG_INFO 2017-11-30 22:08:03.917578 I Added logging to the console 2017-11-30 22:08:03.917969 I Setup Interrupt handler 2017-11-30 22:08:03.917985 I Setup Terminated handler 2017-11-30 22:08:03.917995 I Setup Segmentation fault handler 2017-11-30 22:08:03.918007 I Setup Aborted handler 2017-11-30 22:08:03.918015 I Setup Bus error handler 2017-11-30 22:08:03.918028 I Setup Floating point exception handler 2017-11-30 22:08:03.918040 I Setup Illegal instruction handler 2017-11-30 22:08:03.918062 I Setup Real-time signal 0 handler 2017-11-30 22:08:03.918078 I Setup Hangup handler 2017-11-30 22:08:03.918166 N Using runtime prefix = /usr 2017-11-30 22:08:03.918171 N Using configuration directory = /root/.mythtv 2017-11-30 22:08:03.918299 I Assumed character encoding: POSIX 2017-11-30 22:08:03.918310 W This application expects to be running a locale that specifies a UTF-8 codeset, and many features may behave improperly with your current language settings. Please set the LANG variable(s) in the environment in which this program is executed to include a UTF-8 codeset (such as 'en_US.UTF-8'). 2017-11-30 22:08:03.918744 N Empty LocalHostName. 2017-11-30 22:08:03.918756 I Using localhost value of Isengard 2017-11-30 22:08:03.935381 N Setting QT default locale to en_US 2017-11-30 22:08:03.935405 I Current locale en_US 2017-11-30 22:08:03.935494 N Reading locale defaults from /usr/share/mythtv//locales/en_us.xml 2017-11-30 22:08:03.948038 I Loading en_us translation for module mythfrontend 2017-11-30 22:08:03.954712 I Current MythTV Schema Version (DBSchemaVer): 1344 2017-11-30 22:08:03.955180 I Loading en_us translation for module mythfrontend 2017-11-30 22:08:03.960970 E MythCoreContext::GetBackendServerIP(): No address defined for host: localhost 2017-11-30 22:08:03.962259 E MythSocket(25390d0:-1): Failed to connect to (::1:6543) Connection refused 2017-11-30 22:08:03.965046 E MythCoreContext::GetBackendServerIP(): No address defined for host: Isengard Isengard:~ # mythtvsetup does run, however. In general config it asks about "Port" and "status port". 6543 and 6544. Suppose I should leave alone. It asks a lot of questions I have no idea about. And I can not exit without answering "no storage group directories are defined... you must add at least one." But I have no idea where to set it up (system or home?), I have no TV card. And this time it has not asked at all about my country and language, it is using English and USA settings without asking, which is wrong. The backend still fails to start: Isengard:~ # systemctl status mythbackend.service ● mythbackend.service - MythTV backend service Loaded: loaded (/usr/lib/systemd/system/mythbackend.service; disabled; vendor preset: disabled) Active: failed (Result: exit-code) since Thu 2017-11-30 22:18:07 CET; 2s ago Process: 9367 ExecStart=/usr/bin/mythbackend --logpath /var/log/mythtv $MYTHBACKEND_OPTIONS (code=exited, status=1/FAILURE) Main PID: 9367 (code=exited, status=1/FAILURE) Nov 30 22:18:07 Isengard mythbackend[9367]: 2017-11-30 22:18:07.506713 I Loading en_us translation for module mythfrontend Nov 30 22:18:07 Isengard mythbackend[9367]: 2017-11-30 22:18:07.510435 N MythBackend: Starting up as the master server. Nov 30 22:18:07 Isengard mythbackend[9367]: 2017-11-30 22:18:07.513010 W MythBackend: No valid capture cards are defined in the database. Nov 30 22:18:07 Isengard mythbackend[9367]: 2017-11-30 22:18:07.517338 E Scheduler: No capture cards are defined in the database. Nov 30 22:18:07 Isengard mythbackend[9367]: Perhaps you should re-read the installation instructions? Nov 30 22:18:07 Isengard mythbackend[9367]: 2017-11-30 22:18:07.567965 I Added logging to /var/log/mythtv/mythbackend.20171130211807.9367.log Nov 30 22:18:07 Isengard mythbackend[9367]: 2017-11-30 22:18:07.660817 I Removed logging to /var/log/mythtv/mythbackend.20171130211807.9367.log Nov 30 22:18:07 Isengard systemd[1]: mythbackend.service: Main process exited, code=exited, status=1/FAILURE Nov 30 22:18:07 Isengard systemd[1]: mythbackend.service: Unit entered failed state. Nov 30 22:18:07 Isengard systemd[1]: mythbackend.service: Failed with result 'exit-code'. Isengard:~ # I think it wants a card, and I do not have one nor intention to add one, you know that. For others: the intention is to use mythtv to view media files created by other programs. If it is impossible to run without a card, it is a dead end. And the backend service doesn't run. - -- Cheers, Carlos E. R. (from openSUSE 42.2 x86_64 "Malachite" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlogeFoACgkQtTMYHG2NR9V6FgCfUZHuLOiGF+knJhRo+GjnBTFS vVIAoJcjyFljkxu9eAS4jviHEbqMl47y =cwd7 -----END PGP SIGNATURE-----