Mailing List Archive

Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28)
This question didn't get any traction on the Mythbuntu forum so I thought
I'd ask here...

I installed 16.04 beta 2 and MythTV Mythbuntu 0.28 (both updated to the
latest versions as of yesterday) and for the most part it's solid - can
record and watch shows, etc. But mythweb and mythtv-status are not working
100%. I'll describe my mythtv-status problem, since I suspect that if I can
fix that, my mythweb connection issue will be fixed as well.

When I run mythtv-status, I get this:

> $ mythtv-status
> MythTV status for localhost
> ===========================
> Status...........: 2016-04-10 18:07:31
> Total Disk Space.: Total space is 5.4 TB, with 4.6 TB used (85.2%)
> Next Recording In: 35 Minutes
> Scheduled Recordings:
> 2016-04-10 18:43:00 - Fear the Walking Dead (AMC HD (Pacific))
> 2016-04-10 20:00:00 - Madam Secretary (KIONDT (KION-DT))
> Schedule Conflicts:
> Unable to access MythTV Perl API. Try with --verbose to find out why.


When I try --verbose, I see what appears to be the same issue I have with
mythweb:

> Failed to load Perl API
> Couldn't communicate with 192.168.1.100 on port 6543:
> IO::Socket::INET::MythTV: connect: Connection refused


Any ideas why/how mythtv-status seems to be able to connect to the database
for scheduled recordings but not for conflicts? Not sure where to look
next...
Re: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
On Fri, 15 Apr 2016 10:03:51 -0700, you wrote:

>This question didn't get any traction on the Mythbuntu forum so I thought
>I'd ask here...
>
>I installed 16.04 beta 2 and MythTV Mythbuntu 0.28 (both updated to the
>latest versions as of yesterday) and for the most part it's solid - can
>record and watch shows, etc. But mythweb and mythtv-status are not working
>100%. I'll describe my mythtv-status problem, since I suspect that if I can
>fix that, my mythweb connection issue will be fixed as well.
>
>When I run mythtv-status, I get this:
>
>> $ mythtv-status
>> MythTV status for localhost
>> ===========================
>> Status...........: 2016-04-10 18:07:31
>> Total Disk Space.: Total space is 5.4 TB, with 4.6 TB used (85.2%)
>> Next Recording In: 35 Minutes
>> Scheduled Recordings:
>> 2016-04-10 18:43:00 - Fear the Walking Dead (AMC HD (Pacific))
>> 2016-04-10 20:00:00 - Madam Secretary (KIONDT (KION-DT))
>> Schedule Conflicts:
>> Unable to access MythTV Perl API. Try with --verbose to find out why.
>
>
>When I try --verbose, I see what appears to be the same issue I have with
>mythweb:
>
>> Failed to load Perl API
>> Couldn't communicate with 192.168.1.100 on port 6543:
>> IO::Socket::INET::MythTV: connect: Connection refused
>
>
>Any ideas why/how mythtv-status seems to be able to connect to the database
>for scheduled recordings but not for conflicts? Not sure where to look
>next...

I am just guessing, but mythtv-status may not be compatible with 0.28
yet. So when it calls the old 0.27 API call for the scheduler
conflicts, that call may have changed in 0.28 and fails.
_______________________________________________
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: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
Hoi Fred,

Friday, April 15, 2016, 7:03:51 PM, you wrote:

> This question didn't get any traction on the Mythbuntu forum so I thought I'd ask here...


> I installed 16.04 beta 2 and MythTV Mythbuntu 0.28 (both updated to
> the latest versions as of yesterday) and for the most part it's
> solid - can record and watch shows, etc. But mythweb and
> mythtv-status are not working 100%. I'll describe my mythtv-status
> problem, since I suspect that if I can fix that, my mythweb
> connection issue will be fixed as well.



> When I run mythtv-status, I get this:
> $ mythtv-status
> MythTV status for localhost
> ===========================
> Status...........: 2016-04-10 18:07:31
> Total Disk Space.: Total space is 5.4 TB, with 4.6 TB used (85.2%)
> Next Recording In: 35 Minutes
> Scheduled Recordings:
> 2016-04-10 18:43:00 - Fear the Walking Dead (AMC HD (Pacific))
> 2016-04-10 20:00:00 - Madam Secretary (KIONDT (KION-DT))
> Schedule Conflicts:
> Unable to access MythTV Perl API. Try with --verbose to find out why.



> When I try --verbose, I see what appears to be the same issue I have with mythweb:
> Failed to load Perl API
> Couldn't communicate with 192.168.1.100 on port 6543:
> IO::Socket::INET::MythTV: connect: Connection refused



> Any ideas why/how mythtv-status seems to be able to connect to the
> database for scheduled recordings but not for conflicts? Not sure where to look next...


My first thought with "Failed to load Perl API" is whether the API is
there. But seeing Stephens reply, my second thought is whether it is
the right (0.28) API.

Tot mails,
Hika mailto:hikavdh@gmail.com

"Zonder hoop kun je niet leven
Zonder leven is er geen hoop
Het eeuwige dilemma
Zeker als je hoop moet vernietigen om te kunnen overleven!"

De lerende Mens

_______________________________________________
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: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
Thanks - I see what you're saying. For what it's worth, I've been running
0.28 under 14.04 for over a year and mythtv-status worked fine. But this
is a completely new 16.04 / 0.28 install - only thing in common is the
mythtv database.

I was thinking it's not a problem with (only) mythtv-status because mythweb
fails with a similar error:

> Unable to connect to the master backend at 192.168.1.100:6543


Although I can't find anything wrong with my passwords or permissions...

I'll start looking for some relevant logfiles...
Re: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
>________________________________
> From: Fred Hamilton <fred@yonkitime.com>
>To: Discussion about MythTV <mythtv-users@mythtv.org>
>Sent: Friday, April 15, 2016 11:12 AM
>Subject: Re: [mythtv-users] Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28)
>
>
>
>Thanks - I see what you're saying. For what it's worth, I've been running 0.28 under 14.04 for over a year and mythtv-status worked fine. But this is a completely new 16.04 / 0.28 install - only thing in common is the mythtv database.
>
>
>I was thinking it's not a problem with (only) mythtv-status because mythweb fails with a similar error:
>Unable to connect to the master backend at 192.168.1.100:6543
>
>
>Although I can't find anything wrong with my passwords or permissions...
>
>
>I'll start looking for some relevant logfiles...
>



Just guesses, but maybe there is a needed perl library that hasn't been loaded or a misconfigured or missing config.xml file somewhere?
_______________________________________________
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: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
OK, I believe I have narrowed it down to an IP address / localhost issue.

The mythtv-status error message is:

> Couldn't communicate with 192.168.1.100 on port 6543:
> IO::Socket::INET::MythTV: connect: Connection refused


So I did these two tests:

> $ wget 192.168.1.100:6543
> --2016-04-15 14:40:56-- http://192.168.1.100:6543/
> Connecting to 192.168.1.100:6543... failed: Connection refused.


and

$ wget localhost:6543
> --2016-04-15 14:41:43-- http://localhost:6543/
> Resolving localhost (localhost)... 127.0.0.1, 192.168.1.100
> Connecting to localhost (localhost)|127.0.0.1|:6543... connected.
> HTTP request sent, awaiting response...


So localhost works and 192.168.1.100 (my PC's IP address) doesn't, even
though I thought they were equivalent.

Normally I'd start changing "localhost" to "192.168.1.100" (or vice versa)
everywhere I can, but I've decided it might be wiser to try to get the
advice of someone who knew what they were doing.

Can this be resolved more simply (maybe in /etc/hosts?)?
Re: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
>________________________________
> From: Fred Hamilton <fred@yonkitime.com>
>To: Discussion about MythTV <mythtv-users@mythtv.org>
>Sent: Friday, April 15, 2016 2:50 PM
>Subject: Re: [mythtv-users] Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28)
>
>
>
>OK, I believe I have narrowed it down to an IP address / localhost issue.
>
>
>The mythtv-status error message is:
>Couldn't communicate with 192.168.1.100 on port 6543: IO::Socket::INET::MythTV: connect: Connection refused
>
>
>So I did these two tests:
>$ wget 192.168.1.100:6543
>>--2016-04-15 14:40:56-- http://192.168.1.100:6543/
>>Connecting to 192.168.1.100:6543... failed: Connection refused.
>
>
>and
>
>
>$ wget localhost:6543
>>--2016-04-15 14:41:43-- http://localhost:6543/
>>Resolving localhost (localhost)... 127.0.0.1, 192.168.1.100
>>Connecting to localhost (localhost)|127.0.0.1|:6543... connected.
>>HTTP request sent, awaiting response...
>
>
>So localhost works and 192.168.1.100 (my PC's IP address) doesn't, even though I thought they were equivalent.
>
>
>Normally I'd start changing "localhost" to "192.168.1.100" (or vice versa) everywhere I can, but I've decided it might be wiser to try to get the advice of someone who knew what they were doing.
>
>
>Can this be resolved more simply (maybe in /etc/hosts?)?
>
>_______________________________________________
>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
>
>

>

Perhaps a bind-address problem in /etc/mysql/my.cnf? Is that set to localhost?
_______________________________________________
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: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
On Fri, 15 Apr 2016 14:50:20 -0700, you wrote:

>OK, I believe I have narrowed it down to an IP address / localhost issue.
>
>The mythtv-status error message is:
>
>> Couldn't communicate with 192.168.1.100 on port 6543:
>> IO::Socket::INET::MythTV: connect: Connection refused
>
>
>So I did these two tests:
>
>> $ wget 192.168.1.100:6543
>> --2016-04-15 14:40:56-- http://192.168.1.100:6543/
>> Connecting to 192.168.1.100:6543... failed: Connection refused.
>
>
>and
>
>$ wget localhost:6543
>> --2016-04-15 14:41:43-- http://localhost:6543/
>> Resolving localhost (localhost)... 127.0.0.1, 192.168.1.100
>> Connecting to localhost (localhost)|127.0.0.1|:6543... connected.
>> HTTP request sent, awaiting response...
>
>
>So localhost works and 192.168.1.100 (my PC's IP address) doesn't, even
>though I thought they were equivalent.
>
>Normally I'd start changing "localhost" to "192.168.1.100" (or vice versa)
>everywhere I can, but I've decided it might be wiser to try to get the
>advice of someone who knew what they were doing.
>
>Can this be resolved more simply (maybe in /etc/hosts?)?

The address for localhost is 127.0.0.1, not your PC's external address
(192.168.1.100). If this is a completely new install, then you may
need to set up mysql so that it is accessible on the external address
and possibly also MythTV, although that option should still be in the
database since it is an upgrade, not new.

Your wget shows localhost being resolved to two addresses, which
suggests that you have a modified /etc/hosts file where localhost has
been set to two addresses, which is not usually a good idea.
_______________________________________________
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: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
On Fri, Apr 15, 2016 at 7:06 PM, Stephen Worthington <
stephen_agent@jsw.gen.nz> wrote:

> The address for localhost is 127.0.0.1, not your PC's external address
> (192.168.1.100). If this is a completely new install, then you may
> need to set up mysql so that it is accessible on the external address
> and possibly also MythTV, although that option should still be in the
> database since it is an upgrade, not new.
>

I've never understood when I should use 'localhost' and when I should use
the external IP address in mythtv. Right now,
MythTV frontend hostname = localhost
MythTV local backend = 192.168.1.100
MythTV master backend = 192.168.1.100
.mythtv/config.xml database host = localhost
/etc/apache2/sites-enabled/mythweb.conf: setenv db_server "localhost"

Is anything obviously wrong there?

Per your advice I've been trying to to set up mysql so that it is
accessible on the external address. No luck so far, but I did notice that
while 'wget 192.168.1.100:6543' fails to connect, 'wget 192.168.1.100:3306'
does connect. Does that help narrow down where the problem might be?

Your wget shows localhost being resolved to two addresses, which
> suggests that you have a modified /etc/hosts file where localhost has
> been set to two addresses, which is not usually a good idea.


You got me - I was trying something in /etc/hosts. I've changed it back
to the default:

> 127.0.0.1 localhost
> 192.168.1.100 MythPC
Re: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
On 16/04/16 18:58, Fred Hamilton wrote:
> On Fri, Apr 15, 2016 at 7:06 PM, Stephen Worthington <
> stephen_agent@jsw.gen.nz> wrote:
>
>> The address for localhost is 127.0.0.1, not your PC's external address
>> (192.168.1.100). If this is a completely new install, then you may
>> need to set up mysql so that it is accessible on the external address
>> and possibly also MythTV, although that option should still be in the
>> database since it is an upgrade, not new.
>>
>
> I've never understood when I should use 'localhost' and when I should use
> the external IP address in mythtv. Right now,
> MythTV frontend hostname = localhost
> MythTV local backend = 192.168.1.100
> MythTV master backend = 192.168.1.100
> .mythtv/config.xml database host = localhost
> /etc/apache2/sites-enabled/mythweb.conf: setenv db_server "localhost"
>
> Is anything obviously wrong there?
>
> Per your advice I've been trying to to set up mysql so that it is
> accessible on the external address. No luck so far, but I did notice that
> while 'wget 192.168.1.100:6543' fails to connect, 'wget 192.168.1.100:3306'
> does connect. Does that help narrow down where the problem might be?
>
> Your wget shows localhost being resolved to two addresses, which
>> suggests that you have a modified /etc/hosts file where localhost has
>> been set to two addresses, which is not usually a good idea.
>
>
> You got me - I was trying something in /etc/hosts. I've changed it back
> to the default:
>
>> 127.0.0.1 localhost
>> 192.168.1.100 MythPC
>
Localhost means "this computer". If you supply that address to the backend, it won't know where to
send anything other than itself.

For any mythtv setup that uses more than a single machine that is both back and front end, you
/must/ give every device an IP address and supply that address to mythtv through setup. That is the
only way that the backend knows where everything is.

--

Mike Perkins

_______________________________________________
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: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
On 16/04/16 19:10, Mike Perkins wrote:
> On 16/04/16 18:58, Fred Hamilton wrote:
>> On Fri, Apr 15, 2016 at 7:06 PM, Stephen Worthington <
>> stephen_agent@jsw.gen.nz> wrote:
>>
>>> The address for localhost is 127.0.0.1, not your PC's external address
>>> (192.168.1.100). If this is a completely new install, then you may
>>> need to set up mysql so that it is accessible on the external address
>>> and possibly also MythTV, although that option should still be in the
>>> database since it is an upgrade, not new.
>>>
>>
>> I've never understood when I should use 'localhost' and when I should use
>> the external IP address in mythtv. Right now,
>> MythTV frontend hostname = localhost
>> MythTV local backend = 192.168.1.100
>> MythTV master backend = 192.168.1.100
>> .mythtv/config.xml database host = localhost
>> /etc/apache2/sites-enabled/mythweb.conf: setenv db_server "localhost"
>>
>> Is anything obviously wrong there?
>>
>> Per your advice I've been trying to to set up mysql so that it is
>> accessible on the external address. No luck so far, but I did notice that
>> while 'wget 192.168.1.100:6543' fails to connect, 'wget 192.168.1.100:3306'
>> does connect. Does that help narrow down where the problem might be?
>>
>> Your wget shows localhost being resolved to two addresses, which
>>> suggests that you have a modified /etc/hosts file where localhost has
>>> been set to two addresses, which is not usually a good idea.
>>
>>
>> You got me - I was trying something in /etc/hosts. I've changed it back
>> to the default:
>>
>>> 127.0.0.1 localhost
>>> 192.168.1.100 MythPC
>>
> Localhost means "this computer". If you supply that address to the backend, it won't know where to
> send anything other than itself.
>
> For any mythtv setup that uses more than a single machine that is both back and front end, you
> /must/ give every device an IP address and supply that address to mythtv through setup. That is the
> only way that the backend knows where everything is.
>
Meh. I meant "If the frontend supplies that address to the backend, the backend won't know where to
send anything other than itself."

--

Mike Perkins

_______________________________________________
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: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
On Sat, Apr 16, 2016 at 2:35 PM, Mike Perkins <mikep@randomtraveller.org.uk>
wrote:

> On 16/04/16 19:10, Mike Perkins wrote:
>
>> Localhost means "this computer". If you supply that address to the
>> backend, it won't know where to
>> send anything other than itself.
>>
>> For any mythtv setup that uses more than a single machine that is both
>> back and front end, you
>> /must/ give every device an IP address and supply that address to mythtv
>> through setup. That is the
>> only way that the backend knows where everything is.
>>
>> Meh. I meant "If the frontend supplies that address to the backend, the
> backend won't know where to send anything other than itself."


Thanks. I understand localhost = this computer = 127.0.0.1 (usually). My
frontend and backend are on the same machine. So I believe that means they
could use either localhost or 192.168.1.100 or some combination to talk to
each other. In fact, my frontend is using localhost and my backend (at
least as far as mythtv-setup/General is concerned) is set to 192.168.1.100,
and they are working perfectly well together.

My problem is that mythtv-status and mythweb want to access the database
via 192.168.1.100:6543, and the connection gets rejected. I see two
possible solutions:

1) Change a setting / config file somewhere so they instead ask for
127.0.0.1:6543, or
2) Change a setting / config file somewhere so that port 6543 is happy
communicating via 192.168.1.100 (I believe this is the preferred solution
if I ever want to use a remote front end.)

So far I haven't been able to get either 1 or 2 to work. My latest
discovery is this:

$ sudo netstat -tnlp | grep :3306
tcp6 0 0 :::3306 :::* LISTEN
2209/mysqld

$ sudo netstat -tnlp | grep :6543
tcp 0 0 127.0.0.1:6543 0.0.0.0:* LISTEN
2550/mythbackend
tcp6 0 0 ::1:6543 :::* LISTEN
2550/mythbackend

Which is a reminder that port 6543 belongs to mythbackend, not mysq. I'd
like to change the 127.0.0.1:6543 in the second to last line to
192.168.1.100:6543. But I'm not sure where I do that. The IP addresses in
mythtv-setup/General are already set to 192.168.1.100. So I think it's a
field I need to change in the database (hostname?), but I don't know how to
do that yet - looking into it now. But that doesn't sound completely right
either, since this database is a copy of the database on my old machine
(with the same 192.168.1.100 IP address) where mythweb and mythtv-status
worked fine.

Am I on the right track?
Re: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
On Sat, 2016-04-16 at 15:41 -0700, Fred Hamilton wrote:
> On Sat, Apr 16, 2016 at 2:35 PM, Mike Perkins
> <mikep@randomtraveller.org.uk> wrote:
> On 16/04/16 19:10, Mike Perkins wrote:
> Localhost means "this computer". If you supply that
> address to the backend, it won't know where to
> send anything other than itself.
>
> For any mythtv setup that uses more than a single
> machine that is both back and front end, you
> /must/ give every device an IP address and supply that
> address to mythtv through setup. That is the
> only way that the backend knows where everything is.
>
> Meh. I meant "If the frontend supplies that address to the
> backend, the backend won't know where to send anything other
> than itself."
>
>
> Thanks. I understand localhost = this computer = 127.0.0.1 (usually).
> My frontend and backend are on the same machine. So I believe that
> means they could use either localhost or 192.168.1.100 or some
> combination to talk to each other. In fact, my frontend is
> using localhost and my backend (at least as far as
> mythtv-setup/General is concerned) is set to 192.168.1.100, and they
> are working perfectly well together.
>
>
> My problem is that mythtv-status and mythweb want to access the
> database via 192.168.1.100:6543, and the connection gets rejected. I
> see two possible solutions:
>
>
> 1) Change a setting / config file somewhere so they instead ask for
> 127.0.0.1:6543, or
> 2) Change a setting / config file somewhere so that port 6543 is happy
> communicating via 192.168.1.100 (I believe this is the preferred
> solution if I ever want to use a remote front end.)
>
>
> So far I haven't been able to get either 1 or 2 to work. My latest
> discovery is this:
>
>
> $ sudo netstat -tnlp | grep :3306
>
> tcp6 0 0 :::3306 :::*
> LISTEN 2209/mysqld
>
>
> $ sudo netstat -tnlp | grep :6543
> tcp 0 0 127.0.0.1:6543 0.0.0.0:* LISTEN
> 2550/mythbackend
> tcp6 0 0 ::1:6543 :::*
> LISTEN 2550/mythbackend
>
>
> Which is a reminder that port 6543 belongs to mythbackend, not mysq.
> I'd like to change the 127.0.0.1:6543 in the second to last line
> to 192.168.1.100:6543. But I'm not sure where I do that. The IP
> addresses in mythtv-setup/General are already set to 192.168.1.100.
> So I think it's a field I need to change in the database (hostname?),
> but I don't know how to do that yet - looking into it now. But that
> doesn't sound completely right either, since this database is a copy
> of the database on my old machine (with the same 192.168.1.100 IP
> address) where mythweb and mythtv-status worked fine.
>
>
> Am I on the right track?
> _______________________________________________
I think so..

MythWeb (hosted by apache) accesses database thru a mysql server.
Lots of the mythweb features are thru' direct API to BE.

An interconnected collection of mythtv BEs & FEs etc has only one dB &
one dB server. Doesn't have to be on the MBE but easier if it is.
The BE & FE have to bootstrap their dB connection info from config.xml.

To allow remote FEs etc you have to setup mysql server to listen on the
real IP address of the computer it's running on (& set permissions on
"users" &/or IP ranges that can access mythconverg schema).
Clearly "localhost" is not workable for this scenario.

IIUC Recent mysql installations appear to be either be behaving
different or just thrashing the existing setup file (should be putting
custom setting in /etc/mysql/conf.d/mythtv.cnf or similar).

There were some recent changes (0.27+fixes?) affecting name resolving to
IP addresses, this impacted some people's MBE address setup (settings
via mythtv-setup). I think "names" are not valid.


_______________________________________________
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: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
On 04/16/2016 12:58 PM, Fred Hamilton wrote:
> I've never understood when I should use 'localhost' and when I should use
> the external IP address in mythtv. Right now,
> MythTV frontend hostname = localhost
> MythTV local backend = 192.168.1.100
> MythTV master backend = 192.168.1.100
> .mythtv/config.xml database host = localhost
> /etc/apache2/sites-enabled/mythweb.conf: setenv db_server "localhost"
>
> Is anything obviously wrong there?

As long as the above is all on a combined frontend/backend host,
which I believe you mentioned in a later post, looks good. Also
looks like mine, except that the IP addresses are different.

Be sure to check all copies of config.xml, e.g.:

grep "<Host>" {~mythtv,~}/.mythtv/config.xml

Having localhost in the config.xml causes a socket connection
rather than using a TCP connection, which is good.

What do these (run on the backend) return:

nmap -p6543 --reason -6 ::1
nmap -p6543 --reason 127.0.0.1
nmap -p6543 --reason 192.168.1.100

You want to see this:

PORT STATE SERVICE REASON
6543/tcp open mythtv syn-ack

--
Bill
_______________________________________________
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: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
On Sat, Apr 16, 2016 at 5:50 PM, Bill Meek <keemllib@gmail.com> wrote:

> Be sure to check all copies of config.xml, e.g.:
>
> grep "<Host>" {~mythtv,~}/.mythtv/config.xml
>
> Having localhost in the config.xml causes a socket connection
> rather than using a TCP connection, which is good.
>

Check - the grep command returned 2 instances of localhost:

/home/mythtv/.mythtv/config.xml: <Host>localhost</Host>
/home/fred/.mythtv/config.xml: <Host>localhost</Host>

To try to reduce this sort of confusion, I actually
made /home/mythtv/.mythtv/config.xml a link to the editable
/home/fred/.mythtv/config.xml.

What do these (run on the backend) return:
>
> nmap -p6543 --reason -6 ::1
> nmap -p6543 --reason 127.0.0.1
> nmap -p6543 --reason 192.168.1.100
>
> You want to see this:
>
> PORT STATE SERVICE REASON
> 6543/tcp open mythtv syn-ack


The first two work as above. 192.168.1.100 returns
Nmap scan report for MythPC (192.168.1.100)
Host is up, received syn-ack (0.00012s latency).
PORT STATE SERVICE REASON
6543/tcp closed mythtv conn-refused

Not so good...
Re: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
On 04/16/2016 09:13 PM, Fred Hamilton wrote:
> On Sat, Apr 16, 2016 at 5:50 PM, Bill Meek <keemllib@gmail.com> wrote:
...
> What do these (run on the backend) return:
>>
>> nmap -p6543 --reason -6 ::1
>> nmap -p6543 --reason 127.0.0.1
>> nmap -p6543 --reason 192.168.1.100
>>
>> You want to see this:
>>
>> PORT STATE SERVICE REASON
>> 6543/tcp open mythtv syn-ack
>
>
> The first two work as above. 192.168.1.100 returns
> Nmap scan report for MythPC (192.168.1.100)
> Host is up, received syn-ack (0.00012s latency).
> PORT STATE SERVICE REASON
> 6543/tcp closed mythtv conn-refused

OK, that plus your earlier post:

$ sudo netstat -tnlp | grep :6543
tcp 0 0 127.0.0.1:6543 0.0.0.0:* LISTEN 2550/mythbackend
tcp6 0 0 ::1:6543 :::* LISTEN 2550/mythbackend

says the backend isn't listening on the Private Network address.
It is listening on localhost and localhost6.

When the backend starts, you should see lines similar to these in
mythbackend.log:

... CoreContext serverpool.cpp:407 (listen) - Listening on TCP 127.0.0.1:6543
... CoreContext serverpool.cpp:407 (listen) - Listening on TCP 192.168.1.100:6543

I suspect the 1st is there, but the 2nd isn't (there are more, this is just a sample.)

Since earlier you mentioned changing some /etc/hosts entries, I'd
give this box a warm restart. Just restarting the backend might work.
As I recall, the BE only detects available addresses when it starts up.

Then when it comes backup, does ifconfig show your 192.168.1.100 address on
a line like this:

inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0

--
Bill
_______________________________________________
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: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
On Sat, Apr 16, 2016 at 8:09 PM, Bill Meek <keemllib@gmail.com> wrote:

> says the backend isn't listening on the Private Network address.
> It is listening on localhost and localhost6.
>

Yep.

When the backend starts, you should see lines similar to these in
> mythbackend.log:
>
> ... CoreContext serverpool.cpp:407 (listen) - Listening on TCP
> 127.0.0.1:6543
> ... CoreContext serverpool.cpp:407 (listen) - Listening on TCP
> 192.168.1.100:6543


After a fresh reboot:
...CoreContext serverpool.cpp:407 (listen) Listening on TCP 127.0.0.1:6543
...CoreContext serverpool.cpp:407 (listen) Listening on TCP [::1]:6543

Those are the only "6543"s in the log. There are otherwise identical
messages for ports 6544, 6554, and 6549.


> I suspect the 1st is there, but the 2nd isn't (there are more, this is
> just a sample.)
>

Yep.


> Since earlier you mentioned changing some /etc/hosts entries, I'd
> give this box a warm restart. Just restarting the backend might work.
> As I recall, the BE only detects available addresses when it starts up.
>
> Then when it comes backup, does ifconfig show your 192.168.1.100 address on
> a line like this:
>
> inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0


Yep: inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0

Really appreciating the help, Bill - thanks for your time and patience!
Re: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
On 04/16/2016 11:12 PM, Fred Hamilton wrote:
> Yep: inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0

I'd restart the backend with additional logging, and here's
how with 0.28 and 16.04 (and Mythbuntu.):

1st, make sure Mythbuntu allows configuring more logging
without editing the .service file

Type this:

systemctl cat mythtv-backend | egrep -i additional

and expect to see likes like these:

EnvironmentFile=-/etc/mythtv/additional.args
ExecStart= ... mythbackend ... $ADDITIONAL_ARGS

If the above aren't there, stop, the rest of this won't
work. If you can restart the backend with -v general:debug,
that's the goal. mythbackend --setverbose ... won't help here.

If the above are present, then sudo yourFavoriteEditor /etc/mythtv/additional.args

and add the following in the file (make sure there are no
other lines that don't begin with a # in the file (it may
not even exist, which is OK):

ADDITIONAL_ARGS="-v general:debug"

Now restart the backend

sudo systemctl restart mythtv-backend

Pastebin the log from the line similar to:

mythbackend version: master [v0.28.....

through:

Bonjour: Service registration complete:..... or at least the last line of:
Listening on TCP ......

It should only be about 100 lines.

There should be additional information about the addresses used
which is based on your settings plus a loop through all available
NICs and all available addresses on each NIC.

--
Bill
_______________________________________________
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: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
On Sun, Apr 17, 2016 at 7:33 AM, Bill Meek <keemllib@gmail.com> wrote:

> 1st, make sure Mythbuntu allows configuring more logging
> without editing the .service file
>

It does (at least it returned what you expected).


> Pastebin the log from the line similar to:
>
> mythbackend version: master [v0.28.....
>
> through:
>
> Bonjour: Service registration complete:..... or at least the last line
> of:
> Listening on TCP ......
>

I didn't have a line like the first one so I just posted from the start
through bonjour: http://pastebin.com/HNNTbKq5


> There should be additional information about the addresses used
> which is based on your settings plus a loop through all available
> NICs and all available addresses on each NIC.


I didn't notice any additional NIC info in this log. I'm looking at
/var/log/mythtv/mythbackend.log. Is it possible the additional logging
goes somewhere else? I double-checked that the file I edited == the
EnvironmentFile
returned by the cat command == /etc/mythtv/additional.args

Is the line immediately preceding the port 6543 activity a sign?
... W CoreContext mainserver.cpp:286 (MainServer) MainServer: Unable to
find IPv4 address to bind
Re: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
On 04/17/2016 11:28 AM, Fred Hamilton wrote:
> I didn't notice any additional NIC info in this log. I'm looking at
> /var/log/mythtv/mythbackend.log. Is it possible the additional logging
> goes somewhere else? I double-checked that the file I edited == the
> EnvironmentFile
> returned by the cat command == /etc/mythtv/additional.args
>
> Is the line immediately preceding the port 6543 activity a sign?
> ... W CoreContext mainserver.cpp:286 (MainServer) MainServer: Unable to
> find IPv4 address to bind

The log is great and the Warning plus this Critical point to the same
issue:

C CoreContext serverpool.cpp:269 (SelectDefaultListen) ServerPool: Host is configured to listen on 192.168.1.100, but address is not used on any
local network interfaces.

This debug may be the key: ... Adding BackendServerIP6 to address list
which is good, but there's no matching BackendServer (for IPv4) in the log.

If you're comfortable with SQL, then try this:

SELECT * FROM settings WHERE value LIKE "%ServerIP%" ORDER BY hostname,value;

Expect to see something like this, and nothing more:

| MasterServerIP | 192.168.1.100 | NULL |
| BackendServerIP | 192.168.1.100 | MythPC |
| BackendServerIP6 | ::1 | MythPC |

You probably have Listen On Link Local turned off or else there'd
be an entry that had your Ethernet interface's name, e.g. eth0, enp4s1 etc.

The last time I had one of these was from a stale remote backend entry.

Be sure to comment out the entry in additional.args (or you
can safely remove the file.)

--
Bill
_______________________________________________
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: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
On Sun, Apr 17, 2016 at 10:22 AM, Bill Meek <keemllib@gmail.com> wrote:

> If you're comfortable with SQL, then try this:
>
> SELECT * FROM settings WHERE value LIKE "%ServerIP%" ORDER BY
> hostname,value;
>
> Expect to see something like this, and nothing more:
>
> | MasterServerIP | 192.168.1.100 | NULL |
> | BackendServerIP | 192.168.1.100 | MythPC |
> | BackendServerIP6 | ::1 | MythPC |
>

I got exactly that, nothing more.

You probably have Listen On Link Local turned off or else there'd
> be an entry that had your Ethernet interface's name, e.g. eth0, enp4s1 etc.
>

Unfortunately Listen On Link Local was turned on (according to the first
page of mythtv-setup/General). On turned it off and rebooted, then turned
it back on and rebooted. Is there somewhere else it could be set/verified?
Re: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
On 04/17/2016 02:24 PM, Fred Hamilton wrote:
> Unfortunately Listen On Link Local was turned on (according to the first
> page of mythtv-setup/General). On turned it off and rebooted, then turned
> it back on and rebooted. Is there somewhere else it could be set/verified?

That's OK, there would just be an entry in the logs with the Link Local address
and it's interface name.

When/if you go into mythtv-setup and try to change the Backend Server IP, does
the list cycle through multiple addresses, or just the 127... one?

Looking to see if setup can 'see' the 192... address.

--
Bill
_______________________________________________
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: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
On Sun, Apr 17, 2016 at 2:57 PM, Bill Meek <keemllib@gmail.com> wrote:

> On 04/17/2016 02:24 PM, Fred Hamilton wrote:
>
>> Unfortunately Listen On Link Local was turned on (according to the first
>> page of mythtv-setup/General). On turned it off and rebooted, then turned
>> it back on and rebooted. Is there somewhere else it could be
>> set/verified?
>>
>
> That's OK, there would just be an entry in the logs with the Link Local
> address
> and it's interface name.
>
> When/if you go into mythtv-setup and try to change the Backend Server IP,
> does
> the list cycle through multiple addresses, or just the 127... one?
>

Local Backend IPv4 choices are 192.168.1.100 and 127.0.0.1.
IPv6 is ::1 and fe80::a62:66ff:fe2d:2b66%enp4s0

Master Backend address is 192.168.1.100.
Re: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
After cleaning up some orphaned database entries, I only have one error in
my backend log:
E CoreContext mmulticastsocketdevice.cpp:60 (MMulticastSocketDevice)
MMulticastSocketDevice(239.255.255.250:31): setsockopt - IP_ADD_MEMBERSHIP
#012#011#011#011eno: No such device (19)

I have no idea what this is or if it's related to this problem but since
there's an IP address involved, I thought I'd let you know.
Re: Unable to connect to the master backend at 192.168.1.100:6543 (16.04 & 0.28) [ In reply to ]
Here's a dump of my database settings: http://pastebin.com/vaNhDvTT

Is this 'NULL' OK?
('MasterServerIP','192.168.1.100',NULL);

No reference to localhost or 127.0.0.1 anywhere...

1 2  View All