Showing posts with label openvz. Show all posts
Showing posts with label openvz. Show all posts

Thursday, May 5, 2011

vps ssh not starting after update in openvz

if you face this condition, you are almost doomed for reinstall, but wait!

updated:
edit /vz/private/[vbox#]/etc/init/ssh.conf,
comment off oom never:
#oom never

reboot the vps, it shall work :)
or else, try alternative below:
---------------------

there is a way to solve this..
1st, create a file in /etc/init.d/sshstart

fill it up with:
sh /etc/init.d/ssh start

then run
/sbin/vzctl runscript [vps container #] /vz/private/[vpscontainer#]/etc/init.d/sshstart

if you get any error, this might give you lead on how to solve it.

but as for my condition, i found the problem in the /var/log/daemon.log to refer to:
init: ssh main process (21717) terminated with status 255
Failed to spawn ssh pre-start process: unable to set oom adjustment: Operation not permitted

Someone suggested that the issue is because the ssh is not launched after network, therefore to fix it, you will need to edit /etc/ssh/sshd_config and enable the line ListenAddress 0.0.0.0

But in my case, it didnt work. so ive done a work around to start it via vzctl.
If you dont know your vps container #, its in
ls /vz/private/

References:

openvz stop running

Sometimes, updating the o/s of the dedicated server with openvz installed, might trigger change of default kernel to boot from.
To fix it...
sudo vi /boot/grub/menu.lst

Change the line to point to the index of the openvz kernel. the starting index will be 0
Example:
default 1
to:
default 0

Userful command:
/usr/sbin/vzlist -a
/usr/sbin/vzctl
uname -a


Wednesday, May 4, 2011

openvz meta data checksum failed

If you face checksum failed when trying to sudo yum update, try this:

sudo yum clean all
sudo yum makecache