[mythtv-users] Mythbackend does not bind to IP addresses of interfaces without carrier

Florian Evers florian-evers at gmx.de
Mon Jun 24 19:26:52 UTC 2013


Hello,

I'm a happy mythtv user for 15 months now, thank you for this great software! 
:-)

However, I'm currently encountering a networking issue that I'm not able to 
solve on my own, and I found no solution neither in the bugtracker nor in the 
Internet.

In brief:

I have the problem that mythbackend does not bind to the desired IP address 
(configured via mythtv-setup) if the related interface shows NO-CARRIER in "ip 
link show", i.e., has no cable connected to it. This "problem" relates to 
ethernet ports and to bridges.

My setup:

In my setup, I have a standalone box in the floor running the mythbackend 
24/7, and my workstation running mythfrontend in my living room. Both 
computers are interconnected using ethernet. This workstation is only switched 
on if i'm using it (to watch TV).

The box on the floor has four ethernet ports. One is connected to my DSL modem 
(eth0) atnd the remaining are used to connect to other "clients", e.g., my 
workstation wunning mythfrontend:

eth0: 192.168.0.2/24: Connection to the DSL modem
eth1, eth2, eth3: bridged to br0: 192.168.1.1/24, LAN

Mythbackend should be reachable by any PC on the LAN, and by mythweb invoked 
by a locally running apache server. For this purpose, I decided to bind 
mythbackend to 192.168.1.1, to make it available to both localhost (mythweb) 
and by PCs attached to the LAN.

All boxes run Gentoo Linux with Mythtv 0.26. Everything works fine, most of 
the time.

The problem:

If I reboot the floor server running mythbackend WITHOUT the workstation being 
switched on (then eth1 shows NO-CARRIER), mythbackend does NOT bind to 
192.168.1.1 (the IP address of br0), but only to 127.0.0.1. Thus, it is not 
accessible by mythweb (which is configured to connect to 192.168.1.1) and not 
by mythfrontend on the workstation, even if the workstation is switched on 
later. Mythbackend does never "rebind" to 192.168.1.1 after the interface 
switched to "UP" and "LOWER_UP" shown by "ip link show". The only chance is to 
boot the workstation, and then to restart mythbackend manually, allowing it to 
bind to 192.168.1.1 on an active interface.

Interestingly, if the workstation is switched off afterwards, mythbackend 
keeps its socket bound to 192.168.1.1... 

For a headless floor server, this is really undesired behavior, but I have no 
solution yet. I need your help.

What I tried:

This problem occurs if a bridge is used whose involved interfaces show "NO-
CARRIER"... then the bridge shows NO-CARRIER as well, and mythbackend fails to 
bind to its IP address. For individual ethernet ports this is true as well, as 
they show NO-CARRIER either.

What is the "best mythbackend practice" for such a setup?

1.) I could bind mythbackend to 192.168.0.2, which "should" be UP all the 
time. On the other hand, even this cannot be guaranteed in all cases...

2.) I could use a dummy device, e.g., dummy0, assign an IP address to it, and 
use this to bind mythbackend to. Would be a hack...

3.) I could add such a dummy device to the bridge. A dirty hack...

4.) There is a solution I'm not aware of :-) Is this a bug? Why can't 
mythbackend bind to it's requested IP address immediately? Other software are 
claiming these interfaces without any hassle. Should I file a bug?

Thanks for your help!
Florian


More information about the mythtv-users mailing list