-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
network-online.target is reached before network is online #35567
Comments
This is the default behaviour of
|
Regarding your config: Note that there is also |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/boot-faster-by-disabling-udev-settle-and-nm-wait-online/6339/1 |
Hello, I'm a bot and I thank you in the name of the community for opening this issue. To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human. The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it. If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them. Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel. |
I've since come to believe that this is really a bug in ZNC, and there's no way I can think of to solve it at the NixOS level. So I'd suggest closing as infeasible. |
As I remember, the workaround is to call |
Issue description
This isn't fully debugged, but I'll share what I know so far:
Services which depend on reaching the internet, e.g. ZNC, should be marked as depending in systemd's network-online.target, to prevent them from coming up too early.
When there are multiple network addresses expected, it appears that the target is reached once even a single of them is brought up. For the particular case that bit me, this was a statically configured v6 address combined with a DHCP'd v4 address, with ZNC as a user unit. ZNC started the moment the v6 address was configured, multiple seconds before IPv4 access was available.
In the particular case of ZNC, once it has started, it'll never look for any network interfaces that come up later -- so if the IPv4 interface is down, it'll never be able to reach any v4-only IRC networks unless manually restarted.
I don't know what would happen if there are multiple distinct NICs on the system, but network-online should only be reached once all interfaces and addresses are fully configured.
Steps to reproduce
Here's a listing of every possibly relevant configuration element:
Technical details
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste theresults.
Amusing aside
This originally manifested as the IRCCloud Android client repeatedly reconnecting to their servers. It turned out there was a bug in IRCCloud's error parsing for ZNC, causing their server to repeatedly crash whenever ZNC sent an error about being unable to reach systemnet, which of course led to never seeing that error.
So in addition to this bug, there were two others -- IRCCloud's, and ZNC's -- combining forces to throw me out of IRC. Debugging this was fun.
The text was updated successfully, but these errors were encountered: