How to set new plesk password through CLI

To set new plesk password on through command line, use the following command.

# /usr/local/psa/bin/init_conf -u -passwd <new_password>

How to recover plesk password on CLI

To recover plesk password on command line, use the following command.

# /usr/local/psa/bin/admin –show-password

alarm level changed

Sometimes, you may get flooded with the email alerts like

alarm level changed.

This is an alert sent by plesk as a result of low values set for the Health Monitor.

To resolve the issue, you can download the Health Monitor configuration file in .xml format on your local PC and edit the values as below.

<service name=”Web” monitor=”true”>

<alarm level=”red” threshold=”25″ type=”percent”/>

<alarm level=”yellow” threshold=”20″ type=”percent”/>

</service>

 

and change it as per the limits you want to set.

 

<service name=”Web” monitor=”true”>

<alarm level=”red” threshold=”60″ type=”percent”/>

<alarm level=”yellow” threshold=”50″ type=”percent”/>

</service>

Save it and re-upload it to the server.

Or from command line, you will have to edit the following file.

# /usr/local/psa/var/custom-health-config.xml

Edit the values, save it and check the Health Monitor in plesk, it should be fine now.

Unable to load object of type IPAddress with id=1: Table->select() failed: no such row in the table

While adding a new domain or add an IP address to a client you may get the following error.

ERROR: PleskFatalException

Favorites

Visited Pages

Unable to load object of type IPAddress with id=1: Table->select() failed: no such row in the table

0: common_func.php3:3159

objectMakerEx(string ‘IPAddress’, integer ‘1’)

1: IPPoolManager.php:968

IPPoolManager::toString(integer ‘1’)

2: indicator-ip.php:22

plesk__indicator_ip->renderHtml()

3: IndicatorUIPointer.php:13

IndicatorUIPointer->accessItem(string ‘INDICATOR’, NULL null)

4: UIPointer.php:596

UIPointer->access(string ‘INDICATOR’)

5: DashboardElement.php:1582

DashboardElement_indicator->renderHtml(object of type UserAdmin, NULL null)

6: DashboardElement.php:680

DashboardElement->renderHtml_indicators(array, object of type UserAdmin, NULL null)

7: DashboardElement.php:634

DashboardElement->renderHtml_common(array, object of type UserAdmin, NULL null)

8: DashboardElement.php:991

DashboardElement_top->renderHtml(object of type UserAdmin, NULL null)

This is because plesk tries to check the IP which is not in the IP Address Pool or which is not removed properly or unknown IP. To resolve the issue, you will have to find that IP and remove it from the server.

# mysql -uadmin -p'cat /etc/psa/.psa.shadow' -Dpsa

You will see the list of id numbers in the first column followed by the addresses in the second column.

Perform the modification of the component_id table as,

mysql> select id,ip_address from IP_Addresses;
 +----+----------------+
 | id | ip_address |
 +----+----------------+
 | 6 | 192.168.0.2 |
 | 7 | 192.168.0.3 |
 | 8 | 192.168.0.4 |

In above output the IDs are 6,7 and 8. Its supposed to be 1,2 and 3. To change the IDs

mysql> update IP_Addresses set id=1 where ip_address='192.168.0.2';
 Query OK, 1 row affected (0.01 sec)
 Rows matched: 1 Changed: 1 Warnings: 0
 mysql> update IP_Addresses set id=2 where ip_address='192.168.0.3';
 Query OK, 1 row affected (0.00 sec)
 Rows matched: 1 Changed: 1 Warnings: 0
 mysql> update IP_Addresses set id=3 where ip_address='192.168.0.4';
 Query OK, 1 row affected (0.01 sec)
 Rows matched: 1 Changed: 1 Warnings: 0
 Confirm the ID changes by
 mysql> select id,ip_address from IP_Addresses;
 +----+----------------+
 | id | ip_address |
 +----+----------------+
 | 1 | 192.168.0.2 |
 | 2 | 192.168.0.3 |
 | 3 | 192.168.0.4 |

now, check the plesk, it should be working fine. 🙂

Plesk control panel login error

While accessing the plesk control panel, you may get the following error;

 ERROR: Zend_Log_Exception

“/usr/local/psa/admin/logs/panel.log” cannot be opened with mode “a”

0: Stream.php:66

Zend_Log_Writer_Stream->__construct(string ‘/usr/local/psa/admin/logs/panel.log’)

1: Abstract.php:84

CommonPanel_Application_Abstract->_initLog()

2: Abstract.php:31

CommonPanel_Application_Abstract->run()

3: Abstract.php:19

CommonPanel_Application_Abstract::init()

4: auth.php3:137

To resolve the issue, follow the steps provided below.

[[email protected] ~]# rpm -q psa
psa-10.0.1-cos5.build109101029.17
[[email protected] ~]# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e"select * from misc where param='version'"
+---------+-------+
| param | val |
+---------+-------+
| version | 01090 |
+---------+-------+
[[email protected] ~]# cat /usr/local/psa/version
10.0.1 CentOS 5 109101029.17
[[email protected] ~]# /usr/local/psa/bootstrapper/pp10.9.0-bootstrapper/bootstrapper.sh repair
**** Product repair started.
===> Checking for previous installation ... found.
Create user 'psaadm' and group 'psaadm'
Checking for the group 'psaadm'...
Group 'psaadm' already exists
..................................
..........................................
Congratulations!
All stages of the upgrade were successful.
psa is now running on your system.
To complete the system configuration process, please proceed to URL:
https://server.hostname.com:8443/ or
https://xxx.xxx.xx.xxx:8443/
Use 'admin' and '<YOUR ADMIN PASSWORD>' as login name and password.
Further, use the following commands to start and stop the system:
/etc/init.d/psa start and
/etc/init.d/psa stop respectively.
===> Removing temporary database backup file /var/lib/psa/dumps/mysql.preupgrade.dump.gz
**** Product repair completed successfully.

You should be able to get the login prompt now.

Connection established, waiting for welcome message

In plesk, you may face the following error while connecting to FTP server.

Status: Waiting to retry…

Status: Connecting to xxx.xxx.xxx.xxx:21…

Status: Connection established, waiting for welcome message…

Error: Could not connect to server

# vi /etc/proftpd.conf

and change the line

ServerType standalone

to

ServerType inetd

save the file and restart the xinetd service.

You are done!

Plesk default config and logs files

The exact value of path variables can be known from /etc/psa/psa.conf file on Parallels Plesk Panel server. Below is example of /etc/psa/psa.conf file:

# Plesk tree

PRODUCT_ROOT_D /usr/local/psa

# Directory of SysV-like Plesk initscripts

PRODUCT_RC_D /etc/init.d

# Directory for config files

PRODUCT_ETC_D /usr/local/psa/etc

# Virtual hosts directory

HTTPD_VHOSTS_D /var/www/vhosts

# Apache configuration files directory

HTTPD_CONF_D /etc/httpd/conf

# Apache include files directory

HTTPD_INCLUDE_D /etc/httpd/conf.d

# Apache binary files directory

HTTPD_BIN_D /usr/bin

#Apache log files directory

HTTPD_LOG_D /var/log/httpd

#apache startup script

HTTPD_SERVICE httpd

# Qmail directory

QMAIL_ROOT_D /var/qmail

# Location of qmail maildirs

QMAIL_MAILNAMES_D /var/qmail/mailnames

# Path to rblsmtpd

RBLSMTPD /usr/sbin/rblsmtpd

# Courier-IMAP

COURIER_IMAP_ROOT_D /

# Proftpd

FTPD_CONF /etc/proftpd.conf

FTPD_CONF_INC /etc/proftpd.include

FTPD_BIN_D /usr/bin

FTPD_VAR_D /var/run/proftpd

FTPD_SCOREBOARD /var/run/proftpd/scoreboard

# Bind

NAMED_RUN_ROOT_D /var/named/run-root

# Webalizer

WEB_STAT /usr/bin/webalizer

# Logrotate

LOGROTATE /usr/local/psa/logrotate/sbin/logrotate

# MySQL

MYSQL_VAR_D /var/lib/mysql

MYSQL_BIN_D /usr/bin

# PostgreSQL

PGSQL_DATA_D /var/lib/pgsql/data

PGSQL_BIN_D /usr/bin

# Backups directory

DUMP_D /var/lib/psa/dumps

# Mailman directories

MAILMAN_ROOT_D /usr/lib/mailman

MAILMAN_VAR_D /var/lib/mailman

# Python binary

PYTHON_BIN /usr/bin/python2.4

# Tomcat root directory

CATALINA_HOME /usr/share/tomcat5

# DrWeb

DRWEB_ROOT_D /opt/drweb

DRWEB_ETC_D /etc/drweb

# GnuPG binary

GPG_BIN /usr/bin/gpg

# Tar binary

TAR_BIN /bin/tar

# Curl certificates

CURL_CA_BUNDLE_FILE /usr/share/curl/curl-ca-bundle.crt

# AWStats

AWSTATS_ETC_D /etc/awstats

AWSTATS_BIN_D /var/www/cgi-bin/awstats

AWSTATS_TOOLS_D /usr/share/awstats

AWSTATS_DOC_D /var/www/html/awstats

# openssl binary

OPENSSL_BIN /usr/bin/openssl

LIB_SSL_PATH /lib/libssl.so.5

LIB_CRYPTO_PATH /lib/libcrypto.so.5

CLIENT_PHP_BIN /usr/local/psa/bin/php-cli

Source