Skip to content

ostree can't resolve hostnames due to empty resolv.conf #217

@dsd

Description

@dsd

flatpak can't do much:

$ flatpak -vv remote-info flathub org.chromium.Chromium
F: Fetching summary index file for remote ‘flathub’
F: Loading https://dl.flathub.org/repo/summary.idx using curl
F: Should retry request (remaining: 5 retries), due to transient error: While fetching https://dl.flathub.org/repo/summary.idx: [6] Could not resolve hostname
F: Loading https://dl.flathub.org/repo/summary.idx using curl
F: Should retry request (remaining: 4 retries), due to transient error: While fetching https://dl.flathub.org/repo/summary.idx: [6] Could not resolve hostname
F: Loading https://dl.flathub.org/repo/summary.idx using curl
F: Should retry request (remaining: 3 retries), due to transient error: While fetching https://dl.flathub.org/repo/summary.idx: [6] Could not resolve hostname
F: Loading https://dl.flathub.org/repo/summary.idx using curl
F: Should retry request (remaining: 2 retries), due to transient error: While fetching https://dl.flathub.org/repo/summary.idx: [6] Could not resolve hostname
F: Loading https://dl.flathub.org/repo/summary.idx using curl
F: Should retry request (remaining: 1 retries), due to transient error: While fetching https://dl.flathub.org/repo/summary.idx: [6] Could not resolve hostname
F: Loading https://dl.flathub.org/repo/summary.idx using curl
F: Failed to download optional summary index: While fetching https://dl.flathub.org/repo/summary.idx: [6] Could not resolve hostname
error: Unable to load summary from remote flathub: While fetching https://dl.flathub.org/repo/summary.idx: [6] Could not resolve hostname

I think the underlying cause is ostree:

# ostree pull eos
error: While fetching https://ostree.endlessm.com/staging/dev/eos/summary.sig: [6] Could not resolve hostname

Possibly the same as: flatpak/flatpak#5943

Spotted that /etc/resolv.conf was empty:

$ cat /etc/resolv.conf 
# Generated by NetworkManager

Added a nameserver:

$ cat /etc/resolv.conf 
# Generated by NetworkManager
nameserver 8.8.8.8

and now the problem goes away.

cc @dbnicholson

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions