You are not logged in.

#1 2009-04-21 20:02:56

dpayne19
Member
Registered: 2009-04-21
Posts: 12

[SOLVED] Can't ping localhost

Ever since a fairly large update I haven't been able to ping localhost. When I try to ping localhost or 127.0.0.1 it hangs.

dpayne19 ~ $ ping localhost
PING localhost.localdomain (127.0.0.1) 56(84) bytes of data.

/etc/hosts

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

#<ip-address>    <hostname.domain.org>    <hostname>
127.0.0.1     localhost.localdomain    localhost dpayne19-laptop

# End of file

I don't know if this is related but "ping6 ::1" still works fine.

Last edited by dpayne19 (2009-04-22 19:15:12)

Offline

#2 2009-04-21 21:35:36

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: [SOLVED] Can't ping localhost

Ifconfig tells you the loopback interface is up?

This is a recent install (and recent update)? Did you check pacman's output for anything peculiar, any error messages in the various system logs?

Loopback device configuration has been taken out the central configuration script a while ago, so it should be set up automatically (and I've never seen it fail, even when one had to configure it in rc.conf, but there's always a first).


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2009-04-21 22:00:58

alexandrite
Member
Registered: 2009-03-27
Posts: 326

Re: [SOLVED] Can't ping localhost

I acutally had a problem connecting to localhost, and I solved it by adding the loopback adapter (lo) to the "interfaces" line in rc.conf.

Something like this:

...
INTERFACES=(!eth0 !wlan0 lo)
...

Offline

#4 2009-04-21 22:18:57

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: [SOLVED] Can't ping localhost

I added ::1 localhost "hostname" to /etc/hosts, but it didn't solve the ping problem, but mpd works again. I didn't have internet that entire day and thought it was related to that so once it started working I didn't pay further attention to it.

Offline

#5 2009-04-22 02:21:52

dpayne19
Member
Registered: 2009-04-21
Posts: 12

Re: [SOLVED] Can't ping localhost

I've tried everything suggested and none if it works.

B:
I checked output from the update. I didn't notice anything about loopback or anything like that, but I may have missed something.

ifconfig

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1002 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1002 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:57072 (55.7 Kb)  TX bytes:57072 (55.7 Kb)

alexandrite:
I tried adding lo to interfaces as well as trying to configure it in rc.conf with

...
lo="lo 127.0.0.1"
INTERFACES=(eth0 lo)
...

neither of those worked.

Procyon:
If I add

::1 localhost.localdoman localhost dpayne19-laptop

to /etc/hosts I can ping6 localhost, but I still can't ping localhost and mpd still doesn't work.

Last edited by dpayne19 (2009-04-22 02:22:59)

Offline

#6 2009-04-22 04:57:04

fumbles
Member
Registered: 2006-12-22
Posts: 246

Re: [SOLVED] Can't ping localhost

Are you using any firewall? iptables etc?

Offline

#7 2009-04-22 05:09:59

decaren
Member
Registered: 2009-04-17
Posts: 24

Re: [SOLVED] Can't ping localhost

make sure your MODULES line in /etc/rc.conf has loop (i.e. MODULES=(loop)

Offline

#8 2009-04-22 07:04:55

dpayne19
Member
Registered: 2009-04-21
Posts: 12

Re: [SOLVED] Can't ping localhost

Disabling iptables was the first thing I tried and it doesn't seem to have any effect.
loop is in the MODULES list and lsmod says it has been loaded.

Last edited by dpayne19 (2009-04-22 07:06:35)

Offline

#9 2009-04-22 07:35:02

robmaloy
Member
From: Germany
Registered: 2008-05-14
Posts: 263

Re: [SOLVED] Can't ping localhost

decaren wrote:

make sure your MODULES line in /etc/rc.conf has loop (i.e. MODULES=(loop)

loop is used to mount files like block devices


☃ Snowman ☃

Offline

#10 2009-04-22 15:20:29

JK3mp
Member
Registered: 2009-03-25
Posts: 105

Re: [SOLVED] Can't ping localhost

create another user profile and try again.

Offline

#11 2009-04-22 16:25:52

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [SOLVED] Can't ping localhost

you should also check /etc/sysctl.conf for kicks.  our stateful firewall wiki  recommended adding this:

net.ipv4.icmp_echo_ignore_all = 1

which will make your box invisible to pings (secure!)

of course, with it you can't ping localhost either.  smile

Offline

#12 2009-04-22 19:11:53

dpayne19
Member
Registered: 2009-04-21
Posts: 12

Re: [SOLVED] Can't ping localhost

That was it, sorta. After removing

net.ipv4.icmp_echo_ignore_all = 1

from /etc/sysctl.conf I could ping localhost. Mpd still didn't work though, so I removed everything else suggested in the stateful firewall wiki and now everything works fine.

Thanks for all the help! smile

Offline

#13 2009-04-22 22:44:24

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,222
Website

Re: [SOLVED] Can't ping localhost

decaren wrote:

make sure your MODULES line in /etc/rc.conf has loop (i.e. MODULES=(loop)

That won't do a thing to networking... loop is for loop mounting files as devices, not loopback network interface.

Offline

#14 2009-04-28 04:43:49

decaren
Member
Registered: 2009-04-17
Posts: 24

Re: [SOLVED] Can't ping localhost

fukawi2 wrote:
decaren wrote:

make sure your MODULES line in /etc/rc.conf has loop (i.e. MODULES=(loop)

That won't do a thing to networking... loop is for loop mounting files as devices, not loopback network interface.

Someone should probably correct that in the beginner's guide then.  I just remembered it from doing a bunch of installs and reading through the beginners guide a million times last week.  Sorry.

Offline

#15 2009-04-28 05:48:29

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,222
Website

Re: [SOLVED] Can't ping localhost

Fixed.

MODULES=: Specify additional MODULES if you know that an important module is missing. If your system has any floppy drives, add "floppy". If you will be using loopback filesystems, add "loop". Also specify any blacklisted modules by prefixing them with a bang (!). Udev will be forced NOT to load blacklisted modules. In the example, the IPv6 module as well as the annoying pcspeaker are blacklisted.

Offline

#16 2009-04-29 14:08:25

JK3mp
Member
Registered: 2009-03-25
Posts: 105

Re: [SOLVED] Can't ping localhost

fukawi2 wrote:

Fixed.

MODULES=: Specify additional MODULES if you know that an important module is missing. If your system has any floppy drives, add "floppy". If you will be using loopback filesystems, add "loop". Also specify any blacklisted modules by prefixing them with a bang (!). Udev will be forced NOT to load blacklisted modules. In the example, the IPv6 module as well as the annoying pcspeaker are blacklisted.

Can u show us the output of ifconfig ?

Offline

#17 2009-04-29 22:48:02

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,222
Website

Re: [SOLVED] Can't ping localhost

fukawi2 ~  $ ifconfig lo
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:276752 errors:0 dropped:0 overruns:0 frame:0
          TX packets:276752 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:113634458 (108.3 Mb)  TX bytes:113634458 (108.3 Mb)

What are you getting at?

Offline

Board footer

Powered by FluxBB