Unable to resolve DNS in Hirsute

Bug #1925091 reported by Erich Eickmeyer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cubic
Fix Released
High
Cubic PPA

Bug Description

Using Ubuntu Hirsute Hippo (soon to be 21.04), I was unable to wget a file I need to build a custom ISO. Simply said, "Temporary failure in DNS resolution" or something to that effect.

I'm not sure if this is an issue with Cubic specifically or if it's some other security item placed on all chroots in this new version of Ubuntu coming out. I tried the same thing using 20.04 and experienced the expected, successful result when resolving DNS.

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Would you please paste the exact wget command you used?

Changed in cubic:
status: New → Incomplete
Revision history for this message
Cubic PPA (cubic-wizard) wrote :
Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Please share as much info as you can so I can try to recreate your issue.

In my tests, i was able to do DNS lookups (ping a URL) and download using wget (see output below).
    Host System: Ubuntu 20.04
    Customizing (in Cubic): ubuntu-21.04-beta-desktop-amd64.iso

-----------------------------------------------------------------------

You have entered the virtual environment.
root@cubic:~# ping google.com
PING google.com (172.217.10.14) 56(84) bytes of data.
64 bytes from lga34s12-in-f14.1e100.net (172.217.10.14): icmp_seq=1 ttl=118 time=18.7 ms
64 bytes from lga34s12-in-f14.1e100.net (172.217.10.14): icmp_seq=2 ttl=118 time=12.8 ms
^C
--- google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 12.839/15.770/18.701/2.931 ms
root@cubic:~#
root@cubic:~# wget --tries=3 --timeout=120 https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.4.1106-amd64.deb
--2021-04-19 20:01:53-- https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.4.1106-amd64.deb
Resolving download1.rstudio.org (download1.rstudio.org)... 13.224.208.51, 13.224.208.13, 13.224.208.14, ...
Connecting to download1.rstudio.org (download1.rstudio.org)|13.224.208.51|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 121068292 (115M) [application/x-deb]
Saving to: 'rstudio-1.4.1106-amd64.deb'

rstudio-1.4.1106-amd64.deb 100%[===========================================================>] 115.46M 13.1MB/s in 8.8s

2021-04-19 20:02:03 (13.2 MB/s) - 'rstudio-1.4.1106-amd64.deb' saved [121068292/121068292]

root@cubic:~#

-----------------------------------------------------------------------

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

Hi there! Thanks for getting back.

The wget command is called inside of a script pciutils: update-pciids (we're an OEM and have a reason for running that).

That said, I couldn't even get ping to resolve.

The ISO I was customizing was Kubuntu 20.04, actually. I've had a lot of success with it prior to now.

Host: 21.04
Guest (chroot): 20.04

Changed in cubic:
status: Incomplete → New
Revision history for this message
Cubic PPA (cubic-wizard) wrote :

OK, so you are running Cubic in a 21.04 (beta) host.
You are customizing Ubuntu 20.04 (ubuntu-20.04-desktop-amd64.iso)?

Is this the correct URL where you downloaded and installed Kubuntu from?...
http://cdimage.ubuntu.com/kubuntu/releases/21.04/beta/kubuntu-21.04-beta-desktop-amd64.iso

I'll test this, and see if I can identify the issue.

In the mean time, I am curious why are you running a beta OS for production?
(Nothing wrong with it; I'm just curious?).

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

> I am curious why are you running a beta OS for production?

As the leader of Ubuntu Studio, I'm basically dogfooding and testing it in production before everyone else. Kindof comes with the territory.

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Screenshot of Cubic Terminal in Kubuntu 20.04 showing successful:

    wget www.orimi.com/pdf-test.pdf

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

I tested as follows:

1. Install kubuntu-21.04-beta-desktop-amd64.iso in VirtualBox running on a Ubuntu 20.04 host
2. Install the latest version of Cubic in Kubuntu
3. Download ubuntu-20.04.2.0-desktop-amd64.iso in Kubuntu
4. Launch Cubic in Kubuntu, and select ubuntu-20.04.2.0-desktop-amd64.iso to customize
5. Ping google.com (success)
6. Execute wget www.orimi.com/pdf-test.pdf (success)

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Are you sure the network is working on your host machine (where you are running Cubic)?

Try to pinging a URL (such as google.com) Cubic's Terminal page. Does it work or fail?

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Screenshot of Cubic Terminal in Kubuntu 20.04 showing successful:

    wget www.orimi.com/pdf-test.pdf

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

> Are you sure the network is working on your host machine (where you are running Cubic)?
100% Positive. I did a ping against google on the host machine and had no issues.

> Try to pinging a URL (such as google.com) Cubic's Terminal page. Does it work or fail?
It fails with a DNS name resolution failure. Pinging an IP address does work, however.

Remember, this is in a 21.04 host. I can confirm that a 20.04 host *does* work, but not a 21.04 host.

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

In my test, I installed Kubuntu 21.04 in VirtualBox and then ran Cubic inside that.

(1)
On your host, what is the output of ?...

    $ ls -l /etc/resolv.conf
    $ cat /etc/resolv.conf

(2)
Inside Cubic, what is the output of?...

    $ ls -l /etc/resolv.conf
    $ cat /etc/resolv.conf

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

Host:
-rw-r--r-- 1 root root 738 Mar 20 16:37 /etc/resolv.conf

cat:
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
options edns0 trust-ad
search .

Cubic:
lrwxrwxrwx 1 root root 39 Feb 9 10:48 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf

cat:
cat: /etc/resolv.conf: No such file or directory

Looks like it's symlinking to something it can't find.

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Ok. This is good news, we've found the problem.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

For a short term solution, you ~should~ be able to create /etc/resolv.cof inside Cubic (after deleting the symlink), and add the exact same contents from the /etc/resolv.conf on your host system.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

On my Kubuntu 21.04 host, resolv.conf is actually a symlink to an existing file:

    /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf

Do you know why that is not the case for you?

(I'll also look into this a bit more on my end also; Cubic should handle this kind of situation).

Revision history for this message
Erich Eickmeyer (eeickmeyer) wrote :

> Do you know why that is not the case for you?

Working theory is that I installed prior to Beta. /etc/resolv.conf was initially created as an actual file and not a symlink. By default, dpkg doesn't overwrite anything in /etc if it already exists since those might be configurations created by a system administrator. Therefore, if a package changed from a static file to a symlink, dpkg won't re-create the file by default. dpkg is the underlying package management system used by apt.

Source: I'm an Ubuntu MOTU and have to know these things.

Revision history for this message
Cubic PPA (cubic-wizard) wrote :

I was able to reproduce this issue by creating a working /etc/resolv.conf file, that is not a symlink, on the host system.

Changed in cubic:
status: New → Confirmed
assignee: nobody → Cubic PPA (cubic-wizard)
importance: Undecided → High
Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Note: This bug occurs on any version of Ubuntu where the /etc/resolv.conf file on the host system is not a symlink (usually pointing to /run/systemd/resolve/stub-resolv.conf).

Cubic PPA (cubic-wizard)
Changed in cubic:
status: Confirmed → Fix Committed
Revision history for this message
Cubic PPA (cubic-wizard) wrote :

Thanks for taking the time to post this bug report, and for promptly answering my questions to help identify the issue.

I've released a fix in Cubic version 2021.04-50 which should resolve your issue.

Please test let me know whether it works or not.

Changed in cubic:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.