NM fails to resolve adresses if systemd-resolved is installed AND disabled
recently NM 1.28 was pushed to Arch Linux. Instantly my Network was broken. After a bit work I found the reason.
NM prefers external resolver if installed, however NM seems to not check if they actually work. Because of this behavior users can end up with a broken connection.
how to recreate
- Have NetworkManager and Systemd-resolved installed.
- enable NetworkManager (keep SD-resolved disabled
In journal:
Jan 09 00:38:20 frigg NetworkManager[4995]: <info> [1610149100.2178] dns-mgr: Writing DNS information to /usr/bin/resolvconf
Jan 09 00:38:20 frigg NetworkManager[5067]: Failed to resolve interface "NetworkManager": Kein passendes Gerät gefunden (no suitable device found)
Jan 09 00:38:20 frigg NetworkManager[4995]: <warn> [1610149100.2347] dns-mgr: resolvconf failed with status 256
Jan 09 00:38:20 frigg NetworkManager[4995]: <warn> [1610149100.2351] dns-mgr: could not commit DNS changes: resolvconf failed with status 256
how to fix
To fix this situation you have 2 options:
- uninstall systemd-resolved (and restart NM)
- start systemd-resolved (and restart NM)
what I'd prefer to see
I'd prefer if NM checks external resolver by establashing a connection and if not possible fall-back to the internal one.