Skip to content
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

NetworkManager-wait-online.service times out #296953

Open
raboof opened this issue Mar 18, 2024 · 7 comments
Open

NetworkManager-wait-online.service times out #296953

raboof opened this issue Mar 18, 2024 · 7 comments
Labels
0.kind: bug Something is broken

Comments

@raboof
Copy link
Member

raboof commented Mar 18, 2024

Describe the bug

When I 'nixos-rebuild switch', this takes a long time, as NetworkManager-wait-online.service is timing out. The network seems to work fine, though.

I set networking.networkmanager.logLevel to DEBUG, but this didn't turn up anything obvious in journalctl yet.

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.7.5, NixOS, 24.05 (Uakari), 24.05.20240316.c75037b`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `"nixos-20.03pre194293.2436c27541b"`
 - nixpkgs: `/home/aengelen/nixpkgs`

Add a 👍 reaction to issues you find important.

@raboof raboof added the 0.kind: bug Something is broken label Mar 18, 2024
@sdht0
Copy link
Contributor

sdht0 commented Mar 20, 2024

See #247608.

I use:

systemd.services.NetworkManager-wait-online = {
    serviceConfig = {
      ExecStart = [ "" "${pkgs.networkmanager}/bin/nm-online -q" ];
    };
  };

@raboof
Copy link
Member Author

raboof commented Mar 21, 2024

See #247608.

Thanks for the reference! I don't think I have networking.useNetworkd enabled, though - unclear whether it's the same issue?

I use:

systemd.services.NetworkManager-wait-online = {
    serviceConfig = {
      ExecStart = [ "" "${pkgs.networkmanager}/bin/nm-online -q" ];
    };
  };

haven't checked what that does, but it indeed does appear to make switching fast again :)

@sdht0
Copy link
Contributor

sdht0 commented Mar 21, 2024

Yeah I actually took it from #180175 (comment). Found it now.

KoviRobi added a commit to KoviRobi/nixos-config that referenced this issue Apr 6, 2024
@hacscred
Copy link

hacscred commented Oct 6, 2024

This is still a problem in nixos-24.05 (specifically 6e6b3dd) and should be added as a release blocker for 24.11.

People should not all be following workarounds, especially those not using networkd, since nerworkd is supposed to be the more experimental configuration.

@Enzime
Copy link
Member

Enzime commented Oct 6, 2024

This is most likely a duplicate of #180175 which recently got fixed for Tailscale users with #344678

The fix has been backported to 24.05 in #344678 but is not available on the nixos-24.05 channel yet

@hacscred
Copy link

hacscred commented Oct 6, 2024

Enzime, I don't run tailscale. So, the "root cause" it probably is not. It might be that the tailscale resolution describes a class of root causes, but I think I don't even have custom services depending on any network* targets.

Nevertheless, I will install it when it becomes available.

@hacscred
Copy link

hacscred commented Oct 7, 2024

(The only place where I so something remotely related to this is (which has worked before):
fileSystems."/home/a" = { device = "nfsserver:/a"; noCheck = true; fsType = "nfs4"; options = ["x-systemd.automount" "vers=4" "x-systemd.requires=network-online.target" "noauto"]; };
)

The above use case is hosting a home directory on a server and it would be nice to have such a use case covered by nixpkgs tests. I don't think it's related to this issue, but it's just for completeness.

I tried with nixos-24.05 and I still got the same failure as described by OP. I tested with ecbc1ca.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

4 participants