So I had a Ubuntu 16.04 instance running a samba ad dc, I upgraded to 18.04 and when starting samba I was getting the error;
[2018/12/27 11:09:56.483755, 0] ../source4/dsdb/dns/dns_update.c:290(dnsupdate_nameupdate_done)
../source4/dsdb/dns/dns_update.c:290: Failed DNS update - with error code 110
After some digging and running sudo lsof -i :53
I could see
systemd-r 767 systemd-resolve 12u IPv4 18656 0t0 UDP 127.0.0.53:domain
systemd-r 767 systemd-resolve 13u IPv4 18657 0t0 TCP 127.0.0.53:domain (LISTEN)
samba 1594 root 36u IPv6 23058 0t0 TCP *:domain (LISTEN)
samba 1594 root 38u IPv6 23059 0t0 UDP *:domain
Which lead me to disable systemd-resolve
using the instructions here, this has fixed all my problems within the network (other domain machines not being able to apt-get update
etc) but im worndering is disabling systemd-resolve
safe ?
Edit
This is a VM running on vsphere 6.0 its a bridged networked. Netplan folder is empty after the upgrade (which Ive just remembered should have to be set) the old network details /etc/network/interfaces
is set to;
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto ens160
iface ens160 inet static
address 192.168.2.23
netmask 255.255.255.0
gateway 192.168.2.254
dns-nameservers 192.168.2.23
dns-search MYDOMAINNAME.co.uk
I can manually set the resolv.conf
(after removing the sym link) to the following and it works
nameserver 192.168.2.23
nameserver 127.0.0.53
search MYDOMAIN.co.uk
DNSStubListener=no
Re-enable systemd-resolve.
Two possibilities...
dnsmasq
andsystemd-resolved
...Do a
ps auxc | grep -i dns
andps auxc | grep -i resolv
and look fordnsmasq
andsystemd-resolved
, and if both are running, you need to disable the DNS part ofsystemd-resolved
by editing/etc/systemd/resolved.conf
and...change:
to:
then restart systemd-resolve and dnsmasq, or reboot.
sudo mv /etc/resolv.conf /etc/resolv.conf.OLD
# save the old symlinksudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
# create new symlinkUpdate #1:
Many details of this installation came forward in the comments, and we still don't have a final working solution. Here are some points to recognize...
DNSStubListener=no
does not belong in/etc/resolv.conf
. (/etc/resolv.conf
should not (normally) be edited directly). It's an edit to/etc/systemd/resolved.conf
.DNS=
can also be edited there to add DNS server addresses./etc/resolv.conf
should be a symlink, linked to one of two possible locations in /run.and should contain either 127.0.0.53 (or 127.0.0.1 if dnsmasq was running), or DNS nameserver addresses, or your router's address (ex: 192.168.1.1)
If you're going to use NetworkManager instead of netplan, then
/etc/netplan
should contain at least one .yaml file containing...followed by...
sudo netplan generate
# generate config filessudo netplan apply
# apply configurationIf you're using NetworkManager, then
/etc/NetworkManager/NetworkManager.conf
should exist... and should look something like...If
dnsmasq
ANDsystemd-resolve
are running, then you should do #1 in my answer.If
dnsmasq
is not running, andsystemd-resolve
is running, then you should do #2 in my answer.