You are not logged in.

#1 2011-04-29 11:00:20

korpenkraxar
Member
Registered: 2006-04-02
Posts: 123

ping: unknown host localhost

Arghh!

I am struggling to get my laptop to resolve either "localhost" or "pantherworm" (which is my hostname), which used to work just fine. The machine uses networkmanager to manage both wireless and wired connections. Neither name works.

hostname -a
hostname: Unknown host

This is what I currently have in /etc/hosts (having tried five hundred thousand million billion variants with no success up until this point):

#
# /etc/hosts: static lookup table for host names
#

#<ip-address>    <hostname.domain.org>    <hostname>
127.0.0.1    localhost.localdomain    localhost pantherworm
::1    localhost6.localdomain6    localhost6
::1        localhost.localdomain    localhost
127.0.0.1 localhost
127.0.0.1 pantherworm

# End of file

I suspect there is a recent regression somewhere in the network pipeline. Does your machine use networkmanager and resolve localhost and your hostname correctly? Please please post your settings/file contents to get this working!

Offline

#2 2011-04-29 11:17:28

hcjl
Member
From: berlin
Registered: 2007-06-29
Posts: 330

Re: ping: unknown host localhost

did you enter the hostname in /etc/rc.conf?

Offline

#3 2011-04-29 11:18:23

korpenkraxar
Member
Registered: 2006-04-02
Posts: 123

Re: ping: unknown host localhost

hcjl wrote:

did you enter the hostname in /etc/rc.conf?

# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="pantherworm"

Offline

#4 2011-04-30 12:36:29

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: ping: unknown host localhost

Try adding your hostname to the ipv6 lines too in /etc/hosts.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#5 2011-04-30 17:06:29

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: ping: unknown host localhost

Does it work w/o ipv6? If not, try only this one line in /etc/hosts:

127.0.0.1 pantherworm.localdomain localhost.localdomain localhost pantherworm

Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#6 2011-04-30 18:05:34

zertyz
Member
From: Rio de Janeiro
Registered: 2010-06-25
Posts: 14
Website

Re: ping: unknown host localhost

Please post the output of ifconfig and ls -l /etc/hosts

[]s
Luiz

Offline

#7 2011-05-03 22:43:02

korpenkraxar
Member
Registered: 2006-04-02
Posts: 123

Re: ping: unknown host localhost

Here is an update on the issue. At the office I use manual settings of a normal ipv4 network and neither hostname -a nor hostname -f returns anything more than an empty line. At home I get my network settings from my wireless router running Gargoyle and while hostname -a still does not return anything, hostname -f returns:

pantherworm.BLODAN

Still no localhost though...

Offline

#8 2011-05-03 22:50:08

korpenkraxar
Member
Registered: 2006-04-02
Posts: 123

Re: ping: unknown host localhost

Leonid.I wrote:

Does it work w/o ipv6? If not, try only this one line in /etc/hosts:

127.0.0.1 pantherworm.localdomain localhost.localdomain localhost pantherworm

Tried it. Makes no difference :-(

Offline

Board footer

Powered by FluxBB