Accessing DNS from dreamcompute client

dreamcompute

#1

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 google.com ping: unknown host google.com

Whereas the ping works when given an IP address:

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

An nslookup also fails:

dhc-user@test1:~$ nslookup google.com ;; 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…


#2

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)

DO NOT EDIT THIS FILE BY HAND – YOUR CHANGES WILL BE OVERWRITTEN

nameserver 10.10.10.1

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


#3

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 http://sandstorm.io/ and (soft) rebooted it. I’m not sure if one of those things broke it?
[hr]
p.s. Another soft reboot killed the line and broke DNS resolution


#4

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


#5

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…


#6

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?


#7

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.