OpenVZ Forum


Home » General » Support » No Local Loopback with OpenVz and Ubuntu
No Local Loopback with OpenVz and Ubuntu [message #25142] Sat, 15 December 2007 20:15 Go to next message
Scaryman is currently offline  Scaryman
Messages: 4
Registered: December 2007
Junior Member

Hello,
i have a Problem with Openvz and Ubuntu 7.10. The Host System is a Ubuntu 7.10 with the 2.6.18-fza-028stab051.1-686 Kernel. In my Guest System (Ubuntu 7.10) i have only 2 Network Devices and no Local Loopback but i neep this for my DNS Server.

When I Start a Debian guest i have this devices.

root@ubuntu-ns:/# ifconfig
venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:127.0.0.1  P-t-P:127.0.0.1  Bcast:0.0.0.0  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  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)

venet0:0  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:10.0.0.1  P-t-P:10.0.0.1  Bcast:0.0.0.0  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
Re: No Local Loopback with OpenVz and Ubuntu [message #25143 is a reply to message #25142] Sat, 15 December 2007 21:38 Go to previous messageGo to next message
ugob is currently offline  ugob
Messages: 271
Registered: March 2007
Senior Member
Why do you need loopback addresses? I run many DNS servers in VE and I don't have any problems...

Please read the manual before asking questions:
http://download.openvz.org/doc/OpenVZ-Users-Guide.pdf

Please have a look at the wiki before asking questions:
http://wiki.openvz.org/Main_Page
Re: No Local Loopback with OpenVz and Ubuntu [message #25144 is a reply to message #25143] Sat, 15 December 2007 23:02 Go to previous messageGo to next message
Scaryman is currently offline  Scaryman
Messages: 4
Registered: December 2007
Junior Member
Ok for the DNS Server is the loop back device not necessary but, i have many PHP Scripts on the server, and this scrips use the 127.0.0.1 for the Mysql Connection.
Re: No Local Loopback with OpenVz and Ubuntu [message #25149 is a reply to message #25142] Sat, 15 December 2007 23:45 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Try to do /etc/init.d/network restart, if that doesn't help do /etc/init.d/network stop and then remove /var/run/network/ifstate.

Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: No Local Loopback with OpenVz and Ubuntu [message #25153 is a reply to message #25144] Sun, 16 December 2007 00:29 Go to previous messageGo to next message
ugob is currently offline  ugob
Messages: 271
Registered: March 2007
Senior Member
Have you tried using localhost instead of 127.0.0.1?

Please read the manual before asking questions:
http://download.openvz.org/doc/OpenVZ-Users-Guide.pdf

Please have a look at the wiki before asking questions:
http://wiki.openvz.org/Main_Page
Re: No Local Loopback with OpenVz and Ubuntu [message #25160 is a reply to message #25149] Sun, 16 December 2007 10:39 Go to previous messageGo to next message
Scaryman is currently offline  Scaryman
Messages: 4
Registered: December 2007
Junior Member
Hello,
Thanks Ths
/etc/init.d/network stop and then remove /var/run/network/ifstate.

Works now i have the local loopback and can ping 127.0.0.1 or localhost

I have a last question, is it not good to use Ubuntu & OpenVz? I can change without problems to Debian 4.0.

[Updated on: Sun, 16 December 2007 10:42]

Report message to a moderator

Re: No Local Loopback with OpenVz and Ubuntu [message #26822 is a reply to message #25160] Fri, 01 February 2008 16:43 Go to previous messageGo to next message
happyfunball is currently offline  happyfunball
Messages: 18
Registered: November 2007
Location: Toronto
Junior Member
I have the same problem. Stopping services and restaring after deleting ifstate does work, but the next time the vps restarts the loopback interface is gone again.

How do you add it permanently?
Re: No Local Loopback with OpenVz and Ubuntu [message #26824 is a reply to message #26822] Fri, 01 February 2008 21:24 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
Hi, seems like this is a problem specific to the ubuntu network interface configuration script. Its not really an openvz problem but rather a bug/problem with the ip/ifconfig calls being executed by the init script.

Is this an unmodified version of the ubuntu template in the openvz mirrors?

Rick


-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: No Local Loopback with OpenVz and Ubuntu [message #26825 is a reply to message #26824] Fri, 01 February 2008 22:26 Go to previous messageGo to next message
happyfunball is currently offline  happyfunball
Messages: 18
Registered: November 2007
Location: Toronto
Junior Member
This is the template available for download on the OpenVZ site for Ubuntu 7.

Yep, its a template problem rather than a OS problem.
Re: No Local Loopback with OpenVz and Ubuntu [message #27243 is a reply to message #25142] Tue, 12 February 2008 18:41 Go to previous messageGo to next message
geraldb is currently offline  geraldb
Messages: 3
Registered: February 2008
Junior Member
Instead of messing with /var/run/network/ifstate, I've found:

ifdown lo
ifup lo

works fine too.

Still, I'd like to find a permanent solution as well. I'm wondering if the line:

/etc/init.d/networking restart

in /etc/rc.local has something to do with it. I see that case excludes the 'lo' interface. What about just linking networking into the rcN.d directory, or using 'start' in rc.local instead of restart, if the networking script has not been run?

(I'm running on a remote VPS, so I'm a bit a limited in what messing around I can do with networking. If I break it, I can't get back in to change back! Otherwise, it'd try it myself.)
Re: No Local Loopback with OpenVz and Ubuntu [message #27328 is a reply to message #27243] Thu, 14 February 2008 19:59 Go to previous messageGo to next message
geraldb is currently offline  geraldb
Messages: 3
Registered: February 2008
Junior Member
Well, it looks like that networking restart line is necessary on my hosting environment as well, so my work-around is to add the ifdown/ifup commands to /etc/rc.local, after the networking restart. This works for me, but of course, does not get us any closer to the root of the problem with the network interfaces failing to come up in the first place.

Here's my modified version of /etc/rc.local:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

/etc/init.d/networking restart

/sbin/ifdown lo
/sbin/ifup lo

exit 0


Hope that helps someone!
Re: No Local Loopback with OpenVz and Ubuntu [message #27649 is a reply to message #25142] Thu, 21 February 2008 17:00 Go to previous message
geraldb is currently offline  geraldb
Messages: 3
Registered: February 2008
Junior Member
A further tweak to the above:

Some init scripts (postfix in particular, in my case) expect the network interfaces to be available when they run, and rc.local is running too late (priority 99) in the init order.

So I've moved the contents of the rc.local script posted earlier into a new /etc/init.d/networking-restart script, and set its priority to S15/K85, so that it runs before most other init scripts. (It could probably go earlier; I just chose 15 because it was before ssh and postfix.) The following installs the new init script into the init start/stop queues:

update-rc.d networking-restart start 15 2 3 4 5 . stop 85 0 1 6 .


Again, this doesn't solve the issue, only provides a work-around, each step a little better than the previous. I don't know how to incorporate this into the official Ubuntu image, but I would be pleased to see it. And, of course, suggestions for further improvements are welcomed.
Previous Topic: sftp / mount problem
Next Topic: Run XORP in VE
Goto Forum:
  


Current Time: Fri Apr 26 21:02:49 GMT 2024

Total time taken to generate the page: 0.01778 seconds