Accessing DNS from dreamcompute client

I’ve set up a dreamcompute instance running Ubuntu and installed some software. I’m running into problems when I try and run things that need to make DNS queries…

It’s illustrated if you try to do something which requires a domain name lookup from the commandline:

dhc-user@test1:~$ ping ping: unknown host

Whereas the ping works when given an IP address:

dhc-user@test1:~$ ping PING ( 56(84) bytes of data. 64 bytes from icmp_seq=1 ttl=52 time=123 ms

An nslookup also fails:

dhc-user@test1:~$ nslookup ;; connection timed out; no servers could be reached

Is there something I need to set up in the OS or security settings to get this to work? Sorry if this is obvious but it’s my first experience with DreamCompute or OpenStack…

This issue seems to be popping up on occasion, we are looking into a permanent fix. Please tell me what your /etc/resolv.conf looks like. Mine looks like:

root@clfs:~# cat /etc/resolv.conf

Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)



If it is empty, try adding that entry and it should work for dns resolution.

Thanks for the quick reply!

That fixed it :slight_smile: My /etc/resolv.conf just had the comment lines…

Thinking about it, DNS resolution on the instance was working fine and then I installed and (soft) rebooted it. I’m not sure if one of those things broke it?
p.s. Another soft reboot killed the line and broke DNS resolution

If you’re running ubuntu, you can add the name server to /etc/resolvconf/resolv.conf.d/base and it should persist on reboot.

Thanks! I think it’s definitely something you need to fix though - I created a new instance with ubuntu and after a soft reboot networking breaks in the same way…

Agreed! We’re having trouble replicating the problem. I think it might be related to cloud-init but not certain. Would you mind sending me the ID of your instance?

Hi Justin,

I’ve just discovered how to reproduce this problem, it is so simple: just do a soft reboot instance (by using reboot/shutdown command inside it, or from openstack).

Tested with Ubuntu Trusty latest image.