ubuntu 127.0.0.1 not working, going timeout

Solution 1:

sudo ifconfig and see if lo0 interface is up and running. If not, try sudo ifconfig lo0 127.0.0.1.

Have you heavily modified the network settings? If your Ubuntu truly is as ancient as 11.04, then /etc/network/interfaces might the file to check out, if my memory serves me right.

Some strange iptables rules might also cause this kind of problems.