[Solved] FrontEnd won’t connect on remote computer Myth 31 Ubuntu 20.04

For discussion of topics specific to MythTV on linux
blm-ubunet
Senior
Posts: 120
Joined: Sun Jun 15, 2014 1:08 am
Cambodia

Re: FrontEnd won’t connect on remote computer Myth 31 Ubuntu 20.04

Post by blm-ubunet » Mon Jul 20, 2020 8:45 am

Hi bill6502,

I changed bind-address to :: & can now use socket connection on local BE-FE.
Seems snappier especially in News RSS feeds.

With mysql 5.7:

Code: Select all

                             mysql -h              |     MBE config.xml
bind-address          localhost      127.0.0.      |    localhost     127.0.0.1    192.168.1.32
192.168.1.32          yes               no         |    no               no               yes
::                    yes               tbd        |    yes              tbd              yes
Confusion was that mysql will connect with --host=localhost & bind-address=192.168.1.32 but MBE will not.
Thanks...

Sorry anoldguy.. my other test MBE-FE combo can have its FE connected to my prodn MBE by just simple edit to FE user .mythtv/config.xml

User avatar
anoldguy
Junior
Posts: 17
Joined: Sat Jul 11, 2020 8:07 pm
United States of America

Re: FrontEnd won’t connect on remote computer Myth 31 Ubuntu 20.04

Post by anoldguy » Mon Jul 20, 2020 5:50 pm

No problem blm-ubunet. This forum is here to help everyone with MythTV. I am glad that your performance has improved.

User avatar
bill6502
Developer
Posts: 1730
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: FrontEnd won’t connect on remote computer Myth 31 Ubuntu 20.04

Post by bill6502 » Mon Jul 20, 2020 6:15 pm

Updated my 19 Jul 2020 20:29 post re /usr/share/mythtv/config.xml. It's truly not in play.

User avatar
anoldguy
Junior
Posts: 17
Joined: Sat Jul 11, 2020 8:07 pm
United States of America

Re: FrontEnd won’t connect on remote computer Myth 31 Ubuntu 20.04

Post by anoldguy » Mon Jul 20, 2020 6:56 pm

Thank you for your patience bill6502.

I tried to make sure that user mythtv had a config file in /home:
ZY FE config add 2020-July-20 1401.txt
(1.81 KiB) Downloaded 11 times
Here is the terminal output from the FrontEnd startup:
Here is the log file from the FrontEnd startup:
mythfrontend.20200720172500.4117.log
(18.64 KiB) Downloaded 9 times
It looks like the first error is a missing database driver.

I think that I will try to install MythTV FrontEnd on another computer that is running Ubuntu 18.04.04.

Yes, the BackEnd computer ‘colossus’ had a new SSD installed and a clean install of Ubuntu 20.04. Then a clean install of MythTV. Then a database restore from a MythTV 27 database.

I fear that I may have broken something while trying to get the remote FrontEnd going when the BackEnd MySQL was host-only.

On the BackEnd, there are other strange things going on, like the OTA tuners going offline, Autoexpire being unable to delete some LiveTV recordings, etc., but that may be different causes.

I think that I will try to install MythTV FrontEnd on another computer that is running Ubuntu 18.04.04. I was delaying installing on my main desktop until I was sure it was working on the living room NUC.

User avatar
bill6502
Developer
Posts: 1730
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: FrontEnd won’t connect on remote computer Myth 31 Ubuntu 20.04

Post by bill6502 » Mon Jul 20, 2020 7:09 pm

This text in the log is perfect: ...Using configuration directory = /home/banana/.mythtv

It means the frontend was started by user banana. Lets see the output of these three
commands (when logged in as user banana, no su to root or mythtv):

Code: Select all

id
ls -ld /home/banana/.mythtv/config.xml
cat /home/banana/.mythtv/config.xml

User avatar
anoldguy
Junior
Posts: 17
Joined: Sat Jul 11, 2020 8:07 pm
United States of America

Re: FrontEnd won’t connect on remote computer Myth 31 Ubuntu 20.04

Post by anoldguy » Mon Jul 20, 2020 8:36 pm

banana@zworykin:~$ date
Mon 20 Jul 2020 04:30:34 PM EDT
banana@zworykin:~$
banana@zworykin:~$ id
uid=1000(banana) gid=1000(banana) groups=1000(banana),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),120(lpadmin),131(lxd),132(sambashare),133(mythtv)
banana@zworykin:~$ ls -ld /home/banana/.mythtv
ls: cannot access '/home/banana/.mythtv': No such file or directory
banana@zworykin:~$ cat /home/banana/.mythtv
cat: /home/banana/.mythtv: No such file or directory
banana@zworykin:~$
banana@zworykin:~$

User avatar
bill6502
Developer
Posts: 1730
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: FrontEnd won’t connect on remote computer Myth 31 Ubuntu 20.04

Post by bill6502 » Mon Jul 20, 2020 8:45 pm

The id is fine, but the file of interest is: /home/banana/.mythtv/config.xml

If the directory isn't there (very odd), mkdir /home/banana/.mythtv and add the
link: cd ~/.mythtv;ln -s /etc/mythtv/config.xml config.xml

User avatar
anoldguy
Junior
Posts: 17
Joined: Sat Jul 11, 2020 8:07 pm
United States of America

Re: FrontEnd won’t connect on remote computer Myth 31 Ubuntu 20.04

Post by anoldguy » Mon Jul 20, 2020 11:48 pm

We’re making progress Bill. It looks like we’re on a socket problem now.

Here I changed the /home of banana to point to the /etc config:
I ran the FrontEnd and this time the screen had the BackEnd IP instead of the loopback in the setup. The log shows it tried the loopback [127.0.0.1] first, then tried the BE IP:

Terminal log: Log file:
mythfrontend.20200720221051.2516.log
(21.05 KiB) Downloaded 8 times
[continued next reply]

User avatar
anoldguy
Junior
Posts: 17
Joined: Sat Jul 11, 2020 8:07 pm
United States of America

Re: FrontEnd won’t connect on remote computer Myth 31 Ubuntu 20.04

Post by anoldguy » Mon Jul 20, 2020 11:54 pm

Then I added the symbolic link to the mythtv user:
ZY FE mythtv symbolic link 2020-June-20 1823.txt
(1.96 KiB) Downloaded 8 times
Here is the terminal log file for the FrontEnd start up: Here is the log file for the FrontEnd start up:
mythfrontend.20200720223706.3133.log
(21.05 KiB) Downloaded 10 times
Looks like the BackEnd refused the connection?

User avatar
bill6502
Developer
Posts: 1730
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: FrontEnd won’t connect on remote computer Myth 31 Ubuntu 20.04

Post by bill6502 » Tue Jul 21, 2020 12:12 am

OK, the config.xml is looking good now and the log says the frontend is
trying to connect to the DB on 192.168.0.102.

First command from the remote frontend, second command from the backend. The output of these please:

Code: Select all

mysql --user=mythtv --password --host=192.168.0.102 --execute="SELECT * FROM settings WHERE value LIKE 'BackendServer%' OR value LIKE 'MasterServer%' ORDER BY value" mythconverg
mysql --user=mythtv --password --host=localhost --execute="SELECT * FROM settings WHERE value LIKE 'BackendServer%' OR value LIKE 'MasterServer%' ORDER BY value" mythconverg

User avatar
anoldguy
Junior
Posts: 17
Joined: Sat Jul 11, 2020 8:07 pm
United States of America

Re: FrontEnd won’t connect on remote computer Myth 31 Ubuntu 20.04

Post by anoldguy » Tue Jul 21, 2020 3:31 am

FrontEnd only host:

banana@zworykin:~$ mysql --user=mythtv --password --host=192.168.0.102 --execute="SELECT * FROM settings WHERE value LIKE 'BackendServer%' OR value LIKE 'MasterServer%' ORDER BY value" mythconverg
Enter password:

Code: Select all

+-------------------+---------------+----------+
| value             | data          | hostname |
+-------------------+---------------+----------+
| BackendServerAddr | localhost     | colossus |
| BackendServerAddr | localhost     | colossus |
| BackendServerIP   | 192.168.0.102 | colossus |
| BackendServerIP   | 192.168.0.102 | colossus |
| BackendServerIP6  | ::1           | colossus |
| BackendServerIP6  | ::1           | colossus |
| BackendServerPort | 6543          | colossus |
| BackendServerPort | 6543          | colossus |
| MasterServerIP    | 127.0.0.1     | NULL     |
| MasterServerName  | colossus      | NULL     |
| MasterServerPort  | 6543          | NULL     |
+-------------------+---------------+----------+
banana@zworykin:~$ date
Mon 20 Jul 2020 10:55:35 PM EDT

- - - - - - -

BackEnd host:

banana@colossus:~$ date
Mon 20 Jul 2020 11:07:32 PM EDT
banana@colossus:~$
banana@colossus:~$ mysql --user=mythtv --password --host=localhost --execute="SELECT * FROM settings WHERE value LIKE 'BackendServer%' OR value LIKE 'MasterServer%' ORDER BY value" mythconverg
Enter password:

Code: Select all

+-------------------+---------------+----------+
| value             | data          | hostname |
+-------------------+---------------+----------+
| BackendServerAddr | localhost     | colossus |
| BackendServerAddr | localhost     | colossus |
| BackendServerIP   | 192.168.0.102 | colossus |
| BackendServerIP   | 192.168.0.102 | colossus |
| BackendServerIP6  | ::1           | colossus |
| BackendServerIP6  | ::1           | colossus |
| BackendServerPort | 6543          | colossus |
| BackendServerPort | 6543          | colossus |
| MasterServerIP    | 127.0.0.1     | NULL     |
| MasterServerName  | colossus      | NULL     |
| MasterServerPort  | 6543          | NULL     |
+-------------------+---------------+----------+
banana@colossus:~$

Sorry for the delay; our Zoom project meeting ran extra long tonight.

User avatar
bill6502
Developer
Posts: 1730
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: FrontEnd won’t connect on remote computer Myth 31 Ubuntu 20.04

Post by bill6502 » Tue Jul 21, 2020 4:19 am

The backend is configured to run on localhost. That's why the
remote frontend is failing.

Sending the same query from the frontend, then the backend was just a
test to see of the frontend can connect to the DB (as expected.)

First, get rid of the duplicate entries in the DB. If any command fails, stop,
don't execute the rest.

On the backend:

Code: Select all

sudo systemctl stop mythtv-backend
Some correct, but VERY DANGEROUS, SQL removed
Now, use mythtv-setup to correct the settings for:

General -> Host Address Backend Setup -> Primary IP Address/DNS Name:

Restart the backend and try the remote frontend again.

User avatar
anoldguy
Junior
Posts: 17
Joined: Sat Jul 11, 2020 8:07 pm
United States of America

Re: FrontEnd won’t connect on remote computer Myth 31 Ubuntu 20.04

Post by anoldguy » Tue Jul 21, 2020 6:38 am

Hi Bill,
I stopped the BackEnd, made a DB back up and then did the three duplicate deletes. I ran the table listing and the only dup I see is the Port record.
BE DB fix 2020-July-21 0026.txt
(4.63 KiB) Downloaded 8 times
I did a GUI MythBackEnd, escaped, On Line, MythFillDB. The colossus BE's FE came up OK.

I went to the Zworykin remote FE and did a terminal FE start.
Same thing. The setup GUI comes up. I let it retry out, went to the setup screen and escaped.
Here's the log:
mythfrontend.20200721051035.2300.log
(21.05 KiB) Downloaded 9 times
Looks like the remote FE initially tries 127.0.0.1, then when I exit the setup screen it tries 192.168.0.102, but still fails.

Here is a full listing of the settings table:
BE DB list 2020-July-21 0219.txt
(108.59 KiB) Downloaded 8 times

User avatar
anoldguy
Junior
Posts: 17
Joined: Sat Jul 11, 2020 8:07 pm
United States of America

Re: FrontEnd won’t connect on remote computer Myth 31 Ubuntu 20.04

Post by anoldguy » Tue Jul 21, 2020 6:49 am

Oh, sorry Bill, I missed your Host Address Backend Setup. It's 2 AM here.
For the Primary IP Address/DNS Name, I think it was localhost.
What should it be, 192.168.0.102?

blm-ubunet
Senior
Posts: 120
Joined: Sun Jun 15, 2014 1:08 am
Cambodia

Re: FrontEnd won’t connect on remote computer Myth 31 Ubuntu 20.04

Post by blm-ubunet » Tue Jul 21, 2020 9:00 am

The MBE has to use real IP addr if you want to use remote BE or FEs.
This is what my setup has with IPs changed to your MBE:
BackendServerAddr=192.168.0.102
BackendServerIP=192.168.0.102
MasterServerIP=192.168.0.102
MasterServerName=colossus

Guess the obvious questions is:- how did you end up with duplicates?

Post Reply