CentOS 8.x DNS resolution issues when there is proper working DNS in /etc/resolv.conf

From Notes_Wiki

Home > CentOS > CentOS 8.x > System Administration > systemd or systemctl > DNS resolution issues when there is proper working DNS in /etc/resolv.conf

While using CentOS 8.x Stream it is possible to get DNS resolution errors via applications such as postfix, even when there is properly working DNS in /etc/resolv.conf and ping / nslookup / dig etc. are working properly. In this case try:

systemd-resolve --status

If it shows error such as:

Failed to get global data: Unit dbus-org.freedesktop.resolve1.service not found

then use following steps to resolve the issue:

  1. Create file named "/etc/NetworkManager/conf.d/no-systemd-resolved.conf" with
    [main]
    systemd-resolved=false
  2. Also use:
    systemctl enable systemd-resolved.service
    systemctl start systemd-resolved.service
    systemctl status systemd-resolved.service
  3. After this again test
    systemd-resolve --status
    and validate that systemd-resolve is working properly.


Refer:



Home > CentOS > CentOS 8.x > System Administration > systemd or systemctl > DNS resolution issues when there is proper working DNS in /etc/resolv.conf