How to fix 'Name does not resolve' error in RHEL / Rocky Linux 8 with Podman

Overview

By default, Rocky Linux / RHEL 8.x uses the CNI DNS plugin as its container networking DNS backend (most common with Podman + CNI). This can cause services to fail to communicate with the database or external network.

Rocky Linux / RHEL 9.x ships with aardvark-dns and netavark, Podman's modern network stack, which resolves these issues.

Long-term recommendation: Upgrade to Rocky Linux / RHEL 9. The steps below are a workaround for systems that cannot yet be upgraded.

Temporary solution: Change DNS library

⚠️ Note: This procedure requires an active internet connection and must be performed with sudo (root) privileges.

Step 1: Stop MDSS

Bash
Copy

Step 2 — Install netavark and aardvark-dns

Bash
Copy

Step 3 — Configure Podman to Use the new network backend

Edit /etc/containers/containers.conf and add the following section:

Copy

If the file does not exist, create it at /etc/containers/containers.conf.

Step 4 — Clean Up Old Podman Configuration

Remove the old CNI network configuration and restart Podman:

Bash
Copy

Step 5 - Validate the new DNS library is used

Run these commands:

Bash
Copy

You should see something like this:

Bash
Copy

Step 6 — Start MDSS

Bash
Copy

It should now work as expected.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard