Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

My Fedora 18 machine is having problems with resolving hosts:

Could not resolve host: ...; No address associated with hostname]

HTTP error on [https://lon.auth.api.rackspacecloud.com/v2.0/tokens], curl code [6] message [Could not resolve host: lon.auth.api.rackspacecloud.com; No address associated with hostname]'

How do I fix this?

share|improve this question
1  
Would be nice if you could elaborate a bit more. Is it a valid host you are trying to resolve? which util do you use to resolve the host (host google.com)? Is your network interface up (ip addr)? –  Kotte Apr 22 '13 at 9:27
1  
It is also important to have the content of /etc/resolve.conf and maybe /etc/hosts. –  superuser0 Apr 22 '13 at 9:40
    
Are you having trouble resolving every host with every program or just rackspacecloud.com using curl? Can you ping google.com? –  drs Apr 22 '13 at 17:16

2 Answers 2

Your problem is most likely that the file /etc/resolv.conf doesn't have any entries for DNS servers to resolve hostname or IP addresses against.

Here is a basic file:

# Google DNS servers
nameserver 8.8.8.8
nameserver 8.8.4.4

You can use the text editors gedit (GUI) or nano (command line) to edit this file and add these lines to it. You'll need to be root to edit this file.

share|improve this answer

If you are unable to reach any website, there may be problems with the DNS servers that you've configured. These are found in /etc/resolv.conf and are set by NetworkManager when it connects to a network. If you manually change them, they may be overwritten the next time you connect to a network. You can edit the file to troubleshoot other nameservers, but the best way to make permanent changes to your DNS servers is to use System Settings.

Navigate to System Settings -> Network -> Wireless (or Wired). If you are connected via Wifi, select the wireless network you are connected to from the drop down. Press the "Options" button (you may have to disconnect from the network for this button to be enabled). In the IPv4 and IPv6 tabs, the method should be Automatic DHCP, meaning the network you are connecting to will provide your IP address, netmask, gateway, and DNS servers. Try entering a public DNS server (such as Google's: 8.8.8.8) in the "Additional DNS Servers" field for both the IPv4 and IPv6 tabs and reconnecting to the network.

Verify the new DNS server is in /etc/resolv.conf and try connecting to a website again.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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