[mythtv-users] Can't start backend on Debian 9 (Stretch)

Stephen Worthington stephen_agent at jsw.gen.nz
Fri Jul 28 23:56:14 UTC 2017


On Fri, 28 Jul 2017 12:20:23 -0400, you wrote:

>> Stephen Worthington stephen_agent at jsw.gen.nz via mythtv.org
>> 6:38 AM (5 hours ago)
>
>>...  I have seen a
>> suggestion to use a "pingnetwork.service" which pings an external
>> address (eg the main switch or router on the network) and becomes
>> active only after it gets a reply. It does not seem to be a builtin
>> service though, so you would have to write the systemd unit file
>> yourself to do that.  It would not be too difficult to do, but does
>> require a bit of experience with systemd.  I have thought about doing
>> it myself, but have not found the time yet.
>
>Shouldn't the " After=mysql.service network.target" in the service file do
>that?

No, that is a common misperception.  The network.target becomes ready
as soon as any network interface is ready.  That normally means it
becomes ready when localhost comes up.  External network interfaces
take longer to come up even if they have static IP addresses, let
alone if they have to wait for DHCP.

The mysql.service target becomes ready when MySQL is ready to accept
commands, which happens as soon as it binds one interface.  That
interface is normally localhost.  MySQL, unlike mythbackend, will keep
checking its available interfaces and bind any it wants as they come
up.  Because mythbackend does not do that, it needs to be started only
after all the network interfaces it needs are fully up.


More information about the mythtv-users mailing list