[mythtv-users] [fixed] help with v0.28->v29 on Ubuntu 16.04

Vincent McIntyre vincent.mcintyre at gmail.com
Sun Nov 11 02:33:16 UTC 2018


On Sun, Nov 11, 2018 at 12:10:19PM +1100, Vincent McIntyre wrote:
> On Sun, Nov 11, 2018 at 12:01:40PM +1100, Vincent McIntyre wrote:
> > Hi
> > 
> > I need a nudge in the right direction here.
> > I upgraded to v29 today and cannot get the setup
> > procedure to talk to the database.
> > 
> 
> This seems to be the same issue as Phill Edwards had
> (Frontends can't connect after 0.29 upgrade)
> but he was unsure what it was he did to fix things.
> 

Well after emailing the mythtv gods, the same thing happened to me -
I went through these steps again and the frontend started normally.

 - % ssh -XC frontend at backend
 - $ sudo systemctl stop mythtv-backend
 - $ sudo systemctl stop lightdm #kills autostarting mythfrontend
 - $ mythtv-setup -w
 - in the 'host address backend setup' page,
   don't change anything, but 'save and exit'
 - in the menu, exit. Can't recall if 'save and exit' was offered.
 - $ sudo systemctl start mythtv-backend
 - $ sudo systemctl start lightdm
 

mythtv-setup did make this change in ~/.mythtv/config.xml

--- config.xml.old
+++ .mythtv/config.xml
@@ -1,7 +1,7 @@
 <Configuration>
   <Database>
     <PingHost>1</PingHost>
-    <Host>localhost</Host>
+    <Host>127.0.0.1</Host>
     <UserName>mythtv</UserName>

which from the timestamp must have happened on the last,
successful, attempt.

There was one other change before I reran the sequence above.
As a test I had changed mysql to use 'bind-address=0.0.0.0'.
It was set like this while running mythtv-setup as shown above.
I have now changed it back to the original 'bind-address=127.0.0.1'
and things continue to work normally. But I have not tried running
mythtv-setup again.

I also noticed something that may be at the root of all this;
name resolution for 'localhost'.

$ grep local /etc/hosts
127.0.0.1	localhost
::1     localhost ip6-localhost ip6-loopback

$ host 127.0.0.1
1.0.0.127.in-addr.arpa domain name pointer localhost.localdomain.

$ host localhost.localdomain
localhost.localdomain has address 127.0.0.1

BUT

$ host localhost
localhost.<privatedomain> has address 127.0.0.1
The <privatedomain> is a private TLD I use internally.

So perhaps the issue was not using a FQDN for <Host></Host>?
This seems unlikely to me as all variants of 'localhost'
resolve to the same IP address.


To try and narrow this down I dug around in mythtv-setup.log.
It did not show any smoking guns but it did remind me
that on the first attempt at running mythtv-setup using
the sequence above, I had gone into the to 'host address backend setup'
page and 'save & exit'ed back to the top-level page.
I had to abort this session by killing the xterm that opened
the mythtv-setup window. So perhaps if I had exited that cleanly,
the procedure would have worked first time.

I also looked at mythfrontend.log since that was where the
problems remained unresolved. There are lots of connection
attempts, like so

  I CoreContext mythcontext.cpp:852 (TestDBconnection) Start up testing connections. DB localhost, BE , attempt 2, status beAwake
  I CoreContext mythcontext.cpp:852 (TestDBconnection) Start up testing connections. DB localhost, BE , attempt 3, status beAwake
  ...
  I CoreContext mythcontext.cpp:852 (TestDBconnection) Start up testing connections. DB localhost, BE , attempt 10, status beAwake
  I CoreContext mythcontext.cpp:971 (TestDBconnection) Start up failure. host localhost, status beAwakeFail
  A CoreContext mythcontext.cpp:509 (FindDatabase) Cannot connect to backend
  E CoreContext main.cpp:1878 (main) Failed to init MythContext, exiting.

Sometimes there was an attempt to talk to port 6543:
  I SendMessage mythcorecontext.cpp:448 (ConnectCommandSocket) MythCoreContext::ConnectCommandSocket(): Connecting to backend server: 127.0.0.1:6543 (try 1 of 1)
  I SendMessage mythcorecontext.cpp:1665 (CheckProtoVersion) MythCoreContext::CheckProtoVersion(): Using protocol version 91 BuzzOff

Same thing when I tried with 127.0.0.1.

But again no smoking gun.

Vince



More information about the mythtv-users mailing list