Plesk fails to open: cannot be opened with mode "a"

Created:

2016-11-16 13:13:08 UTC

Modified:

2017-08-16 16:42:36 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Plesk fails to open: cannot be opened with mode "a"

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 10.x for Linux
  • Plesk 11.x for Linux
  • Plesk 12.0 for Linux

Symptoms

Plesk upgrade failed, an attempt to open Plesk fails with 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

Or with such error:

    ERROR: Uncaught exception 'Zend_Log_Exception' with message '"/usr/local/psa/admin/logs/panel.log" cannot be opened with mode "a"' in /usr/local/psa/admin/plib/Zend/Log/Writer/Stream.php:81

Or with following error:

ERROR: Uncaught exception 'Zend_Log_Exception' with message '"/var/log/plesk/panel.log" cannot be opened with mode "a"' in /usr/local/psa/admin/externals/Zend/Log/Writer/Stream.php:81 Stack trace: #0 /usr/local/psa/admin/plib/Plesk/Log.php(69): Zend_Log_Writer_Stream->__construct('/var/log/plesk/...') #1 /usr/local/psa/admin/plib/Plesk/Log.php(370): Plesk_Log::init() #2 /usr/local/psa/admin/plib/Plesk/Log.php(262): Plesk_Log::get() #3 /usr/local/psa/admin/plib/Plesk/Log.php(168): Plesk_Log::log('panel', 3, 'Unable to conne...') #4 /usr/local/psa/admin/plib/PleskException.php(26): Plesk_Log::err('Unable to conne...') #5 /usr/local/psa/admin/plib/PleskException.php(10): report_crash('Unable to conne...', Array, 'PleskDBExceptio...', 500, Object(PleskDBException)) #6 [internal function]: plesk_exception_handler(Object(PleskDBException)) #7 {main} thrown (Stream.php:81)

Cause

Owner for Plesk log file /usr/local/psa/admin/logs/panel.log is not correct.

Resolution

For Plesk version < 12:

Check permissions for /usr/local/psa/admin/logs/panel.log , they should look as below:

    # ls -la /usr/local/psa/admin/logs/panel.log
-rw-r----- 1 psaadm root 67727 Jan 17 02:30 /usr/local/psa/admin/logs/panel.log

If you see that owner is root as below:

    # ls -la /usr/local/psa/admin/logs/panel.log
-rw-r----- 1 root root 67727 Jan 17 02:30 /usr/local/psa/admin/logs/panel.log

Change permissions with chown command:

    # chown psaadm:root /usr/local/psa/admin/logs/panel.log

Also, sometimes issue may cause due to incorrect ownership for directory /usr/local/psa/admin/logs/ , they should look as below :

# ls -ld  /usr/local/psa/admin/logs/
drwxr-x--- 2 psaadm root 4096 Mar 3 10:00 /usr/local/psa/admin/logs/

For Plesk 12 and above:

Move panel.log to another place, restart  sw-engine and sw-cp-server services:

# mv /var/log/plesk/panel.log /var/log/plesk/panel.log.bk
# service sw-engine restart
# service sw-cp-server restart
Have more questions? Submit a request
Please sign in to leave a comment.