-
-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fresh ubuntu 18.04 snap install, DNS resolution problem #881
Comments
Uh, that sounds weird. It reminds me of #178, actually, but that was fixed in Ubuntu a long time ago. This is Ubuntu Server, I assume? |
You are totaly right, installing resolvconf makes the problem goes away. So I think it is more an ubuntu bug ... |
I had the same problem as well with a fresh 18.04 install on scaleway. |
Yes, the same, you have to remove systemd-resolve and install resolvconf, it works after that. |
Closing as fixed. |
I came across this on Ubuntu 18.04 as well, but wanted to dig in to why this is happening and if there's a way to avoid going back to using TL;DRYes there is. Just reconfigure the system to use a SystemD generated stub for ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf Or, if using AnsibleA snippet from `tasks/main.yml`: - name: check how `/etc/resolv.conf` is configured
stat:
path: /etc/resolv.conf
register: etc_resolv_conf
- name: check if systemd-resolved is in use
set_fact:
# see systemd-resolved(8)
systemd_resolved_in_use: '{{ (
etc_resolv_conf.stat.islnk is defined and etc_resolv_conf.stat.islnk and
etc_resolv_conf.stat.lnk_target in [
"/run/systemd/resolve/stub-resolv.conf",
"/usr/lib/systemd/resolv.conf",
"/lib/systemd/resolv.conf",
"/run/systemd/resolve/resolv.conf",
]
) }}'
cacheable: true
- name: configure `/etc/resolv.conf` to point to dynamic stub
file:
path: /etc/resolv.conf
src: /run/systemd/resolve/stub-resolv.conf
state: link
when: systemd_resolved_in_use ExplanationSo the problems with DNS resolution happen because the default target of # snap run --shell nextcloud.occ
# cat /etc/resolv.conf
/etc/resolv.conf: No such file or directory On the other hand the dynamic stub that systemd-resolved generates at runtime located in Anyway, so it's not a problem with this nextcloud-snap, it does seem to be upstream, but I'm not sure where. Both configurations are perfectly valid, so this is possibly an issue with the confinement policy, in that it should allow reading from |
@mig4 excellent detective work! Would you mind opening a thread over on https://forum.snapcraft.io/ ? Feel free to ping me (same nick) and I'll get the right eyes on it. |
Following a fresh ubuntu 18.04 install (up to date).
I cannot get nextcloud snap package to get dns resolution. If I manually enter the host in /etc/hosts, it works.
It happens for everything, from letsencrypt, to admin overview "server cannot connect to internet".
Tried to force has_internet_connection, no success.
Tried to play with the snap core resolv.conf file, but it didn't do anything.
Would it be an issue between host systemd resolv and snap ubuntu core resolvconf ?
Beside that, everything works well.
No access to server right now, but will update with config.php.
The text was updated successfully, but these errors were encountered: