Status report interpretation

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
pinnerite
Senior
Posts: 260
Joined: Mon Apr 07, 2014 2:34 pm
Great Britain

Status report interpretation

Post by pinnerite »

I had to install mythtv backend on what had been a remote frontend only.
I changed all the address pointers to the new backend and completed the setup including the channel scan.

BUT the frontend wasn't happy.

I knew that the TV drivers worked properly as I have had kaffeine running on it since I installed Linux Mint 20.04. This is the report from # systemctl status mythtv-status:
● mythtv-status.service - MythTV Status
Loaded: loaded (/lib/systemd/system/mythtv-status.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2021-07-05 14:28:51 BST; 1h 20min ago
Docs: man:mythtv-status
Process: 12104 ExecStart=/bin/sh -c rm /var/lib/mythtv-status/motd_update_disabled || true (code=exited, status=0/SUCCESS)
Process: 12106 ExecStart=/usr/sbin/mythtv-update-motd (code=exited, status=1/FAILURE)
Main PID: 12106 (code=exited, status=1/FAILURE)

Jul 05 14:28:50 albury.asandco systemd[1]: Starting MythTV Status...
Jul 05 14:28:50 albury.asandco sh[12105]: rm: cannot remove '/var/lib/mythtv-status/motd_update_disabled': No such file or directory
Jul 05 14:28:51 albury.asandco mythtv-update-motd[12114]: Sorry, failed to fetch http://localhost:6544/Status/GetStatus: 500 Can't connect to localhost:6>
Jul 05 14:28:51 albury.asandco mythtv-update-motd[12115]: Sorry, failed to fetch http://localhost:6544/xml: 500 Can't connect to localhost:6544 (Connecti>
Jul 05 14:28:51 albury.asandco mythtv-update-motd[12107]: Nothing was received from the MythTV Backend.
Jul 05 14:28:51 albury.asandco systemd[1]: mythtv-status.service: Main process exited, code=exited, status=1/FAILURE
Jul 05 14:28:51 albury.asandco systemd[1]: mythtv-status.service: Failed with result 'exit-code'.
Jul 05 14:28:51 albury.asandco systemd[1]: Failed to start MythTV Status.
Can you suggest what I should be checking?
TIA
User avatar
paulh
Developer
Posts: 909
Joined: Thu Feb 06, 2014 6:09 pm
Great Britain

Re: Status report interpretation

Post by paulh »

mythtv-status must be some third party utility. It's not part of MythTV.

If that 500 is an http error code then that usually means an internal server error of some kind.

What do you get if you type that URL into a browser on the same machine?
http://localhost:6544/Status/GetStatus
pinnerite
Senior
Posts: 260
Joined: Mon Apr 07, 2014 2:34 pm
Great Britain

Re: Status report interpretation

Post by pinnerite »

I installed mythtv from the Mint 20.04 repository.
mythtv-status is one of the items that was installed. It is a perl script.

http://localhost:6544/Status/GetStatus returns "problem loading page".

Moving away from mythtv-status, when I try to bring up the frontend, it just says that it cannot find the database.

All files in /home/mythtv and below have mythtv:mythtv permissions.
Every relevant config.xml has been edited as below:
<Configuration>
<LocalHostName>192.168.1.4</LocalHostName>
<Database>
<PingHost>1</PingHost>
<Host>192.168.1.4</Host>
<UserName>mythtv</UserName>
<Password>mythtv</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>
<UPnP>
<UDN>
<MediaRenderer>87254a3c-0e6b-4ec9-8b98-b75609fe5d1a</MediaRenderer>
</UDN>
</UPnP>
</Configuration>
Since writing the above, I tried to make sure that MySQL was behaving.
I wanted to execute:
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('mythtv') WHERE user='mythtv';
mysql> FLUSH PRIVILEGES;
mysql> quit

but got:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '('mythtv') WHERE user='mythtv'' at line 1

I changed Password to authentication_string but that made no difference.
User avatar
bill6502
Developer
Posts: 2325
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Status report interpretation

Post by bill6502 »

Observations: You don't need 3 instances of config.xml, just 1. The other two should be
symbolic links to the one in /etc/mythtv.

Code: Select all

ls -ld {/etc/mythtv,~/.mythtv,~mythtv/.mythtv}/config.xml /var/lib/mythtv/confdir/config.xml
Ubuntu 20.04 uses MySQL v8 and some syntax has changed. See if you have a
mc.sql file in your distribution for clues.

This is not wrong, but odd: <LocalHostName>192.168.1.4</LocalHostName>
It's really a profile name used in settings and other tables. It's possible that
the above is hiding settings if you dumped and restored the old DB. I'd just
remove that line. Usually, the hostname = the profile name. There are
instructions in the Wiki to change the hostname. The following will display
the hostnames (profile names) in the DB now.

Code: Select all

mysql --user mythtv --password=mythtv --host=localhost --execute="SELECT DISTINCT hostname FROM settings ORDER BY hostname" mythconverg
Finally, port 6544 is used by the Services API and runs in the backend with no configuration
required. If it fails, as above, then mythbackend probably isn't running.
pinnerite
Senior
Posts: 260
Joined: Mon Apr 07, 2014 2:34 pm
Great Britain

Re: Status report interpretation

Post by pinnerite »

Thank you, you pointed me in the right direction.
I eliminated LocalHostName from /~.mythtv/config.xml

I also eliminated a line in /etc/hosts that pointed to 127.0.0.1 but was not localhost although that was there too.

I had reset everything in the backend using /usr/bin/mythtv-setup.
It starts very slowly. Patience is needed. It is incidentally, referred to in:
https://www.mythtv.org/wiki/Setup_General so I am surprised that it was mentioned above as not being a MythTV utility.

Anyway, it working fine.
Thank you. Much appeciated.
User avatar
paulh
Developer
Posts: 909
Joined: Thu Feb 06, 2014 6:09 pm
Great Britain

Re: Status report interpretation

Post by paulh »

Your first post mentions mythtv-status which is not part of MythTV.

mythtv-setup on the other hand is part of MythTV :?

The default value for LocalHostName is

Code: Select all

<LocalHostName>my-unique-identifier-goes-here</LocalHostName>
which basically means MythTV will use the hostname of the machine as the identifier to find it's settings in the database. Unless you have a specific reason to change it I would leave it as the default.
Post Reply