On Sat, Dec 16, 2017 at 10:03 AM, Sam Varshavchik <mrsam(a)courier-mta.com> wrote:
Just had another boot that utterly failed because services that were
supposed to start only after the network interfaces came up, didn't. They
started too soon. Privoxy's logfile has the smoking gun:
2017-12-16 09:42:39.875 7f4acdaa6740 Fatal error: can't bind to
192.168.0.1:8000: Cannot assign requested address
This is despite that NetworkManager-wait-online was enabled and active. This
is what everyone kept telling me was the only thing that needed to be done.
Well, it was enabled:
[root@shorty system]# systemctl status NetworkManager-wait-online
● NetworkManager-wait-online.service - Network Manager Wait Online
Loaded: loaded
(/usr/lib/systemd/system/NetworkManager-wait-online.service; e
Active: active (exited) since Sat 2017-12-16 09:42:39 EST; 12min ago
Docs: man:nm-online(1)
Process: 977 ExecStart=/usr/bin/nm-online -s -q --timeout=30 (code=exited,
sta
Main PID: 977 (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 4915)
CGroup: /system.slice/NetworkManager-wait-online.service
Dec 16 09:42:32
shorty.email-scan.com systemd[1]: Starting Network Manager
Wait
Dec 16 09:42:39
shorty.email-scan.com systemd[1]: Started Network Manager
Wait O
It came up at 09:42:39. And, at 09:42:39 privoxy also came up. And privoxy
still blew chunks because the primary network interface wasn't up yet.
Why is it so friggin difficult to get something this simple, this basic
concept of starting things only after the network interfaces are up, working
correctly, and reliably?
Oh yeah, I know. systemd.
I've just read "man nm-online" (possibly for the first time!) and
"nm-online -s" doesn't seem to do what
"NetworkManager-wait-online.service" is supposed to do, systemd-wise.
It waits "for NetworkManager startup to complete, rather than waiting
for network connectivity specifically." :(
Does privoxy start properly if you disable NM and its wait-online unit
and use systemd-networkd and its wait-online unit?
Does privoxy start properly if you disable NM's wait-online unit and
use a custom wait-online unit that waits until
"/sys/class/net/<IF>/carrier" is "1"?