PDA

View Full Version : OpenVZ issue fix: RTNETLINK answers: Operation not supported



Fli
06-09-2014, 01:08 PM
After i restarted CentOS 6.5 64bit OpenVZ VPS, websites hosted there was not loading and it returned errors like:

service httpd restart

Looking up localhost
Making HTTP connection to localhost
Alert!: Unable to connect to remote host.

lynx: Can't access startfile [url]http://localhost/whm-server-status

then there was another bigger issue with networking on the VPS:

service 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

There are explanations on how to fix above mentioned OpenVZ network issue:
http://kb.parallels.com/en/118992
http://www.linuxbabu.net/2013/12/virtuozzo-rtnetlink-answers-operation-not-supported/
http://www.webhostingtalk.com/showthread.php?t=1327600

So according to above tutorials, new iproute package can be removed from VPS and then installed older package on VPS which fix above mentioned issue.
I have CentOS 5.10 Final on Host OpenVZ server and CentOS 6.5 on VPS.

On Host OpenVZ server node i did:

wget http://vault.centos.org/6.4/os/x86_64/Packages/iproute-2.6.32-23.el6.x86_64.rpm

to download iproute package made for Redhat/CentOS 6, 64bit. If u have other OS on VPS, then u might need to install another package (non el6 or non 64).

so i download iproute rpm file on openvz host server (networking dont work at VPS), and then copy it to VPS /root folder:


cp iproute*rpm /home/vps/860/root
(i have vpss folder in /home, default is in /vz/root/860/root i think)

then login to VPS from openvz host server:

vzctl enter 860

go to root directory in VPS and list contents:
cd /root;ls

see rpm file. Now uninstall iproute package from VPS:

rpm -e iproute --nodeps

and install iproute you downloaded earlier from internet:

rpm -Uvh iproute-2.6.32-23.el6.x86_64.rpm

then:

/etc/init.d/network restart

Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface 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

if httpd did not worked, now should work:
service httpd restart

PS: there was many services not running so i rebooted VPS. Then i realised my additional iptables modules was not loaded, see here for more info (http://internetlifeforum.com/virtualisation/2015-openvz-fix-%5Bfatal-error-iptables-no-chain-target-match-name-%5D/#post2979).