1

I try to start a mongo server, but it can't connect to any port. I guess it is because of my loopback, which seems to be not up (not even sure of that - I am not an infra-expert :-/ ) I tried:

$sudo ifconfig lo:0 127.0.0.1 netmask 255.0.0.0 up

But i still have :

$ifconfig lo
lo        Link encap:Local Loopback  
          LOOPBACK  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

conf :

$ cat /etc/hosts
127.0.0.1   localhost
192.168.0.39 localhost
127.0.1.1 pl    
192.168.0.38 wk

Any idea ?

1
  • can you ping localhost/127.0.0.1? if you run sudo netstat -ntlup | grep 127.0.0.1 do you get any output? Nov 2, 2016 at 16:36

1 Answer 1

0

By some simple poking around on my own machine it seems that your loopback is indeed down.

What I did notice is that you try to bring up interface lo:0 as opposed to just lo, which I find strange. After inducing the problem on purpose here, I fixed it by simply running sudo ifconfig lo up. If that doesn't work, include the IP as you did: sudo ifconfig lo 127.0.0.1 netmask 255.0.0.0 up.

After the above I was able to (again) ssh into my local machine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .