FS#31846 - [mythtv] Mythbackend needs to wait for network before starting on fast systems.
Attached to Project:
Community Packages
Opened by John (graysky) - Monday, 08 October 2012, 19:03 GMT
Last edited by Balló György (City-busz) - Monday, 09 December 2013, 20:31 GMT
Opened by John (graysky) - Monday, 08 October 2012, 19:03 GMT
Last edited by Balló György (City-busz) - Monday, 09 December 2013, 20:31 GMT
|
Details
Since the 0.26-1 update, mythbackend is much more picky
about having a network interface up before it starts. I
believe main protocol server in mythbackend terminates,
taking the backend with it, when it does not have access to
the IP addresses it on which it was told to listen. I have
an SSD-based backend that boots pretty quick. The problem is
that my network isn't ready when mythbackend starts which
causes the backend to detect no network and shutdown.
I can fix this by starting the backend manually several seconds after the box boots via the attached script that is triggered when X comes up. I know that this is not a robust and general solution. Perhaps adding a user-configurable delay into the mythbackend.service file and into the sysv init script the will accomplish the same thing? Additional info: * package version(s) 0.26-1 * config and/or log files etc. Here is a snipette from my backend log if I do NOT use the script which clearly shows the issue: ... 2012-10-07 15:07:52.606487 C ServerPool: Host is configured to listen on 192.168.0.102, but address is not used on any local network interfaces. 2012-10-07 15:07:52.606648 I Listening on TCP 127.0.0.1:6544 2012-10-07 15:07:52.606712 I Listening on TCP [::1]:6544 2012-10-07 15:07:52.641782 I Added logging to mythlogserver at TCP:35327 2012-10-07 15:07:53.806462 E Bonjour: Error: -65537 2012-10-07 15:07:53.806474 E Bonjour: Failed to register service. 2012-10-07 15:07:53.806485 I Main::Registering HttpStatus Extension 2012-10-07 15:07:53.811393 C Backend exiting, MainServer ... Steps to reproduce: Boot using a relative fast system on an SSD. I would say you need to use systemd, but I can replicate this error with sysv. |
This task depends upon
Closed by Balló György (City-busz)
Monday, 09 December 2013, 20:31 GMT
Reason for closing: Fixed
Additional comments about closing: mythtv 1:0.27-5 (see my last comment)
Monday, 09 December 2013, 20:31 GMT
Reason for closing: Fixed
Additional comments about closing: mythtv 1:0.27-5 (see my last comment)
http://code.mythtv.org/trac/ticket/11160
"If mythbackend is started before your network is available for use, then your init scripts or init system are broken, and the problem lies with your packager. If you do not require remote access that would need the network to be up when mythbackend is started, simply tell MythTV to listen on the localhost addresses only."
In short, configuring the network this way causes systemd to not detect when the network is up and can have down-stream consequences on daemons that require an active network such as mythbackend in [community]/mythtv for example.
USERS SHOULD MAKE USE OF [core]/netcfg FOR STATIC CONFIGURATIONS. I have edited the wiki.
http://www.freedesktop.org/software/systemd/man/systemd.special.html#network-online.target
But I'm not sure that it would solve the problem for all network management software, because AFAIK this target is provided only by NetworkManager-wait-online.service:
https://wiki.archlinux.org/index.php/NetworkManager#Enable_NetworkManager_Wait_Online
# systemctl enable NetworkManager-wait-online
It should works even with the current unit file. If you are using another network management software, then open an upstream feature request to provide a -wait-online service for that network management software.
My workaround:
1) Disable mythbackend.service.
2) Run the attached as the mythtv user in ~/.config/autostart which handles it.
If you are still experiencing problems, then open a feature request for your actual network manager to implement the network-online.target via a service file.