Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Hostname resolution fails when only net.lo is up
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Geralt
Apprentice
Apprentice


Joined: 14 Jun 2008
Posts: 150

PostPosted: Sat Jun 27, 2009 11:21 am    Post subject: Hostname resolution fails when only net.lo is up Reply with quote

Hi,

how can I configure my system so that even if only net.lo is running the resolution of localhost still succeeds?
Here's a short session to demonstrate the issue:
Code:

# /etc/init.d/net.wlan0 stop
 * Caching service dependencies ...                                       [ ok ]
 * Service net.wlan0 stopping
 * Service net.wlan0 stopped
# /etc/init.d/net.lo status
 * status:  started
# hostx localhost
Nameserver not running
localhost A record not found, try again


And here's my /etc/resolv.conf /etc/hosts and /etc/host.conf file:
Code:

# cat /etc/resolv.conf
# Generated by dhcpcd
# /etc/resolv.conf.head can replace this line
# /etc/resolv.conf.tail can replace this line


Code:

# grep -v '#' /etc/hosts
127.0.0.1 localhost, geralt-xps
::1       localhost, geralt-xps


Code:

# grep -v '#' /etc/host.conf
order hosts, bind

multi off




How can I solve this? From what I understand about this the resolution order in /etc/host.conf should tell the system to first look into /etc/hosts.




Geralt
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3792
Location: sleeping in the bathtub

PostPosted: Sat Jun 27, 2009 11:49 am    Post subject: Reply with quote

This may not be an issue, but you have commas after localhost in /etc/hosts, which I've never seen before, usually it's just whitespace (tabs or spaces) separating the fields.

Try removing them (but first, try pinging "localhost," :P ).
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
Geralt
Apprentice
Apprentice


Joined: 14 Jun 2008
Posts: 150

PostPosted: Sat Jun 27, 2009 11:57 am    Post subject: Reply with quote

Hopeless wrote:
This may not be an issue, but you have commas after localhost in /etc/hosts, which I've never seen before, usually it's just whitespace (tabs or spaces) separating the fields.

Try removing them (but first, try pinging "localhost," :P ).

Your're a genious, that fixed it :) Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum