0

I have a lot of VM running, all of them with the same network config, except for their IP that are fixed and range from 10.36.8.2 to 10.36.8.250. Most of them are accessed with their IP, but some are given a name for our ease. As such, I have 2 VM that are named jira and confluence. They used to be hosted on an ubuntu 12.04, but I recently created 2 new VM, running Xubuntu 18.04 and moved them.
To work correctly, confluence needs to reach jira by its name, and never had a problem on my 12.04.

With 18.04, I discovered netplan and this is my current configuration : https://i.imgur.com/CzZMsek.png

It works fine, the machine can ping jira. But for a reason I fail to understand, the DNS config of confluence breaks after some hours/days, even though the machine is idle and I've disabled every update in the Software & Update window.
When it happens, pinging jira gives me

Name or service not known

All the other machines can ping jira, so I know for fact it's the confluence vm that is at fault. To fix my problem, I just have to run the following command :

sudo netplan apply

How can I fix this so I don't have to apply my netplan manually every time? Thank you

  • Is it just me or is that CIDR address wrong? (probably me) 10.36.8.104/21 looks like it might be a problem. – Penguino Aug 5 at 16:02
  • You seem sceptic, but here is the working config I've been using for 4 years i.imgur.com/E8ckx5i.png and here what it gives if you use a submask calculator : i.imgur.com/j3YZiBd.png So it's definetely ok :) – nivolas Aug 5 at 16:13
  • You list three nameservers in your config, two with private IPs and one with a public IP. Do all three of these servers know the name confluence.YOURDOMAIN? You should not list multiple nameservers in your netplan config that do not all have the same DNS namespace view; if one of the nameservers becomes unavailable at any point and stops responding, systemd-resolved will switch to preferring the next server in the list. So if it asks 194.2.0.20 for confluence and gets told NXDOMAIN, it will consider that authoritative and not fall back to the other servers. – slangasek Aug 5 at 16:14
  • @slangasek but then why would the problem not appear before, and in that case why would a "sudo netplan apply" fix the problem? – nivolas Aug 5 at 16:15
  • Prior to Ubuntu 18.04, resolved was not used for dns resolution. "netplan apply" fixes it because it resets resolveds view of failed DNS servers. Did you try removing the public DNS server from your config? – slangasek Aug 5 at 18:39
0

You list three nameservers in your config, two with private IPs and one with a public IP. You should not list multiple nameservers in your netplan config that do not all have the same DNS namespace view; if one of the nameservers becomes unavailable at any point and stops responding, systemd-resolved will switch to preferring the next server in the list. So if it asks 194.2.0.20 for confluence and gets told NXDOMAIN, it will consider that authoritative and not fall back to the other servers.

The solution here is to only list the two private nameservers in the netplan config and not the public one which does not know about your internal hostnames, because they cannot be used as equivalents for failover.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.