-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
DNS broke for most programs after recent update on the nixos-unstable channel #107537
Comments
Programs which are broken are using the libc calls to resolve the hostname, looks like the nss |
This bug affects me too. Same error and same |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/unknown-network-problem/10669/2 |
Same bug on my end. |
I think I figured out what's the problem here. I opened an upstream issue: systemd/systemd#18078 Can you try if the following patch works around the issue?
|
@flokli that worked! (though I have to manually edit the service file since automatic GC kicked in and I cannot rebuild my system:facepalm:) Also, I feel like there should be a basic network connectivity test to prevent bugs like this from being merged into the unstable channel. |
Since we now have a workaround, maybe we should pin this issue, so ppl with broken DNS can find it easily? And thanks for the quick action @flokli !
I agree, but I thought we actually have them for unstable? |
I've added the following to my { config, pkgs, lib, ...}:
{
#...
# 2020-12-25 Bug in systemd-resolved, workaround:
systemd.services.systemd-resolved.environment = with lib; {
LD_LIBRARY_PATH = "${getLib pkgs.libidn2}/lib";
};
} and I can confirm systemd-resolved works again. Now, how do you get to rebuild your system if like @poscat0x04 you don't have a working system to rollback to? I did (as root): systemctl stop systemd-resolved.service
echo "nameserver 1.1.1.1" > /etc/resolv.conf
nixos-rebuild test to force using that file in order to be able to run |
aw man I did not know that if you stop systemd-resolved it will resolve normally. I removed the symlink @jopiter's method is definitely more superior. |
So... for now we push this workaround to nixpkgs master? |
This issue has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/unknown-network-problem/10669/3 |
I'd say yes. Especially if there's no quick upstream fix in perspective. Hopefully this problem only affects users following unstable. |
Stable doesn't get systemd updates, so it shouldn't be affected (based on flokli's analysis). |
systemd started using dlopen() for some of their "optional" dependencies. Apparently, `libidn2` isn't so optional, and systemd-resolved doesn't work without libidn2 present, breaking DNS resolution. Fixes NixOS#107537 Upstream bug: systemd/systemd#18078
PR at #107572. |
Describe the bug
Most of my programs is unable resolve DNS after I updated my system to this commit (from the last time nixos-ustables was updated which is approximately 14 days ago). This includes curl, chrome, resolvectl and nix which basically makes my system unusable. One really weird exception is the
drill
tool which is actually able to query both a remote server (such as 8.8.8.8) and the local systemd-resolved server to resolve DNS (which indicates that this is probably not the fault of systemd). There's also a error message in systemd-resolved's log that said "Failed to escape hostname: Invalid argument". I also tried to edit my/etc/resolv.conf
file to change the nameserver to 8.8.8.8 and that didn't change anything.here are some examples of the errors returned by those programs:
To Reproduce
I don't really know how to reproduct this issue
Expected behavior
DNS should be working properley on all programs
Additional context
Add any other context about the problem here.
Notify maintainers
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Maintainer information:
The text was updated successfully, but these errors were encountered: