0

I have noticed that my Ubuntu instances on both Google Compute Engine (GCE) and Azure have broken network after installing and configuring ddclient and rebooting these machines. This issue does not happen on AWS.

When this happens, everything looks fine, the interface comes up, is assigned an IP, but it says the default gateway is unreachable. Uninstalling ddclient and deleting its config file, followed by a reboot, solves the issue.

Why does ddclient seem to break the network on these GCE and Azure instances?

This is a sample of my ddclient config:

ssl=yes
use=web, web=checkip.dyndns.com/, web-skip='IP Address'
protocol=namecheap
server=dynamicdns.park-your-domain.com
login=<mydomain>
password=<mypassword>
@
PhilippNagel
  • 115
  • 5
  • I'm not sure why that happens as I have never tried running a Dynamic DNS Client from a server with a static IP. You can manually update any DNS record with the static IP that is assigned to your instance. I really don't see a need for dynamic dns for static ip's. If you need to, for $12 a year, you can buy your own domain here [Google Domains](https://domains.google.com/registrar) – Jeff Nov 03 '17 at 02:40
  • @JeffClay Thanks! My scenario was actually different, I have a regular domain, but no static IP, so I used ddclient to update the A record for the domain. Your comment prompted me to learn that I can attach a static IP for free on GCE. So my need for ddclient is gone, but nonetheless, if someone can answer in case someone else runs into this, that would be great. – PhilippNagel Nov 03 '17 at 13:19

1 Answers1

1

I just ran into this issue too.
Dwight Lyle filed a bug report in May. https://bugs.launchpad.net/ubuntu/+source/ddclient/+bug/1688052

The steps I took to repair the boot disk are inspired by Dwight's description. TL;DR I mounted the disk that wouldn't boot to another instance, chroot'd into it, apt-get purged ddclient, and created a new instance using the (now) functioning disk.

And in detail:

In the GCE console click on the broken instance to view details about it. Click edit and unselect "delete boot disk when instance is deleted".

Now, delete the instance that wouldn't boot (after double checking that you're not about to delete the disk too!).

In Google Coud Shell:


gcloud compute instances attach-disk WORKING_INSTANCE --disk DISK_OF_BROKEN_INSTANCE --device-name new_disk

In a working GCE instance:


lsblk       # to know which disk to mount
sudo mount /dev/sdb1 /mnt/      # sdb1 was the disk not mounted as root (the broken disk)
sudo chroot /mnt/
sudo apt-get purge ddclient
exit
sudo umount /mnt

In Google Coud Shell:


gcloud compute instances detach-disk WORKING_INSTANCE --disk DISK_OF_BROKEN_INSTANCE

Back in the GCE console, go to the disks tab, find the disk you just modified, and create a new instance with it. With any luck, you should be able to launch this and SSH into it!

PatrickR2
  • 26
  • 1
  • Thank you! I also posted on launchpad that this affects me. So I take it you have not found a way to have ddclient installed on these instances? Being able to restore the image to have working networking is very useful, thanks again! – PhilippNagel Jan 17 '18 at 14:04
  • @PhilippNagel I just ended up using a static IP, like you mentioned in your comment above. However, Dwight says in his bug report (link in my answer) that he was able to get a specific version to work. "I installed ddclient 3.8.3-1.1ubuntu1 from the Zesty universe repository. That package works fine on Xenial and operates as expected." That might be worth a shot! – PatrickR2 Jan 19 '18 at 13:34