[SOLVED] Master v0.28-pre-1487-g746897b wont connect

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

Moderator: Forum Moderators

Post Reply
jksj
Senior
Posts: 148
Joined: Thu Feb 13, 2014 7:53 pm
Great Britain

[SOLVED] Master v0.28-pre-1487-g746897b wont connect

Post by jksj »

The front and back ends of my localhost install (ubuntu 14.04 latest)will not connect after updating from git today 4th june
Reverting to v0.28-pre-1463-g23813a5 2nd June and all is fine.
As there is a schema change between these, fault finding is non trivual.
In the three config.xml files the adresses are defined as :
<Database>
<PingHost>1</PingHost>
<Host>127.0.0.1</Host>
<UserName>mythtv</UserName>
<Password>xxxxxx</Password>
<DatabaseName>mythconverg</DatabaseName>
<Port>3306</Port>

Code: Select all

tv@tv:~$ ifconfig
eth3      Link encap:Ethernet  HWaddr d4:3d:7e:df:87:0e  
          inet addr:192.168.1.108  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::d63d:7eff:fedf:870e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:21447 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16335 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:7552794 (7.5 MB)  TX bytes:18424943 (18.4 MB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:11613 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11613 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:55508422 (55.5 MB)  TX bytes:55508422 (55.5 MB)

tv@tv:~$
looking at the code for "Fix connection to Master Backend where the master IP address is an IPv6 address"
The database holds the following values for these variables on a working system ie 2nd June
MasterServerIP has value localhost
MasterServerPort 6543
BackendServerIP localhost
BackendServerIP6 ::1
The log on the latest v0.28-pre-1487-g746897b shows:-

Code: Select all

Jun  4 09:01:31 tv mythfrontend: mythfrontend[11460]: I CoreContext serverpool.cpp:399 (listen) Listening on TCP 127.0.0.1:6547
Jun  4 09:01:31 tv mythfrontend: mythfrontend[11460]: I CoreContext serverpool.cpp:399 (listen) Listening on TCP 192.168.1.108:6547
Jun  4 09:01:31 tv mythfrontend: mythfrontend[11460]: I CoreContext serverpool.cpp:399 (listen) Listening on TCP [::1]:6547
un  4 09:01:32 tv mythfrontend: mythfrontend[11460]: I CoreContext mythudplistener.cpp:32 (Enable) UDPListener: Enabling
Jun  4 09:01:32 tv mythfrontend: mythfrontend[11460]: I CoreContext serverpool.cpp:494 (bind) Binding to UDP 127.0.0.1:6948
Jun  4 09:01:32 tv mythfrontend: mythfrontend[11460]: I CoreContext serverpool.cpp:494 (bind) Binding to UDP 192.168.1.108:6948
Jun  4 09:01:32 tv mythfrontend: mythfrontend[11460]: I CoreContext serverpool.cpp:494 (bind) Binding to UDP [::1]:6948
Jun  4 09:01:32 tv mythfrontend: mythfrontend[11460]: I CoreContext serverpool.cpp:494 (bind) Binding to UDP [fe80::d63d:7eff:fedf:870e%eth3]:6948

Jun  4 09:01:32 tv mythfrontend: mythfrontend[11460]: I SendMessage mythcorecontext.cpp:425 (ConnectCommandSocket) MythCoreContext: Connecting to backend server: :6543 (try 1 of 1)
Jun  4 09:01:32 tv mythfrontend: mythfrontend[11460]: E SendMessage mythcorecontext.cpp:930 (GetBackendServerIP) No address defined for host: 
Jun  4 09:01:32 tv mythfrontend: mythfrontend[11460]: E SendMessage mythsocket.cpp:398 (ConnectToHost) MythSocket(7efe1c00c710:-1): Unable to lookup: 
Jun  4 09:01:32 tv mythfrontend: mythfrontend[11460]: E SendMessage mythcorecontext.cpp:495 (ConnectCommandSocket) Connection to master server timed out.#012#011#011#011Either the server is down or the master server settings#012#011#011#011in mythtv-settings does not contain the proper IP address
Presumably this is a configuration issue about how the address is defined -Any thoughts?
I am using the system perhaps unwisely as my main TV so I had to revert to the 2nd June build.
User avatar
rwagner
Developer
Posts: 217
Joined: Thu Feb 06, 2014 11:37 pm
United States of America

Re: Master v0.28-pre-1487-g746897b wont connect

Post by rwagner »

BackendServerIP localhost
"localhost" is not an IP address. The dialog in mythtv-setup should have never even allowed you to configure that.
jksj
Senior
Posts: 148
Joined: Thu Feb 13, 2014 7:53 pm
Great Britain

Re: Master v0.28-pre-1487-g746897b wont connect

Post by jksj »

Thanks for the comment but config.xml contains <Host>127.0.0.1</Host> not localhost, something within setup must have converted it to localhost in the database. This setup has been working since 0.24 & gone through all versions to 0.28 so I am a bit loathe to change anything at this point. What could I change?
User avatar
jyavenard
Developer
Posts: 50
Joined: Thu Feb 13, 2014 3:19 am
Australia

Re: Master v0.28-pre-1487-g746897b wont connect

Post by jyavenard »

start mythtv-setup and set the IPV4 address to 127.0.0.1 and not localhost

the way the backend works, it checks the IPv6 address, if the IPV6 address is ::1 and the IPV4 address isn't. It then use IPV4.

It was like so before...

My guess is that my changes broke thing, because in order to insure there's no issue detecting who the master backend is, it will clean the IP address.
Eg. 192.168.001.001 will become 192.168.1.1, so whichever may you enter your address, the dumb string comparison that is currently use will not fail.

As the setting in mythtv-setup is always supposed to be an IP address, I didn't think of checking it wasn't, and resolve the IP if it was a name

Previously you would have been allowed to enter localhost and it would have worked so long as you used "localhost" everywhere...

So in the mean time, run mythtv-setup, go into General and set the IPV4 address to be an actual IP and not a hostname
and I'll add some changes so an existing data will be resolved if it's not an ip address.
User avatar
rwagner
Developer
Posts: 217
Joined: Thu Feb 06, 2014 11:37 pm
United States of America

Re: Master v0.28-pre-1487-g746897b wont connect

Post by rwagner »

jksj wrote:Thanks for the comment but config.xml contains <Host>127.0.0.1</Host> not localhost, something within setup must have converted it to localhost in the database.
config.xml stores the location of the database. The setting in the database stores the location of the backend. MythTV has never supported the use of a host name for that setting.
jksj
Senior
Posts: 148
Joined: Thu Feb 13, 2014 7:53 pm
Great Britain

Re: Master v0.28-pre-1487-g746897b wont connect

Post by jksj »

Fixed by changing localhost in the two dialogues within Mythtv-setup and the one within the frontend to 127.0.0.1.
Thanks for the info.
jksj
Senior
Posts: 148
Joined: Thu Feb 13, 2014 7:53 pm
Great Britain

Re: Master v0.28-pre-1487-g746897b wont connect

Post by jksj »

By the way Mythtv-setup offers localhost as an option in the dialogue box so this should be removed. There will be others that fall into this one.
User avatar
rwagner
Developer
Posts: 217
Joined: Thu Feb 06, 2014 11:37 pm
United States of America

Re: [SOLVED] Master v0.28-pre-1487-g746897b wont connect

Post by rwagner »

Mythtv-setup populates that dialog box with your current database setting, and all other IP addresses currently available on the system. It only offered "localhost" as an option because you already had that configured. What does concern me is that you should have never gotten through schema update 1296 with a hostname configured as an IP address. It should have picked up the invalid address, and reset you to 127.0.0.1.
varneyb
Newcomer
Posts: 7
Joined: Fri Sep 20, 2019 11:25 pm
United States of America

Re: [SOLVED] Master v0.28-pre-1487-g746897b wont connect

Post by varneyb »

fixed by changing localhost in the two dialogues within Mythtv-setup and the one within the frontend to 127.0.0.1
I only found one in setup - under "General". Where is the other one?
User avatar
bill6502
Developer
Posts: 2299
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: [SOLVED] Master v0.28-pre-1487-g746897b wont connect

Post by bill6502 »

@varneyb, are you running v0.28-pre? There have been changes in later
releases. In v30, you'll see: Primary IP address/DNS name: plus a checkbox
for Master.

In config.xml, for a combined BE/FE, the Host value should be localhost unless
the DB is on a different host.
Post Reply