Skip to content

DNS resolve fails on "Ubuntu 22.04.5 LTS" because of /etc/resolv.conf #92

@wegmarken2006

Description

@wegmarken2006

When running on Ubuntu 22.04.5 LTS, the following fails with Resolve_Error:

...
	res, err := client.get("https://www.google.com/")
	if err != nil {
		fmt.printf("Request failed: %s\n", err)
		return 
	}
...

The error arises in file dns_unix.odin, proc _get_dns_records_os, line:

name_servers, resolve_ok := load_resolv_conf(dns_configuration.resolv_conf) 

since in Ubuntu 22.04.5 LTS it seems that DNS servers are listed not in "/etc/resolv.conf" but in "/run/systemd/resolve/stub-resolv.conf",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions