ABHIONLINUX
Site useful for linux administration and web hosting

Showing posts with label VPS. Show all posts
Showing posts with label VPS. Show all posts

2009/10/13

How to find the load and uptime of each nod in a VPS Master server

for i in `vzlist | awk '{print $1}'`; do echo "VPS $i"; vzctl exec $i uptime; done


vzpid processid -- will show which vps contains that process.
Eg:
vzpid 27262
Pid VEID Name
27262 290 httpd

2009/10/01

Yum issues. TypeError: rpmdb open failed

Yum issues.

While giving the command "yum list " getting the error

==========================================================
Loaded plugins: fastestmirror
error: no dbpath has been set
error: cannot open Packages database in /%{_dbpath}
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 229, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 84, in main
base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line 184, in getOptionsConfig
enabled_plugins=self.optparser._splitArg(opts.enableplugins))
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 191, in _getConfig
self._conf = config.readMainConfig(startupconf)
File "/usr/lib/python2.4/site-packages/yum/config.py", line 754, in readMainConfig
yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
File "/usr/lib/python2.4/site-packages/yum/config.py", line 824, in _getsysver
idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed
==========================================

Solution

#rm /dev/urandom
#mknod -m 644 /dev/urandom c 1 9

that should solve problem

until second VPS reboot...

----
stop VPS
mknod --mode 644 /vz/private/100/lib/udev/devices/urandom c 1 9
start VPS

Your issue should fix your issue
For more reference you can use the link http://forum.openvz.org

Unable to open pty: No such file or directory

While trying to login to the VPS , if you are getting the error
Unable to open pty: No such file or directory
Please try the commands in the main node VPS.

vzctl exec VEID /sbin/MAKEDEV pty
vzctl exec VEID /sbin/MAKEDEV tty

This will fix your issue.