Unable to stop or start VPS even after Host reboot

Filed Under (Virtuozzo, Windows Virtuozzo) by Milind on 31-01-2012

While stopping any VPS it gets timeout and VPS gets locked. After that it’s impossible to stop the VPS even if the method here gets failed OR even after rebooting the Host server problem doesn’t get fixed. Following are the steps to fix this issue

1) The very first step is to find out which process still running inside the VPS. To find the VPS process login to the host server from RDP and open Task Manager (Right Click on task bar >> Task Manger).

2) Sort the processes using CTID which will list all the processes on the basis of VPS ID or Container ID

taskbar 300x141 Unable to stop or start VPS even after Host reboot

 

If you find any processes named “winlogon” and “csrss” under problematic VPS then it’s not possible to kill these processes as they are critical windows services.

3) Disable “vzsrv” service from Service manager Or by executing following command from command prompt

C:\>sc config vzsrv start= disabled

4) Reboot the Host server.

5) As we have disabled vzsrv service non of the VPS will start but you will able to edit the VPS configuration file. Open VPS configuration file from [Path to VZ directory]:\vz\Conf\CTID.conf and add following string into the beginning of the file to disable on boot feature of the VPS.

Autoboot=”0″

6) Enable the vzsrv and reboot the host server again.

This will restart all the VPS except the problematic VPS. We would suggest you to scan the VPS using CureIT (after mounting it) as there is a possibility the the VPS is infected with Viruses.

Virtuozzo Backup Error: 307 Message processing was terminated because timeout was reached

Filed Under (Linux Virtuozzo, Virtuozzo) by Milind on 25-01-2012

Sometime whenever a user tries to take backup from Virtuozzo Power Panel or Parallels Power panel it gets failed and action logs shows following Error

#307 Message processing was terminated because timeout was reached waiting for a response

vzbackup 300x116 Virtuozzo Backup Error: 307 Message processing was terminated because timeout was reached

The above error shows that the timeout limit which is set in the Virtuozzo Configuration for backup has been reached and the backup was not completed during that time frame. To increase Virtuozzo backup Timeout limit

1) Open file “/etc/sysconfig/vzagent/vzagent.conf

2) Search For key word “backup” and Change it

FROM:
< timeouts >
< backup >3600< / backup >
< search >3600< / search >
< / timeouts >
TO:
< timeouts >
< backup >18000< / backup >
< search >3600< / search >
< / timeouts >

By deafult the limit which is set is 3600 seconds which is 1 Hour; Change it to the limit as per your requirement, here I have set it 18000 seconds which is near about 5 hours.

3) To apply this setting, restart service VE on the Host server. Service VE can be restarted using command “vzctl restart 1” (This will restart vzagent on the host)

Now try to take backup from “Virtuozzo Power Panel or Parallels Power panel”

vzbackupsus 300x129 Virtuozzo Backup Error: 307 Message processing was terminated because timeout was reached

How to: Set Priotrities for YUM Repositories

Filed Under (Linux Tips, Linux Virtuozzo) by Milind on 15-01-2012

Sometime when you have enabled many YUM Repositories like local repository, rpmforge, ATrpms for your server and it’s quite difficult to manage packages where you want that the package which you want to install too be searched on Local Repository first, then to CentOS Base, update and if it doens’t find the package here it will go for any other Third Party Repositories.

This Task can be done by setting up Priority for the Yum Repositories. Following are the steps to set Priorities for YUM Repositories

1) Install yum-priorities

The yum-priorities is used to enforce ordered protection of repositories, by giving priorities to repositories. Packages from repositories with a lower priority will never be used to upgrade packages that were installed from a repository with a higher priority. The priorities are also in effect when a new package is installed – if a package is in more than one repository, it will be installed from the repository with the highest priority. This plugin is particularly useful for anyone who uses one or more third-party repositories, as these repositories may update system files, which can potentially compromise the stability of your CentOS installation. This Package can be installed using following YUM Command.

[root@server ~]# yum install yum-priorities -y


**using option -y
with yum will allow yum to install package with taking permission from user.

2) Applying Priorities

Priorities for a Repository need to be added in .repo file. Following is the syntax for setting Priority

priority=[NUM]


Here [NUM] will be the Priority. The Repository with higher priority will be used for installing any package. e.g. if you want your local repository should have highest priority than you can set highest priority for the same like below

[localrepo]
name = CentOS $releasever – MyLocalRepo
baseurl = file:///opt/CENTOS/RPMS/
enabled=1
gpgcheck=0
priority=10


All other repositories will have lesser value as compared to Local Repository.

FIX:- error while loading shared libraries: libdns.so.22

Filed Under (Cpanel, Linux Virtuozzo) by Milind on 10-01-2012

Recently while restarting DNS service on Cpanel VPS it shows following errors:

[root@support ~]# /etc/init.d/named start
Starting named: /usr/sbin/named: error while loading shared libraries: libdns.so.22: cannot open shared object file: No such file or directory
[FAILED]

[root@support ~]# /etc/init.d/named start
Starting named: /usr/sbin/named: error while loading shared libraries: libisc.so.11: cannot open shared object file: No such file or directory
[FAILED]

We have checked and found that the OS template [CentOS 5.3] has been update to [CentOS 5.4] due to will all the binaries of the VPS has been updated as well. For temporary work around I have copied the libdns.so and libisc.so to libdns.so.22 and libisc.so.11.

[root@support ~]# cd /usr/lib
[root@support lib]# cp libdns.so libdns.so.22
[root@support lib]# cp libisc.so libisc.so.11

After that we were able to restart named server

[root@support lib]# service named restart
Stopping named:                                            [FAILED]
Starting named:                                             [  OK  ]
[root@support lib]#

Enable Iptables/Firewall Modules for a VPS

Filed Under (Linux Virtuozzo, Virtuozzo) by Milind on 08-01-2012

Default firewall for Linux i.e. iptables is depends upon many kernel modules without which a server can’t be secured properly. Also the firewall configurations will give many errors while configuring it. So, it is required to have proper kernel modules enabled for a Server.

In case of a VPS, Virtually Hosted server which shared resources and kernel of Host server it’s not possible to compile/enable kernel related modules for a VPS from it. So, to run iptables properly a VPS too have proper kernel modules enabled which can be enabled from the host server. Normally a Virtuozzo OR OpenVZ based kernel only support following iptables modules

ipt_MASQUERADE
ipt_helper
ipt_SAME
ipt_REDIRECT
ipt_state
ipt_TCPMSS
ipt_LOG
ipt_TOS
iptable_nat
ipt_length
ipt_tcpmss
iptable_mangle
ipt_limit
ipt_tos
iptable_filter
ipt_helper
ipt_tos
ipt_ttl
ipt_REJECT


ENABLE MODULES ON HOST SERVER

To enable these modules for a VPS you will first have to enable these modules on the host server using command modprobe . So, just copy and paste the following commands on the Shell of HOST SERVER

modprobe ipt_MASQUERADE
modprobe ipt_helper
modprobe ipt_SAME
modprobe ipt_REDIRECT
modprobe ipt_state
modprobe ipt_TCPMSS
modprobe ipt_LOG
modprobe ipt_TOS
modprobe iptable_nat
modprobe ipt_length
modprobe ipt_tcpmss
modprobe iptable_mangle
modprobe ipt_limit
modprobe ipt_tos
modprobe iptable_filter
modprobe ipt_helper
modprobe ipt_tos
modprobe ipt_ttl
modprobe ipt_REJECT


Now make sure that all these modules are enabled on the server using command “lsmod“.

ENABLE MODULES FOR VPS

Now the above mentioned modules can be enabled for a VPS using two ways i.e. by using command OR by adding rules manually.

1) By Command:

Execute following command from the host server to enable all the modules for the VPS

vzctl set VEID --iptables ipt_REJECT --iptables ipt_tos --iptables ipt_TOS --iptables ipt_LOG --iptables ip_conntrack --iptables ipt_limit --iptables ipt_multiport --iptables iptable_filter --iptables iptable_mangle --iptables ipt_TCPMSS --iptables ipt_tcpmss --iptables ipt_ttl --iptables ipt_length --iptables ipt_state --iptables iptable_nat --iptables ip_nat_ftp --save


2) Adding Rules manually:

Open the VPS configuration file which exists at /etc/vz/conf/veid.conf and paste following in the last line of the file.

IPTABLES="iptable_filter iptable_mangle ipt_limit ipt_multiport ipt_tos ipt_TOS ipt_REJECT ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_LOG ipt_length ip_conntrack ip_conntrack_ftp ip_conntrack_irc ipt_conntrack ipt_state ipt_helper iptable_nat ip_nat_ftp ip_nat_irc"


After adding rules reboot the VPS to apply/enable the modules.

HowTo: Remove domain Manually from Plesk

Filed Under (Linux Virtuozzo, Plesk, Plesk For Linux, Plesk For Windows) by Milind on 07-01-2012

While deleting one domain from Plesk it was throwing following error

Error: Connection to the database server has failed because of network problems:

could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket “/tmp/.s.PGSQL.5432″?

When we checked the domain on server (from shell) we have found that all physical Address (/var/www/vhost/domain.com) of the domain has been deleted but still Plesk shows the domain.

Following are the steps to remove the domain from Plesk manually.

1) Connect the server using SSH

2) Login into MySQL Prompt as Plesk admin

[root@server ~]# mysql -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa


3) Delete the DNS Zone of the domain

mysql> delete from dns_zone where name=’domain.com’;
Query OK, 1 row affected (0.09 sec)

mysql> delete from dns_recs where host=’domain.com.’;
Query OK, 8 rows affected (0.03 sec)


You can verify if any records still persists using following commands

mysql> select * from dns_zone where name=’domain.com’;
Empty set (0.00 sec)

mysql> select * from dns_recs where host=’domain.com.’;
Empty set (0.00 sec)


4)
Now delete the Domain from Domains table which will remove it from Plesk Domains List

mysql> delete from domains where name=’domain.com’;
Query OK, 1 row affected (0.06 sec)


Verify it using select Command.

mysql> select * from domains where name=’domain.com’;
Empty set (0.00 sec)

 

NOTE: PLEASE Make Sure To Verify The DOMAIN NAME before you make any changes as it might delete some other domain. Also the changes made are irreversible.

RDP login to VE fails OR Shows Blue Screen

Filed Under (Microsoft Windows, Virtuozzo, Windows Virtuozzo) by Milind on 26-12-2011

After login into a VPS using RDP it stuck on Blue screen (Not BSOD) and doesn’t load next screen or Desktop of the VPS like below given image

BlueRDP 300x203 RDP login to VE fails OR Shows Blue Screen

OR if you get following Error after login to VE by RDP

“You are connected to the remote computer. However, an error occurred while an initial user program was starting, so you are being logged off. Contact the system administrator for assistance.

Such problems occurs due to corrupted or missed C:/Windows/explorer.exe of the VPS or VE.

This problem can be fixed by copying C:/Windows/explorer.exe file of the host server to the VPS. Following are the steps to copy

1) Stop the VPS
#       vzctl stop VEID

2) Mount the VPS
#      vzctl mount VEID

Now we will able to access VPS files from host server in C:/vz/private/VEID/ Directory.

3) Copy “C:/Windows/explorer.exe” from Host server to “C:/vz/private/VEID/Windows/explorer.exe

4) Unmount and start the VPS
#      vzctl umount VEID
#      vzctl start VEID

Please try to login to the VPS now.

Note: Here, VEID will be the VPS ID of the VE which is facing problem.

Remote Desktop Protocol (RDP) not working for a VPS

Filed Under (Windows Virtuozzo) by Milind on 20-12-2011

Sometime it happens that your Customers complains that they are not able to connect their Windows VPS Throug Remote Desktop Protocol i.e. RDP even if the VPS is responding ping requests. The most common reason for this is that the VPS is running out of memory, check the VPS memory using Virtuozzo Power Panel and reboot the VPS if required.

But in some VPS is running fine, domains, FTP and all the services are running fine but still RDP is not connecting; Please check the following are steps which can help to diagnosis the problem.

1) Check Terminal Services are running or not. To check that first login into the VPS using command prompt of the host server and execute command net start “terminal services” and if it show the output given below than the service is already running.

C:\>vzctl enter 99999
Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\WINDOWS\system32>net start "terminal services"
The requested service has already been started.

More help is available by typing NET HELPMSG 2182.

C:\WINDOWS\system32>


2) Check Remote Desktop Port
. By default RDP use Port 3389 to connect the server/machines remotely. You can use command “netstat -aon |findstr :3389″ to see if Port 3389 is responding or not on the VPS.

C:\WINDOWS\system32>netstat -aon |findstr :3389
  TCP    0.0.0.0:3389           0.0.0.0:0              LISTENING       12308

C:\WINDOWS\system32>


If you get the above reply then the VPS is using Default RDP port (:3389) but you get following output that the RDP port has been changed by the VPS administrator

C:\WINDOWS\system32>netstat -aon |findstr :3389
C:\WINDOWS\system32>


To find the exact port you will have to execute the following commands on the command prompt of the VPS.

C:\WINDOWS\system32>tasklist /svc | find "erm"
svchost.exe                 324380 TermService
C:\WINDOWS\system32>netstat -aon | find "324380"
TCP    0.0.0.0:1050           0.0.0.0:0              LISTENING       324380


Here, RDP port has been changed from 3389 to 1050. So, try to connect the RDP using IPADDRESS:PORT

3) Check Firewall Configuration. As we have seen above that if the server is responding to port 3389 or any other port locally (inside the VPS) then there is a possibility that the firewall is blocking the access. Firewall of the VPS can be stopped using Parallel Management Console or using following commands.

C:\WINDOWS\system32>net stop sharedaccess
C:\WINDOWS\system32>net stop ipnat
C:\WINDOWS\system32>net stop policyagent


These Commands will stop the firewall service on your VPS.

4) Check for Virus/Infection. If the VPS is infected with Viruses or Trojans or any other malicious scripts then these script can also block the RDP access for the VPS. You can scan the VPS using Cureit anti-virus which is free and can be downloaded from http://www.freedrweb.com/cureit/.

NOTE: Make sure to mount the VPS (vzctl mount VEID) and then scan the private area of the VPS. If any viruses found by the Anti-virus the best option to get this issue fixed is to create a new VPS and copy the data (You can access the data of infected VPS while it’s mounted).

If everything seems to be fine then I would suggest to contact Parallels OR the Vendor from where you have purchased the License (they will contact Parallels on your behalf) for more help.

FIX:-Container is already locked

Filed Under (Windows Virtuozzo) by Milind on 15-12-2011

Sometime when automated OR Manual Virtuozzo backup process gets stuck OR sometime a VPS stuck while starting up OR stopping during this stage its impossible to make any changes on that VPS. You can stop the VPS or kill the process which is running. Making any updates or trying to restart the VPS shows message “Container CTID is already locked”.

Solution:

In case of Linux this error can be fixed by deleting the lock file located at /vz/lock/CTID.lck but in Windows there is no such file.

Following are the steps to unlock the locked Container

1) vzctl stop CTID –skiplock (try this command twice till it doesn’t show that the container is not running)
This command might throw some ERROR but no need to worry.

2) vzctl start CTID –skiplock
This Command will throw an error if the VPS is stuck while starting or stopping.

3) After the both the above command the status of the VPS will be locked, so you will have to allow sometime to unlock the stuck processes.

4) If the above command doesn’t start the VPS, stop the VPS using –skiplock option again and kill “vzlpl” process from the Task Manager. After that you will able to start the VPS normally.

I have personally tested these steps on few Windows Servers and 90% of time this tweak worked. If it still doesn’t work its better to contact Parallels Support.

</span>

HTTPD doesn’t start After Atmail Installation in Plesk

Filed Under (Linux Tips, Linux Virtuozzo, Plesk, Plesk For Linux) by Milind on 07-11-2011

After installation of Atmail Webmail Client, while restarting Apache it throws following Syntax Error:

[root@server ~]# service httpd start
Starting httpd: httpd: Syntax error on line 210 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.d/zzz_atmail_vhost.conf: Include directory ‘/etc/psa/webmail/atmail/conf.d’ not found [FAILED]


First we will have to check where atmail is installed. We can do that by querying the RPM files using option “rpm -ql

[root@server ~]# rpm -ql psa-atmail-1.02-cos5.build92091210.17 | grep etc
/etc/psa-webmail/atmail
/etc/psa-webmail/atmail/atmail.conf
/etc/psa-webmail/atmail/atmail_vhost.conf
/etc/psa-webmail/atmail/conf.d
/etc/psa-webmail/atmail/create_db.sql.in
/etc/psa-webmail/atmailcom
/etc/psa-webmail/atmailcom/atmailcom_vhost.conf
/etc/psa-webmail/atmailcom/conf.d
[root@server ~]#


The above output shows that the files are created in “/etc/psa-webmail/” directory instead of “/etc/psa/webmail/

[root@server ~]# ls -al /etc/psa-webmail/atmail
total 28
drwxr-xr-x 3 root root 4096 Dec 28 10:37 .
drwxr-xr-x 5 root root 4096 Dec 28 10:37 ..
-rw-r–r– 1 root root 122 Dec 10 11:54 atmail.conf
-rw-r—– 1 root apache 14 Aug 19 2009 .atmail.shadow
-rw-r–r– 1 root root 2932 Dec 10 11:54 atmail_vhost.conf
drwxr-xr-x 2 root root 4096 Dec 10 11:54 conf.d
-rw-r–r– 1 root root 200 Dec 10 11:54 create_db.sql.in
[root@server etc]#


So, copy the file to relevant directory as in the conf file of httpd service

[root@server ~]# cp -a /etc/psa-webmail/atmail /etc/psa/webmail/


After that we were able to start the httpd service successfully.

[root@server etc]# /etc/init.d/httpd restart
Stopping httpd: [FAILED]
Starting httpd: [ OK ]

Follow US

Enter your email address:


I'm listed in Technology

Sponsors

Advertisement

Become Fan

tag cloud