Cannot get frontend to connect

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

Moderator: Forum Moderators

Post Reply
ScottM
Newcomer
Posts: 11
Joined: Sun Feb 15, 2015 10:11 am
Great Britain

Cannot get frontend to connect

Post by ScottM »

Can some kind Mythtv guru please help troubleshoot this!

I have had had my Mythtv system running happily (mostly) for about 14 years now and thought it was time to update it, it was running mythbuntu 14.04 / Myth 0.28

I backed up the database, wiped the drive, installed Linux Mint 20, Mythtv 31, backend and frontend on same machine. Restored the database and with a bit of setting up of the storage groups etc it was working again. Videos, recording etc all there and working.

So computer running the backend (and a frontend) is working fine.

I also have a another computer that just runs a frontend, that is where the issue is. Again I wiped the drive, installed Linux Mint 20, added the mythbuntu 31 repository, installed the frontend. Edited the config.xml file to have the ip address of the backend (192.168.0.30) and the correct password but it just will not connect.

I have a pin set up in the backend as well and using the search option in the frontend and selecting it, using the pin does not work either.

Any help appreciated, my Linux experience only really extends to years of tinkering and fixing mythtv problems.

Logs files from the machine running the backend / frontend and also the log from the other frontend are attached. There were hundreds of lines relating to missing files that the backend is trying to delete, I removed most of the text to make the file size small enough to attach here but that is an issue for another time!
Attachments
remotemythfrontend.log
(18.06 KiB) Downloaded 43 times
mythfrontend.log
(24.31 KiB) Downloaded 39 times
mythbackend.log
(18.27 KiB) Downloaded 39 times
Last edited by ScottM on Mon Jun 29, 2020 7:40 pm, edited 1 time in total.
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Cannot get frontend to connect

Post by bill6502 »

From host 'MythtvIon', can you connect to the DB using the credentials in
"configuration directory = /root/.mythtv"? You're running the frontend as
user root. Odd, as most run as their login user, but it can work.

Code: Select all

mysql --user=mythtv --password --host=192.168.0.30 mythconverg
That takes MythTV out of the picture. If the above doesn't work, MythTV won't.
ScottM
Newcomer
Posts: 11
Joined: Sun Feb 15, 2015 10:11 am
Great Britain

Re: Cannot get frontend to connect

Post by ScottM »

Sorry, I ran Mythfrontend as root in terminal that time I took the copy of the log. I was annoyed at it continually restarting as if it had crashed every time I tried to exit. But the log from just running it as normal is the same.

No, I cannot connect to the database using that, ERROR 2003 (HY000): Can't connect to MySQL Server on '192.168.0.30' (111)
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Cannot get frontend to connect

Post by bill6502 »

I'd verify that the DB server allows connections from a remote IP.
The location of that file may be different if MariaDB is used or on
Mint itself.

Code: Select all

$ cat /etc/mysql/conf.d/mythtv.cnf
[mysqld]
bind_address=::
ScottM
Newcomer
Posts: 11
Joined: Sun Feb 15, 2015 10:11 am
Great Britain

Re: Cannot get frontend to connect

Post by ScottM »

Thanks for the reply, I updated the remote frontend log file to show it running from my login.

The output from cat /etc/mysql/conf.d/mythtv.cnf is:

[mysqld]
#bind-address=::
max_connections=100
ScottM
Newcomer
Posts: 11
Joined: Sun Feb 15, 2015 10:11 am
Great Britain

Re: Cannot get frontend to connect

Post by ScottM »

Not sure if it is relevant, every time I start the remote frontend, the host name is set back to 127.0.0.1 and I keep changing back to the IP of the backend. Even thought the config file has the correct details.
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Cannot get frontend to connect

Post by bill6502 »

The above guarantees that only connections to the DB from the localhost
(your backend) will be accepted.

Remove the leading # (comment). I don't recall if mysql must be restarted
for it to take affect. If so:

Code: Select all

sudo systemctl stop mythtv-backend.service
sudo systemctl restarat mysql
sudo systemctl start mythtv-backend.service
ScottM
Newcomer
Posts: 11
Joined: Sun Feb 15, 2015 10:11 am
Great Britain

Re: Cannot get frontend to connect

Post by ScottM »

Thank, you, partial success!

So, I can now connect to the database using
mysql --user=mythtv --password --host=192.168.0.30 mythconverg

but the frontend still will not connect, log file looks exactly the same. I have double checked the port,database name, user and password are all correct.
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Cannot get frontend to connect

Post by bill6502 »

The output of this (on the remote fromtned) please:

Code: Select all

ls -ld {/etc/mythtv,~mythtv/.mythtv,~/.mythtv}/config.xml
A permissions problem is my best guess at why
you need to keep changing the IP from 127.....
ScottM
Newcomer
Posts: 11
Joined: Sun Feb 15, 2015 10:11 am
Great Britain

Re: Cannot get frontend to connect

Post by ScottM »

Hi,
Output is below:

scott@MythtvIon:~$ ls -ld {/etc/mythtv,~mythtv/.mythtv,~/.mythtv}/config.xml
-rw-rw---- 1 mythtv mythtv 455 Jun 29 16:17 /etc/mythtv/config.xml
lrwxrwxrwx 1 root root 22 Jun 29 16:04 /home/mythtv/.mythtv/config.xml -> /etc/mythtv/config.xml
-rw-rw-r-- 1 scott scott 745 Jun 29 21:16 /home/scott/.mythtv/config.xml
scott@MythtvIon:~$
User avatar
bill6502
Developer
Posts: 2307
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: Cannot get frontend to connect

Post by bill6502 »

I'm guessing that this will show a difference:

Code: Select all

diff /etc/mythtv/config.xml /home/scott/.mythtv/config.xml
Fix the broken link with:

Code: Select all

rm /home/scott/.mythtv/config.xml
sudo ln -s /etc/mythtv/config.xml /home/scott/.mythtv/config.xml
ScottM
Newcomer
Posts: 11
Joined: Sun Feb 15, 2015 10:11 am
Great Britain

Re: Cannot get frontend to connect

Post by ScottM »

That has certainly fixed the issue of the IP being resting to 127... while the frontend is running and switching between trying to connect and searching for the DB but it is still not connecting. After rebooting or just restarting the frontend the IP is back to 127.0.0.1. IP address and all the other details are correct in the config file and on the setup screen on the frontend.

Contents of the config files in
/home/scott/.mythtv
/home/mythtv/.mythtv
/etc/mythtv
are all the same

Thanks again for taking the trouble to help. I will be leaving this shortly and having another look at it tomorrow!
ScottM
Newcomer
Posts: 11
Joined: Sun Feb 15, 2015 10:11 am
Great Britain

Re: Cannot get frontend to connect

Post by ScottM »

Well, not sure what happen but just rebooted before I shut everything down for the night the remote frontend just worked

Thanks again for all the help. Much appreciated.
Post Reply