[arch-general] Can't Connect to localhost/127.0.0.1 until I'm connected to a network
Hello, When I boot my computer the connection to the wifi network takes a while, until then I can't connect to localhost. So I can't use mpd for example, I musst either turn off my wifi card or wait until I'm connected. This is quite annoying, is there a way to solve that problem or at least get a better diagnosis for solving it on my own? Thomas
On Fri, Mar 6, 2009 at 3:54 PM, Thomas Bohn <thomas@bohnomat.de> wrote:
Hello,
When I boot my computer the connection to the wifi network takes a while, until then I can't connect to localhost. So I can't use mpd for example, I musst either turn off my wifi card or wait until I'm connected.
This is quite annoying, is there a way to solve that problem or at least get a better diagnosis for solving it on my own?
The lo interface is brought up by rc.sysinit right after it processes udev events. Do you, by chance, still have "lo" in your rc.conf INTERFACES array?
On 2009-03-06 16:04 -0600, Aaron Griffin wrote:
The lo interface is brought up by rc.sysinit right after it processes udev events. Do you, by chance, still have "lo" in your rc.conf INTERFACES array?
No, my INTERFACES array looks like this: INTERFACES=() It is empty and commented
On Fri, Mar 6, 2009 at 4:07 PM, Thomas Bohn <thomas@bohnomat.de> wrote:
On 2009-03-06 16:04 -0600, Aaron Griffin wrote:
The lo interface is brought up by rc.sysinit right after it processes udev events. Do you, by chance, still have "lo" in your rc.conf INTERFACES array?
No, my INTERFACES array looks like this:
INTERFACES=()
It is empty and commented
Ok, well... if you shut off your network AFTERWARDS, does it block your connection attempts too? Does /etc/hosts have "localhost" in there? At each step of the process, try running "ifconfig lo" to check what's going on with lo at that point.
On 2009-03-06 16:11 -0600, Aaron Griffin wrote:
Ok, well... if you shut off your network AFTERWARDS, does it block your connection attempts too? Does /etc/hosts have "localhost" in there?
When I shutdown the connection it doesn't work, the loop interface stays the same all the way. lo when connected: ---snip--- % ifconfig lo 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:23 errors:0 dropped:0 overruns:0 frame:0 TX packets:23 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2167 (2.1 Kb) TX bytes:2167 (2.1 Kb) ---snip--- when disconnected: ---snip--- % ifconfig lo 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:23 errors:0 dropped:0 overruns:0 frame:0 TX packets:23 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2167 (2.1 Kb) TX bytes:2167 (2.1 Kb) ---snip--- When I try to run ncmpcpp, when I'm disconnected: ---snip--- % ncmpcpp Cannot connect to mpd: host "localhost" not found: Temporary failure in name resolution % ncmpcpp Cannot connect to mpd: host "127.0.0.1" not found: Address family for hostname not supported ---snip--- It is just weird. Thomas
On Fri, Mar 6, 2009 at 4:19 PM, Thomas Bohn <thomas@bohnomat.de> wrote:
On 2009-03-06 16:11 -0600, Aaron Griffin wrote:
Ok, well... if you shut off your network AFTERWARDS, does it block your connection attempts too? Does /etc/hosts have "localhost" in there?
When I shutdown the connection it doesn't work, the loop interface stays the same all the way.
lo when connected: ---snip--- % ifconfig lo 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:23 errors:0 dropped:0 overruns:0 frame:0 TX packets:23 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2167 (2.1 Kb) TX bytes:2167 (2.1 Kb) ---snip---
when disconnected: ---snip--- % ifconfig lo 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:23 errors:0 dropped:0 overruns:0 frame:0 TX packets:23 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2167 (2.1 Kb) TX bytes:2167 (2.1 Kb) ---snip---
When I try to run ncmpcpp, when I'm disconnected: ---snip--- % ncmpcpp Cannot connect to mpd: host "localhost" not found: Temporary failure in name resolution % ncmpcpp Cannot connect to mpd: host "127.0.0.1" not found: Address family for hostname not supported ---snip---
It is just weird.
Agreed... how about running "route -nv" before and after lo is borked?
Ok, well... if you shut off your network AFTERWARDS, does it block your connection attempts too? Does /etc/hosts have "localhost" in there?
When I shutdown the connection it doesn't work, the loop interface stays the same all the way.
lo when connected: ---snip--- % ifconfig lo 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:23 errors:0 dropped:0 overruns:0 frame:0 TX packets:23 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2167 (2.1 Kb) TX bytes:2167 (2.1 Kb) ---snip---
when disconnected: ---snip--- % ifconfig lo 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:23 errors:0 dropped:0 overruns:0 frame:0 TX packets:23 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2167 (2.1 Kb) TX bytes:2167 (2.1 Kb) ---snip---
When I try to run ncmpcpp, when I'm disconnected: ---snip--- % ncmpcpp Cannot connect to mpd: host "localhost" not found: Temporary failure in name resolution % ncmpcpp Cannot connect to mpd: host "127.0.0.1" not found: Address family for hostname not supported ---snip---
It is just weird.
Thomas
Can you connect to ::1 when you are disconnected? Maybe you are using ipv6 for some reason while disconnected. -geirr
On 2009-03-06 23:24 +0100, Geir Erikstad wrote:
Can you connect to ::1 when you are disconnected?
Yes, I can. With IPv6 it works. Maybe I should use that or deactivate IPv6. Thomas
2009/3/6 Thomas Bohn <thomas@bohnomat.de>:
On 2009-03-06 23:24 +0100, Geir Erikstad wrote:
Can you connect to ::1 when you are disconnected?
Yes, I can. With IPv6 it works. Maybe I should use that or deactivate IPv6.
Thomas
I would disable ipv6 for now. Read this wikipage: http://wiki.archlinux.org/index.php/IPv6_-_Disabling_the_Module I guess adding: ::1 localhost.localdomain localhost in /etc/hosts might solve it too. Not sure why you are defaulting to ipv6 though... -geirr
On Fri, Mar 6, 2009 at 4:19 PM, Thomas Bohn <thomas@bohnomat.de> wrote:
---snip--- % ncmpcpp Cannot connect to mpd: host "localhost" not found: Temporary failure in name resolution % ncmpcpp Cannot connect to mpd: host "127.0.0.1" not found: Address family for hostname not supported ---snip---
This seems off to me... did you change anything in /etc/nsswitch.conf? Look for the line: hosts: files dns Also, Geir may be on to something regarding ipv6
participants (3)
-
Aaron Griffin
-
Geir Erikstad
-
Thomas Bohn