Mailing List Archive

Frontends can't connect
I've just done a new installation of MythTV 34 on Xubuntu 22.04. It was all
working with remote frontends connecting and the Web App connecting on
http://192.168.0.120:6544/.

Then I don't know what happened but it stopped working and I can't connect
any more.

If I go to http://192.168.0.120:6544/ it says:

This site can’t be reached
192.168.0.120 refused to connect.

And the local frontend on the same machine as the backend can't connect. It
says
Unable to connect to master backend.

And the remote frontend gives the same error.

Mythbackend.log has these lines which I suspect means something is wrong:

Mar 24 14:07:48 MBE5 mythbackend: mythbackend[3311]: I CoreContext
mythcontext.cpp:891 (TestDBconnection) Start up testing connections. DB
localhost, BE , attempt 0, status dbAwake, Delay: 2000
Mar 24 14:07:49 MBE5 mythbackend: mythbackend[3311]: I CoreContext
mythcontext.cpp:891 (TestDBconnection) Start up testing connections. DB
localhost, BE , attempt 1, status dbAwake, Delay: 2000
Mar 24 14:07:54 MBE5 mythbackend: mythbackend[3311]: I CoreContext
mythcontext.cpp:891 (TestDBconnection) Start up testing connections. DB
localhost, BE , attempt 2, status dbAwake, Delay: 2000
Mar 24 14:07:59 MBE5 mythbackend: mythbackend[3311]: I CoreContext
mythcontext.cpp:891 (TestDBconnection) Start up testing connections. DB
localhost, BE , attempt 3, status dbAwake, Delay: 2000
Mar 24 14:08:04 MBE5 mythbackend: mythbackend[3311]: I CoreContext
mythcontext.cpp:891 (TestDBconnection) Start up testing connections. DB
localhost, BE , attempt 4, status dbAwake, Delay: 2000

MySQL is running and I can connect to it from the command line.I have these
lines in mysqld.cnf. I changed 127.0.0.1 to 192.168.0.120 in order to allow
the remote frontend to connect and that was working nicely earlier.

###bind-address = 127.0.0.1
###mysqlx-bind-address = 127.0.0.1
bind-address = 192.168.0.120
mysqlx-bind-address = 192.168.0.120

Any ideas why nothing can connect?
Re: Frontends can't connect [ In reply to ]
On Sun, 24 Mar 2024 14:10:49 +1100, you wrote:

>I've just done a new installation of MythTV 34 on Xubuntu 22.04. It was all
>working with remote frontends connecting and the Web App connecting on
>http://192.168.0.120:6544/.
>
>Then I don't know what happened but it stopped working and I can't connect
>any more.
>
>If I go to http://192.168.0.120:6544/ it says:
>
> This site can?t be reached
> 192.168.0.120 refused to connect.
>
>And the local frontend on the same machine as the backend can't connect. It
>says
> Unable to connect to master backend.
>
>And the remote frontend gives the same error.
>
>Mythbackend.log has these lines which I suspect means something is wrong:
>
>Mar 24 14:07:48 MBE5 mythbackend: mythbackend[3311]: I CoreContext
>mythcontext.cpp:891 (TestDBconnection) Start up testing connections. DB
>localhost, BE , attempt 0, status dbAwake, Delay: 2000
>Mar 24 14:07:49 MBE5 mythbackend: mythbackend[3311]: I CoreContext
>mythcontext.cpp:891 (TestDBconnection) Start up testing connections. DB
>localhost, BE , attempt 1, status dbAwake, Delay: 2000
>Mar 24 14:07:54 MBE5 mythbackend: mythbackend[3311]: I CoreContext
>mythcontext.cpp:891 (TestDBconnection) Start up testing connections. DB
>localhost, BE , attempt 2, status dbAwake, Delay: 2000
>Mar 24 14:07:59 MBE5 mythbackend: mythbackend[3311]: I CoreContext
>mythcontext.cpp:891 (TestDBconnection) Start up testing connections. DB
>localhost, BE , attempt 3, status dbAwake, Delay: 2000
>Mar 24 14:08:04 MBE5 mythbackend: mythbackend[3311]: I CoreContext
>mythcontext.cpp:891 (TestDBconnection) Start up testing connections. DB
>localhost, BE , attempt 4, status dbAwake, Delay: 2000
>
>MySQL is running and I can connect to it from the command line.I have these
>lines in mysqld.cnf. I changed 127.0.0.1 to 192.168.0.120 in order to allow
>the remote frontend to connect and that was working nicely earlier.
>
>###bind-address = 127.0.0.1
>###mysqlx-bind-address = 127.0.0.1
>bind-address = 192.168.0.120
>mysqlx-bind-address = 192.168.0.120
>
>Any ideas why nothing can connect?

Those messages say "DB localhost", so mythbackend is still trying to
connect to MySQL on localhost, and is unable to as you have told MySQL
to only bind to 192.168.0.120. You probably want to set this:

bind-address = 127.0.0.1,192.168.0.120

It is best if you allow mythbackend to connect using localhost as it
will then actually use a Unix socket connection, which is the fastest
possible connection type. If you force mythbackend to use the
external IP of your box, its database connection speed will be greatly
reduced.

That syntax only works for MySQL versions >= 8.0.13, and I have no
idea what the current version is as I use MariaDB (which is at 10.6.16
on Ubuntu 22.04, so that syntax will not work as 10.11 is required for
MariaDB). If you can only use one address in bind-address, then you
should use * (all IPv4 and IPv6 addresses) or 0.0.0.0 (all IPv4
addresses).

If you are not using the MySQL X plugin, then you do not need the
mysqlx-bind-address setting. If you are using the X plugin, then you
should probably set mysqlx-bind-address to the same as bind-address.
_______________________________________________
mythtv-users mailing list
mythtv-users@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-users
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org
Re: Frontends can't connect [ In reply to ]
>
> Those messages say "DB localhost", so mythbackend is still trying to
> connect to MySQL on localhost, and is unable to as you have told MySQL
> to only bind to 192.168.0.120. You probably want to set this:
>
> bind-address = 127.0.0.1,192.168.0.120
>

Thanks Stephen, that was the solution. I thought I'd actually tried that
before and it hasn't worked. I must have got it wrong.

>