RTNETLINK answers: File exists

Openvz architecture in Centos 6.5 has an issue

If you are facing issues where ifconfig shows no ip address or below error

root@server [/]# ifconfig
root@server [/]# /etc/init.d/network restart
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:  RTNETLINK answers: Operation not supported
Failed to bring up lo.
[FAILED]
Bringing up interface venet0:  RTNETLINK answers: Operation not supported
Failed to bring up venet0.
[FAILED]
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists

 

Below is the solution for this issue

Its due to package iproute which is causing this issue

Use below method to fix it

Login to main node of the server

[root@hostonine ~]# wget http://repo.smartservermanagement.com/misc/iproute-2.6.32-23.el6.x86_64.rpm
–2014-06-03 08:21:42–  http://repo.smartservermanagement.com/misc/iproute-2.6.32-23.el6.x86_64.rpm
Resolving repo.smartservermanagement.com… 95.154.203.53
Connecting to repo.smartservermanagement.com|95.154.203.53|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 351552 (343K) [application/x-rpm]
Saving to: `iproute-2.6.32-23.el6.x86_64.rpm’

100%[====================================================================================================================>] 351,552      421K/s   in 0.8s

2014-06-03 08:21:44 (421 KB/s) – `iproute-2.6.32-23.el6.x86_64.rpm’ saved [351552/351552]

#Copy the package to vps using below command where 180 is VPS ID

[root@hostonline ~]# scp -r iproute-2.6.32-23.el6.x86_64.rpm  /vz/private/180/var/

#Now login to VPS

 

[root@hostonline ~]# vzctl enter 180
entered into CT 180
root@server [/]# cd /var/

Check for the rpm iproute

root@server [/var]# rpm -q iproute
iproute-2.6.32-31.el6.x86_64

#Remove the old rpm

root@server [/var]# rpm -e iproute-2.6.32-31.el6.x86_64 –nodeps

 

#Install the new RPM

root@server [/var]# rpm -Uvh iproute-2.6.32-23.el6.x86_64.rpm
warning: iproute-2.6.32-23.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 192a7d7d: NOKEY
Preparing…                ########################################### [100%]   1:iproute                ########################################### [100%]

 

 

#Now restart networking and check

root@server [/var]#  service network restart
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface venet0:  Determining if ip address 127.0.0.1 is already in use for device venet0…
[  OK  ]
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists
RTNETLINK answers: File exists