You are not logged in.
Hey, I've been having some trouble with services that require the network to be up running too early in the boot sequence. I'm running NetworkManager.
Looking at the journal shows them running before networkmanager starts the interfaces, and failing since there's no interface available yet.
For now I've discovered that running "systemctl enable NetworkManager-wait-online.service" seems to have solved it, but is this how it is supposed to work or is something going wrong?
D:
Offline
For now, yes. 'network.target' is mostly for compatibility with sysvinit and is fundamentally broken for systems that have intermittent internet connections. If you have services must only be running when the network is up, you can use network manager's dispatcher. Even better, create an 'online.target' unit and start/stop this with network manager's dispatcher.
Offline
For now I've discovered that running "systemctl enable NetworkManager-wait-online.service" seems to have solved it, but is this how it is supposed to work or is something going wrong?
It is intentional, by NM upstream. By default network.target is reached when NM has finished initializing. If you want it to wait for the network to be "up" (whatever that means, as it is not really clear) you should enable wait-online, as you did.
Offline
I'm just wondering what the point of network.target is in the first place if it doesn't force units with after=network.target to wait until the interfaces are ready. I mean I can understand not waiting for a real connection to some form of network, but at the very least shouldn't the interfaces at least be named by then?
D:
Offline
I'm just wondering what the point of network.target is in the first place if it doesn't force units with after=network.target to wait until the interfaces are ready. I mean I can understand not waiting for a real connection to some form of network, but at the very least shouldn't the interfaces at least be named by then?
Can you post the logs then? The NM/netcfg/... service is supposed to exit only when low-level devices are initialized properly, no?
Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd
Offline
The service isn't exiting, it's that other services are starting whilst NetworkManager is starting, so the interfaces are initialised and named yet. After=network.target appears to only make other services wait until NetworkManager starts, not until it's finished.
D:
Offline
The service isn't exiting, it's that other services are starting whilst NetworkManager is starting, so the interfaces are initialised and named yet. After=network.target appears to only make other services wait until NetworkManager starts, not until it's finished.
OK. I guess the problem is that NM.service is Type=dbus. so systemd doesn't wait on it to finish but only for the dbus socket to appear (?). That's why you have to insert an additional ordering point NM-online.service which delays the start of network.target. I wonder though if you can avoid that by using type-forking and removing "--no-daemon" argument...
Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd
Offline
I am having this problem with a fresh install and I use the net-auto-wired.service
Was this ever fixed?
Offline
I don't see what you're asking, you're not even using networkmanager.
D:
Offline
Hello,
I enabled the NetworkManager-wait-online.service in order to let my programs such as Dropbox, Insync or Crashplan connect in cases when my internet connection is not available immediately after boot.
However, I receive the following error log in journalctl -b:
NetworkManager-wait-online.service: main process exited, code=exited, status=1/FAILURE
Failed to start Network Manager Wait Online
Unit NetworkManger-wait-online.service entered failed state
Starting Network.
Reached target Network.
Does someone have a clue why it is not working?
Offline
The problem is related to the default timeout of 30 in the service being too low. Change 30 to something higher in /usr/lib/systemd/system/NetworkManager-wait-online.service.
Last edited by orschiro (2013-03-12 10:02:39)
Offline