View previous topic :: View next topic |
Author |
Message |
Geralt Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 14 Jun 2008 Posts: 150
|
Posted: Sat Jun 27, 2009 11:21 am Post subject: Hostname resolution fails when only net.lo is up |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Sadako Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/2074682074aea79062b33b.jpg)
Joined: 05 Aug 2004 Posts: 3792 Location: sleeping in the bathtub
|
Posted: Sat Jun 27, 2009 11:49 am Post subject: |
|
|
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," ). _________________ "You have to invite me in" |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Geralt Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
Joined: 14 Jun 2008 Posts: 150
|
Posted: Sat Jun 27, 2009 11:57 am Post subject: |
|
|
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," ). |
Your're a genious, that fixed it Thanks! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
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
|
|