Jan
1
(2007)
Ubuntu Server Not Seeing Localhost?
Filed under: Uncategorized. Tags: drupal, lazyweb, linux, ubuntu.
I’ve been setting up a shared Drupal hosting environment on an Ubuntu Server box, and just about everything is running great. Drupal’s running, MysQL is running, and everything feels nice and fast.
But, the server can’t see itself on the network. It can’t even ping itself (via 127.0.0.1, localhost, or either of the domains pointing to the box). It can ping other boxes, though. It can’t curl or wget or lynx any of the sites on itself. It can’t telnet to its own services (which makes setting up mail services etc… a bit tricky).
The bizarre thing is, I can have full access to the services on that box remotely. SSH, FTP, ping, HTTP, etc… are all up and running, and respond normally to requests from off-machine.
None of that would be fatal, but the result of not being able to even curl a URL on the same box, means I can’t run a script to automatically run cron.php on all Drupal sites.
I’m not sure what might need tweaking to enable the box to see itself over TCP/IP. I’ve checked in /etc/hosts, I’ve checked apache2 configs (nothing is rejecting from localhost).
Any ideas?


Thank you!
I am not sure why I commented out the lo directives when I assigned a static IP, and was pulling my hair out trying to troubleshoot why I could not network browse or load swat from localhost, but could from elsewhere on our little lan.
I had a similar problem with one of my Ubuntu boxes. Everything remotely seemed to be working, but postfix refused to deliver local mail, because it couldn’t talk to localhost. In my case, the loopback interface (lo) was down. Maybe it’s down for you, too: does the “lo” interface show up in ifconfig? If not,
sudo ifup lo
did the trick for me.
hth,
e
eafarris: thanks! turns out my /etc/network/interfaces was missing the lo entry, and after I added that, restarted networking, and fired off the sudo ifup lo, all’s good.
thanks!