[mythtv-users] Issue with back end host address
Dave Ulrick
d-ulrick at comcast.net
Tue Jun 15 16:38:51 UTC 2021
Under normal operation, the PC is logged in to ZeroTier One and Cisco
AnyConnect VPN, thus giving it multiple IPs:
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: enp5s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel
state UP group default qlen 1000
link/ether 34:e8:94:db:6c:bc brd ff:ff:ff:ff:ff:ff
inet 192.168.4.7/24 brd 192.168.4.255 scope global dynamic
noprefixroute enp5s0
valid_lft 84957sec preferred_lft 84957sec
/* ZeroTier One */
4: <redacted>: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 2800 qdisc fq_codel
state UNKNOWN group default qlen 1000
link/ether <redacted> brd ff:ff:ff:ff:ff:ff
inet <redacted> brd 192.168.194.255 scope global <redacted>
valid_lft forever preferred_lft forever
/* Cisco AnyConnect VPN */
5: cscotun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1390 qdisc
fq_codel state UNKNOWN group default qlen 500
link/none
inet <redacted> brd <redacted> scope global cscotun0
valid_lft forever preferred_lft forever
Note that I can recreate my host IP address issue if I disable ZeroTier
One and the Cisco AnyConnect VPN.
In order to support local DNS while logged in to the Cisco VPN, I have
NetworkManager configured to use DNSmasq for the sake of providing split
DNS.
Just now, I think I stumbled on the reason why mythtv-setup is stuck on
127.0.0.1 as my PC's IP. Evidently it runs gethostbyaddr6 like 'getent
hosts' does:
$ getent hosts calvin.home.du
::1 calvin.home.du localhost
Then, detecting that I disabled IPv6 at boot, it resolves localhost to
127.0.0.1.
'getent ahosts' supposedly calls getaddrinfo which ignores IPv6:
$ getent ahosts calvin.home.du
192.168.4.7 STREAM calvin.home.du
192.168.4.7 DGRAM
192.168.4.7 RAW
I had disabled IPv6 because my LAN router isn't configured to support
IPv6 (for instance, no DHCPv6 server) and I'd seen some services (e.g.,
iSCSI) experience issues due to trying to use IPv6. When I had IPv6
enabled at the kernel level, I had disabled IPv6 on my PC's Ethernet
interface yet an IPv6 IP was still assigned to it. It didn't seem right
to have services trying to use IPv6 when I have done nothing to make
IPv6 work on my LAN.
Now Google turns up some forum posts that suggest that MythTV >= 0.26
can have issues when IPv6 is disabled.
So what am I to do? Turn IPv6 back on at the kernel and deal with any
IPv6-related service issues as they crop up? Please advise...
Dave
On 6/15/21 9:39 AM, Stephen Worthington wrote:
> On Tue, 15 Jun 2021 08:17:26 -0500, you wrote:
>
> Ignore the BackendServerIP setting - I checked in a new MythTV install
> I have in a virtual machine and it is not present there, so that value
> is historical and no longer used. The BackendServerAddr setting is
> the current one.
>
>> Deleting the value of BackendServerIP changes the issue. Now 127.0.0.1
>> is treated as the one-and-only Primary IP Address plus it is assigned to
>> a new instance of BackendServerIP:
>>
>> 1. Stop mythbackend
>> 2. Launch mythtv-setup
>> 3. General.
>> 4. Host Address Backend Setup
>> 5. Uncheck Listen on All IP Addresses
>> 6. Select Primary IP Address/DNS Name
>> 7. The only IP listed is 127.0.0.1.
> I am guessing that this is the problem. Mythtv-setup is not seeing
> all the IP addresses in use on the PC for some reason, and is only
> allowing you to set an IP address that it sees as being present. On
> my backend, where I have two IPv4 addresses and two IPv6 addresses on
> br0 (bridged eth0/tap0), it puts all those addresses in the drop down
> list, along with 127.0.0.1 and ::1 and the IPv6 link-local addresses
> and the address on my OpenVPN tun0 interface. If you are only getting
> 127.0.0.1, there must be something that is preventing mythtv-setup
> from seeing the Ethernet interface - it is only seeing the lo
> interface. So what does the "ifconfig" or "ip addr" command show? Do
> all the expected IP addresses show up? Do you get different results
> running those commands as user mythtv and root?
>
> You could try manually changing the MasterServerIP and
> BackendServerAddr entries directly in the database. But if
> mythbackend then can also not see the Ethernet interface, it will not
> work very well.
>
> When the "Listen on All IP Addresses" option is on, mythbackend will
> ignore the IP address settings and listen on both 0.0.0.0 and :: (for
> an IPv6 enabled PC), or 0.0.0.0 only (for an IPv4 only PC). You can
> see what it is listening on with this command:
>
> netstat -anp | grep mythbackend | grep tcp
>
> I am not sure if netstat will need to be run as root to see all the
> connections - I always run it as root. This is what I get:
>
> root at mypvr:~# netstat -anp | grep mythbackend | grep tcp
> tcp 0 0 0.0.0.0:6543 0.0.0.0:* LISTEN
> 3276/mythbackend
> tcp 0 0 0.0.0.0:6544 0.0.0.0:* LISTEN
> 3276/mythbackend
> tcp 0 0 0.0.0.0:6549 0.0.0.0:* LISTEN
> 3276/mythbackend
> tcp 0 0 0.0.0.0:6554 0.0.0.0:* LISTEN
> 3276/mythbackend
> tcp 0 0 127.0.0.1:6543 127.0.0.1:44296
> ESTABLISHED 3276/mythbackend
> tcp 0 0 127.0.0.1:6543 127.0.0.1:44298
> ESTABLISHED 3276/mythbackend
> tcp 0 0 127.0.0.1:6543 127.0.0.1:41406
> ESTABLISHED 3276/mythbackend
> tcp 0 0 127.0.0.1:6543 127.0.0.1:41404
> ESTABLISHED 3276/mythbackend
> tcp 0 0 10.0.2.4:6543 10.0.2.4:49678 ESTABLISHED
> 3276/mythbackend
> tcp6 0 0 :::6543 :::* LISTEN
> 3276/mythbackend
> tcp6 0 0 :::6544 :::* LISTEN
> 3276/mythbackend
> tcp6 0 0 :::6549 :::* LISTEN
> 3276/mythbackend
> tcp6 0 0 :::6554 :::* LISTEN
> 3276/mythbackend
>
> So mythbackend has four listening TCP ports on each of 0.0.0.0 and ::,
> plus some established TCP connections.
>
> Sorry about the line wrapping - my email client does not have a way of
> turning that off.
>
>> 8. Select New Entry and enter 192.168.4.7.
>> 9. Exit Settings / Save and Exit
>> 10. Redo steps 4 - 7. The Primary IP is still 127.0.0.1.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org
More information about the mythtv-users
mailing list