openvz instance can't assign or keep an IP address [message #39173] |
Mon, 22 March 2010 22:10 ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
3y3d0l
Messages: 1 Registered: March 2010 Location: Arizona
|
Junior Member |
|
|
Have an Openvz machine with 4 instances running on it, 3 of them with no issues. Within the past few days, one of the 4 instances stopped responding to pings, upon logging into the instance and doing an ifconfig, saw -
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: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 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:10995 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:554192 (541.2 KiB) TX bytes:0 (0.0 b)
notice the lack of the IP address.
When I run vzlist on the parent machine, the instance is listed normally with an IP address showing -
[root@bertha sbin]# vzlist
CTID NPROC STATUS IP_ADDR HOSTNAME
101 91 running 216.19.223.160 smtp-160.getnet.net
102 74 running 216.19.223.161 smtp-161.getnet.net
103 61 running 216.19.223.162 smtp-162.getnet.net
104 8 running 216.19.223.26 cache2.getnet.net
If I restart the instance, it seems to restart normally -
[root@bertha sbin]# vzctl restart 103
Restarting container
Stopping container ...
Container was stopped
Container is unmounted
Starting container ...
Container is mounted
Adding IP address(es): 216.19.223.162
Setting CPU units: 59787
Configure meminfo: 1216150
Set hostname: smtp-162.getnet.net
File resolv.conf was modified
Container start in progress...
I can remove the IP address using vzctl -
[root@bertha sbin]# vzctl set 103 --ipdel 216.19.223.162 --save
Deleting IP address(es): 216.19.223.162
Saved parameters for CT 103
However when I try to re-add the IP address the following error occurs -
[root@bertha sbin]# vzctl set 103 --ipadd 216.19.223.162 --save
Adding IP address(es): 216.19.223.162
SIOCADDRT: Network is unreachable
Saved parameters for CT 103
After adding the IP address again, despite the error, the IP address does show up if I run ifconfig -
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: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 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:148 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:7760 (7.5 KiB) 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:216.19.223.162 P-t-P:216.19.223.162 Bcast:216.19.223.162 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
But it isn't functional and disappears following a restart of the instance.
I can add the same IP address to another VPS and it works fine, and trying to add or change the IP address on the non-functioning VPS has the same results.
The other instances on the same machine, including a brand new one that I created so I could test with the same IP addresses all function fine, so there has to be something specific to this instance causing the issue. Has anyone run into something similar? Any suggestions for what I should look for on the malfunctioning instance? I would really rather avoid having to redo everything on a new VPS if possible.
|
|
|
|