Virtuozzo : How to find out the IP address of master node or unregister slave node from Virtuozzo group without access to master node.

[How to] How to find out the IP address of master node or unregister slave node from Virtuozzo group without access to master node.

It is not possible to login to PIM, the following error is displayed:

The Node you are trying to log in to is a Slave Node of a Virtuozzo Group. Only the address of the Master Node of this Group can be used for logging in.

The IP of master node is unknown or it is not possible to unregister the slave node.

The IP address of master node can be found out using vzagroup utility, e.g. on Virtuozzo for Linux node:

# /opt/vzagent/bin/vzagroup list

The same utility can be used to force unregistering slave node from group – “vzagroup removeFromGroup” command should be used in this case.
Additional information

Other options are available from built-in help, which is shown when utility is invoked with no parameters:

# /opt/vzagent/bin/vzagroup

  • Usage: vzagroup

    Master node commands:

    vzagroup addSlave [–force] USER[:PASSWORD]@ADDRESS

    vzagroup removeSlave USER[:PASSWORD]@ADDRESS

    vzagroup list

  • Note: credentials should be specified to connect to slave

    Slave or single node commands:

    vzagroup addToGroup USER[:PASSWORD]@ADDRESS

    vzagroup removeFromGroup
    Note: master node credentials should be specified

    Is Internet Explorer 8.0 compatible with Parallels Virtuozzo Containers for Windows?

    Is Internet Explorer 8.0 compatible with Parallels Virtuozzo Containers for Windows?

    Release notes
    Parallels Virtuozzo Containers 3.5.1 for Windows:

    Internet Explorer 8 is not supported by Virtuozzo 3.5.1 for Windows. It is not allowed to install it on hardware node or inside containers. Installed IE8 inside containers can lead to failure on containers start.

    Parallels Virtuozzo Containers 4.0 for Windows:

    Internet Explorer 8 is supported by Parallels Virtuozzo Containers 4.0 for Windows starting from VZU400027 update. Internet Explorer 8 is installed on the host itself and upgrades all existing Containers on first start up.

    Parallels Virtuozzo Containers 4.5 for Windows:

    IE8 is supported by PVC 4.5 for both Windows 2003 and Windows 2008 server platforms.

    How do I repair/rebuild all mail configuration files and restore settings for all mailboxes?

    Resolution
    This can be done with Plesk mchk utility:

    # /usr/local/psa/admin/sbin/mchk --help
    Synopsis:
    mchk [OPTION]
    --without-spam - restore all settings except for SpamAssassin configuration
    --with-spam - restore all settings
    --spam-only - restore only SpamAssassin settings

    This utility rebuilds in line with Plesk database Qmail control files in the /var/qmail/control, /var/qmail/users directories and mail users’ settings. Also, it sets proper ownership/permissions for all mailboxes (/var/qmail/mailnames/*).

    Example:
    # /usr/local/psa/admin/sbin/mchk --with-spam

    I get the error: “Could not connect to SQL database. Too many connections”.

    Symptoms
    Sometimes I get the “Too many connections” error in Plesk CP or when open a site in my browser:

    Unable to connect to database: Too many connections

    Cause
    This error means that the limit of simultaneous MySQL connection to mysql server is reached and new connections to the server cannot be established at this time.

    Resolution
    There are two ways to solve this issue. The first one is increase the connection limit and the second, find what is the reason of “too many connection” error and try to lower MySQL server usage.

    MySQL server state can be checked using ‘mysqladmin’ utility. For example to find out the number of current connections to the server use:

    # mysqladmin -uadmin -p`cat /etc/psa/.psa.shadow` extended-status | grep Max_used_connections
    | Max_used_connections | 11 |

    Current connections limit settings can be found with:

    # mysqladmin -uadmin -p`cat /etc/psa/.psa.shadow ` variables | grep 'max.*connections'
    | max_connections | 100 |
    | max_user_connections | 0

    In the example above, maximum number of connections to the server (max_connections) is set to 100. And maximum number of connections per user (max_user_connections) to zero, that means unlimited. There are default MySQL values. They can be redefined in /etc/my.cnf, for example:

    [mysqld]
    set-variable=max_connections=150
    set-variable=max_user_connections=20

    Restart MySQL after my.cnf is modified.

    Note, if you set connections limit to very high value (more than 300) it may affect the server performance. It is better to find out the reason of the high MySQL server usage. You may check what users/requests slow mysql and take all curent connections, for example with the command:

    # mysqladmin -uadmin -p`cat /etc/psa/.psa.shadow` processlist

    Parallels Plesk Panel reports that updates are available however all components are should updated on autoinstaller page

    Symptoms
    When I log to Parallels Plesk Panel it tells me that I have updates.
    But when I check updates on page Home -> Updates -> Parallels Plesk Panel 9.2.x everything looks updated.

    What causes the problem?
    Cause
    This issue is caused by the fact that there are still some components of Parallels Plesk Panel that need to be upgraded. But these components not listed on the Updater page in Parallels Plesk Panel.

    Resolution
    The problem will be fixed in future updates of Parallels Plesk Panel. As s solution for now it is recommended to upgrade the older component manually.

    Run the following command to get list of Plesk components ready for updating:

    ~# /usr/local/psa/admin/sbin/autoinstaller --select-release-id PLESK_9_2_0 --show-components 2>&1 | grep upgrade
    qmail [upgrade] - Qmail mailserver
    ~#

    Put your own release ID instead of PLESK_9_2_0.

    Use the following command to install the component:

    ~# /usr/local/psa/admin/sbin/autoinstaller --select-release-latest --install-component qmail

    Message cannot be delivered and error “Unable to stat …executable’ or it is not link: No such file or directory” in maillog

    Symptoms
    For some account messages cannot be delivered and the following errors are shown in maillog:

    /usr/local/psa/var/log/maillog
    --->8---
    Jun 10 03:53:42 vps310 postfix-local[21983]: Unable to stat entry '/usr/local/psa/handlers/info/10-spam-0gemCa/executable' or it is not link: No such file or directory
    ---8<---

    Utility mchk does not fix the problem.

    Cause
    The error is caused by the fact that configuration of mail handler 10-spam-0gemCa is broken.
    According to configuration in file system mail account [email protected] has spamfilter enabled:

    ~# find /usr/local/psa/handlers/ -name '10-spam-0gemCa'
    /usr/local/psa/handlers/before-local/recipient/[email protected]/10-spam-0gemCa
    ~#

    During message processing mail service is looking for executable binary, however it is missing:

    ~# ls -l /usr/local/psa/handlers/info/10-spam-0gemCa/executable
    ls: /usr/local/psa/handlers/info/10-spam-3HB5Xe/executable: No such file or directory
    ~#

    Resolution
    It is advised to remove all mail handlers and run utility mchk to restore configuration according to Plesk database.
    Stop services qmail, postfix, courier-imap and xinetd, backup old handlers and remove them:

    ~# /etc/init.d/postfix stop
    ~# /etc/init.d/qmail stop
    ~# /etc/init.d/courier-imap stop
    ~# /etc/init.d/xinetd stop

    ~# mkdir /root/temp
    ~# cp -a /usr/local/psa/handlers/before-local/recipient /root/temp/
    ~# cp -a /usr/local/psa/handlers/info /root/temp/
    ~# rm -rf /usr/local/psa/handlers/before-local/recipient/*
    ~# rm -rf /usr/local/psa/handlers/info/*

    Then run utility mchk to recreate mail handlers. The output may look like the following:

    ~# /usr/local/psa/admin/sbin/mchk --with-spam
    ==> Checking for: mail_spam_restore... ok
    ==> Checking for: mailsrv_conf_init... ok
    ==> Checking for: mail_mailbox_restore... ok
    ==> Checking for: mailsrv_entities_dump... ok
    ==> Checking for: mail_admin_aliases... ok
    ==> Checking for: mail_auth_dump... ok
    ==> Checking for: mailman_lists_dump... ok
    ==> Checking for: mail_responder_restore... ok
    ==> Checking for: mail_drweb_restore... ok
    ==> Checking for: mail_kav_restore... not exsists
    ==> Checking for: mail_spf_restore... ok
    ==> Checking for: mail_dk_restore... ok
    ==> Checking for: mail_grey_restore... ok
    ~#

    IMPORTANT: custom mail handlers will be lost after the reconfiguration. They need to be recreated.

    Start services qmail, postfix, courier-imap and xinetd after the reconfiguration.
    Additional information
    The same problem may affect DrWeb Antivirus. You might get the following Antivirus filter report in bounce message:

    --- Dr.Web report ---
    Dr.Web detailed report:
    The filter cannot connect to the DrWEB daemon

    --- Dr.Web report ---

    This meant that the message could not be delivered because execution of DrWeb mail handler failed.
    Additional information
    Parallels Plesk Panel 9.x provides ability to configure and put custom mail handlers: PPP 9.2 for Linux/Unix:: Modules API Reference
    These handlers do not correspond to records in Plesk database, so mchk does not reconfigure mail handlers automatically.

    Currently it is advised to recreate mail handlers according to the instructions above.

    cPanel User Shell Access : fork: Resource temporarily unavailable

    The cPanel user shell access gives error all of a sudden :

    root@server [~]# su - user
    -bash: fork: Resource temporarily unavailable

    The culprit seems to be cPanel and its “Shell Fork Bomb Protection”. Logging into WHM >> Security >> Security Center >> “Shell Fork Bomb Protection” and clicking “Disable Protection” resolves the issue.

    Shell Fork bomb Protection will prevent users with terminal access (ssh/telnet) from using up the server’s resources and possibly crashing the server.

    PhpMyAdmin Stuck at Login screen with no errors !

    This is a possible issue when the path to save php_session is not correctly set :

    The directory for storing session does not exists or php do not have sufficient rights to write to it.

    To define the php_session directory simply add the following line to the php.ini :

    session.save_path=”/tmp/php_session/”

    And give write rights to the http server.

    usually, the http server run as user daemon in group daemon. If it is the case, the following commands will make it :

    chown -R :daemon /tmp/php_session

    chmod -R g+wr /tmp/php_session

    restart http server.

    Plesk 9.X Upgrades : Table ‘mysql.procs_priv’ doesn’t exist

    Plesk Upgrades to Plesk 9.X may result in MySQL errors while adding new Database user under Plesk.

    Error under Plesk :
    Table ‘mysql.procs_priv’ doesn’t exist

    You can also check the same error under command line :

    mysql> flush privileges;
    ERROR 1146 (42S02): Table ‘mysql.procs_priv’ doesn’t exist
    mysql>

    This can be fixed using below command. This will try to repair/ recreate the tables having issues.

    cat /usr/share/mysql/mysql_fix_privilege_tables.sql | mysql --no-defaults --force --user=admin -p --host=localhost --database=mysql

    Note: Before executing this command, make sure that you have taken the full backup of MySQL.

    Hope this helps 🙂

    cPanel : Horde login error !

    Horde login error

    Horde Login shows below error :

    Warning: Unknown: write failed: Disk quota exceeded (122) in Unknown on line 0

    Warning: Unknown: Failed to write session data (files). Please verify that the current setting of
    session.save_path is correct (/var/cpanel/userhomes/cpanelhorde/sessions) in Unknown on line 0

    Then try this cPanel script :

    /scripts/autorepair phpapps_owner_fix

    The above cPanel script will reset all the quotas for the cPanel users.