RTNETLINK answers: No such device on a Virtuozzo VPS

Sometimes a VPS may stop working all of a sudden and while checking the issue, you notice that the ifconfig command is not showing any IP on the server.

[email protected] [~]# ifconfig
[email protected] [~]#

After restarting the network, its showing the following error.

[email protected] [~]# /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: No such device

RTNETLINK answers: No such device

RTNETLINK answers: No such device

[email protected] [~]#

The issue is because of the iproute package which got updated causing issues on the server. You need to downgrade the package. To downgrade the package, use the steps provided below.

Login to the main node and download the RPM as per the arch.

[[email protected] ~]# wget http://repo.smartservermanagement.com/misc/iproute-2.6.32-23.el6.x86_64.rpm
[[email protected] ~]# cp iproute-2.6.32-23.el6.x86_64.rpm /vz/private/455113/fs/root/

Where 455113 is the container ID

[[email protected] ~]# vzctl enter 455113
[email protected] [~]# rpm -qa |grep iproute
iproute-2.6.32-31.el6.x86_64
[email protected] [~]#
[email protected] [/]# rpm -e iproute-2.6.32-31.el6.x86_64 --nodeps
[email protected] [/]# rpm -ivh 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%]
[email protected] [/]# 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...

The server is up now. 🙂

Invalid username or password, please try again. An issue in a ubuntu VPS

After creation or migrating the VPS to a new node, you may face issues related to the Parallels Power Panel of the Container, root password not accepted for the Power Panel and the following error message is shown:

“Invalid username or password, please try again.”

SSH working though.

Reason : The default policy in Ubuntu 8.10 seems to be forced to use SHA512 hashing. For example, in Debian 5.0 (and previous versions of Debian, Ubuntu) it was set to MD5.

# grep '^[^#]' /etc/pam.d/common-password
password required pam_unix.so nullok obscure min=4 max=8 md5

Fix : It is sufficient to update the file /etc/pam.d/common-password and reset the ‘root’ password inside a Container.

# vzctl enter containerID
# sed '/^password.*pam_unix.so.*sha512/ s~sha512~md5~' -i etc/pam.d/common-password

After that this file /etc/pam.d/common-password will contain these lines,

# grep '^[^#]' /etc/pam.d/common-password
password [success=1 default=ignore] pam_unix.so obscure md5
password requisite pam_deny.so
password required pam_permit.so

and reset the root password by

# passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

Now, try to access the Power Panel by https://serverIP:4643.

Should be fine now.

Yum installation on a cPanel VPS

The OS template used for a cPanel VPS doesn’t include yum, you need to install it manually.

You can install Yum on Linux centOS 5.x 32 Bit server by installing following RPMS.

# rpm -ivh http://mirror.centos.org/centos/5/os/i386/CentOS/python-elementtree-1.2.6-5.i386.rpm

# rpm -ivh http://mirror.centos.org/centos/5/os/i386/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm

# rpm -ivh http://mirror.centos.org/centos/5/os/i386/CentOS/python-sqlite-1.1.7-1.2.1.i386.rpm

# rpm -ivh http://mirror.centos.org/centos/5/os/i386/CentOS/python-urlgrabber-3.1.0-6.el5.noarch.rpm

# rpm -ivh http://mirror.centos.org/centos/5/os/i386/CentOS/m2crypto-0.16-6.el5.8.i386.rpm

# rpm -ivh http://mirror.centos.org/centos/5/os/i386/CentOS/python-urlgrabber-3.1.0-6.el5.noarch.rpm

# rpm -ivh http://mirror.centos.org/centos/5/os/i386/CentOS/yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm

# rpm -ivh http://mirror.centos.org/centos/5/os/i386/CentOS/yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm –nodeps

# rpm -ivh http://mirror.centos.org/centos/5/os/i386/CentOS/yum-3.2.22-33.el5.centos.noarch.rpm

After all RPMs installd, run

# yum update

That’s it!