[mythtv-users] Backend not found when started with initscript

Bill Meek keemllib at gmail.com
Mon Nov 26 07:07:36 UTC 2012


On 11/26/2012 12:08 AM, Michael Swanson wrote:
> Hello all,
>
> I'm having some trouble with getting the backend to start properly on bootup.  I'm using the Debian repo packages on a standard Wheezy (testing)
> install.  When I start the backend with the Debian provided init script at boot time, the log shows some errors:
>
> Nov 25 17:00:18 avalon-linux  mythbackend[2960]: E CoreContext serverpool.cpp:407 (listen) Failed listening on TCP
> [fe80::224:8cff:fe8f:d311%eth0]:6544 - Error 9: The address is not available
> Nov 25 17:00:18 avalon-linux  mythbackend[2960]: E CoreContext mediaserver.cpp:86 (Init) MediaServer::HttpServer Create Error
> ...
> Nov 25 17:00:18 avalon-linux  mythbackend[2960]: E CoreContext serverpool.cpp:407 (listen) Failed listening on TCP
> [fe80::224:8cff:fe8f:d311%eth0]:6543 - Error 9: The address is not available
> Nov 25 17:00:18 avalon-linux  mythbackend[2960]: C CoreContext main_helpers.cpp:658 (run_backend) Backend exiting, MainServer initialization error.
>
> When I  try and run the frontend on the same machine, it fails saying it's unable to contact the backend.
>
> However, when I run the backend manually, after boot time, the frontend works fine, finding the backend with no issues.  This happens both when
> starting it with the init script and just starting the backend manually from the command line.
>
> It looks like the problem has to do with the link-local IP6 address not being properly bound to the network card right away, but I've already
> tried moving the backend init script later in the startup process so it starts up after network-manager, and the problem seems to persist.  Does
> anyone know why the backend would be crashing for just the IP6 address not being bound correctly?  Thanks

Hi;

Because the backend attempts to use any address known to the system. So, if you
type ifconfig eth0, and IPv6 is active, then the link-local address will be
seen (and ::1 and your IPv4 addresses.) And if it can't bind to a known address,
then it considers it a fault.

I have a similar problem with *buntu. And before anyone says its the Network Manager,
its already been surgically removed and the problem still exists. In my case, the
link-local address is always OK by the time the backend starts, but I have a
Unique Local Address (fdf9:...) that always fails. I've been running a program
that keeps trying to bind to every address on my interface until it's available.
I run it just before starting the backend.

After a cold boot, on average, it takes about 3 seconds before all addresses
pass the test. Once the system is up, binding to every address passes on the 1st
try.

Two quick and dirty solutions. 1. Disable IPv6 - which I think is a bad idea,
but a reasonable test. 2. Sleep 5 seconds before starting the backend. I added
that to the *buntu Upstart Wiki page some time ago. It's ugly, but it works.
For any Upstart users watching, I use the 'net-device-up IFACE!=lo' test, but
it doesn't help.

Solving the root cause of why some distributions don't guarantee that the network
is up is beyond my pay grade.

-- 
Bill


More information about the mythtv-users mailing list