[mythtv-users] Mythbackend error: Failed to connect to (127.0.0.1:6543)

Paul Shepherd pshepherd99 at gmail.com
Sun Nov 11 18:35:58 UTC 2018


> -----Original Message-----
> From: R. G. Newbury <newbury at mandamus.org>
> Sent: 09 November 2018 18:34
> To: Paul Shepherd <pshepherd99 at gmail.com>
> Subject: Re: [mythtv-users] Mythbackend error: Failed to connect to
> (127.0.0.1:6543)
> 
> On 2018-11-07 05:16 AM, Paul Shepherd wrote:
> 
> >> -----Original Message-----
> >> From: mythtv-users <mythtv-users-bounces at mythtv.org> On Behalf Of
> >> Stephen Worthington
> < big snip>
> >>[mythconverg]> select * from settings where value
> like '%serverip%'
>     -> ;
> +------------------+--------------+-------------------+
> | value            | data         | hostname          |
> +------------------+--------------+-------------------+
> | BackendServerIP  | 192.168.1.11 | antec300.home.org |
> | MasterServerIP   | 127.0.0.1    | NULL              |
> | BackendServerIP6 | ::1          | antec300.home.org |
> +------------------+--------------+-------------------+
> >>3 rows in set (0.00 sec)>
> 
> 
> > Thanks for the suggestion.  I have discovered that the error was the value
> > for the MasterServerIP, in my case it should be 192.168.1.11 rather than
> > 127.0.0.1 (although I don't know why that stops it logging in to the
> > localhost).
> 
> "(although I don't know why that stops it logging in to the
> localhost)"
> 
> Hhhmmm: localhost == 127.0.0.1 Right???
> 
>  From an explicit piece of google-fu:
> 
> "By default, the MySQL/MariaDB user database contains only entries that
> allow access from localhost . But if you skip name resolution, then
> MySQL doesn't translate your connection from 127.0.0.1 to localhost ,
> and thus can't match your connection to any host that's allowed to connect."
> 
> So if 'skip-networking' is not commented out (so as to allow network
> connections), and there is no name resolution, mysql/mariadb will
> not/cannot connect to 127.0.0.1
> 
> ( But 'localhost' *will* work in that spot!! And we all *know* that
> localhost == 127.0.0.1! Right???   Until it doesn't.
> 
> Even if you have a "127.0.0.1 localhost" line in /etc/hosts, it probably
> will not work when 'skip-networking' is 'on', as mysql then uses
> internal sockets, and not TCPIP. Although this is not clear. There may
> be some overlap/passthrough going on.  And that alone may be distro and
> networking setup dependent, making trouble-shooting very difficult.
> 
> (Determination of the parameters of that situation is left to the
> student for independent review, because I sure as hell am not going do it!).
> 
> 
> This is one of the black art bits of knowledge, which is most painful to
> learn. Even attempting to google the problem, requires an explicit
> knowledge of the nature of the problem, or all you get are responses
> which do not correspond to the actual problem. The actual problem
> depends upon the rather arcane difference that 127.0.01 is NOT ==
> localhost, depending upon the networking structure and whether it is
> enabled *for the particular program*.
> 
> (Go on: Ask me how I know that!)
> 
> 
>               R. Geoffrey Newbury
> 
> PS.  I suspect some people have problems here because 'skip-networking'
> is "backwards". When 'skip-networking' is 'on' or uncommented,
> networking is 'off'.
> 
> 
Thanks for the input Geoff, I will have a look again at what works re 127.0.0.1 and localhost.  I realised my explanation of the fix wasn't correct when I discovered this post https://code.mythtv.org/trac/ticket/13024 which shows that MasterServerIP and a number of others are deprecated.

I suspect I have unintentionally complicated things by trying to do a smooth switchover and not realising the importance of a hostname change (from xxx.home.org to xxx) which has resulted in multiple entries in the Settings table.

paul 



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



More information about the mythtv-users mailing list