• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved accidentally deleted /var/log/* content

bob147

New Pleskian
Hello, I recently run out of free disk space because of automatic backups. Mysqld won't load so I deleted some old log files and website backups, that solved my problem just for about an hour, then the disk got full again because of error.log file was getting 2GB+ size because of php fatal error (my website showed blank fully loaded). I got in a loop because the error log was getting the 2GB size in few minutes after I deleted it and restarted server. Now I can't get into plesk admin web interface.

Here is error I'm getting:

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, '"/var/log/plesk...') #4 /usr/local/psa/admin/plib/PleskException.php(26): Plesk_Log::err('"/var/log/plesk...') #5 /usr/local/psa/admin/plib/PleskException.php(13): report_crash('"/var/log/plesk...', Array, 'Zend_Log_Except...', 500, Object(Zend_Log_Exception)) #6 [internal function]: plesk_exception_handler(Object(Zend_Log_Exception)) #7 {main} thrown (Stream.php:81)

I tried 'plesk repair all -y' but it did not work.

OS CentOS 6.7 final
Plesk 12.5 #50

Should i reinstall the whole system?


Thank you.
 
drwxr-x--- 5 psaadm root 4096 Oct 22 04:13 plesk/
-rw-r----- 1 psaadm root 4408544 Oct 22 05:11 /var/log/plesk/panel.log

Recreate this folders, but there is a lot of other log files what will create errors, I think.
 
Hi bob147,

Should i reinstall the whole system?
Yes - this is far easier and faster, because "accidentally deleted /var/log/* content" will lead to quite a lot of issues on your server - not only to Plesk!

If you don't want to re-install the server, consider to re-install ALL packages, so that you can be sure, that necessary log - files and folders are configured.

Example command:
Code:
mkdir -p /root/temp_reinstall_directory
cd /root/temp_reinstall_directory
yum reinstall *
 
I did make /plesk folder, but httpd can't load too because of missing log.
 
Last edited:
thank you, after the reinstall of all packages missing directories and files were recreated. But I still can't start http,nginx, and few other services and 'plesk repair all -y' is failing on 6 points
'Reconfiguring the Plesk installation ............................ [FAILED]'
I don't know if it's related to deleted logs, there were issues before I deleted the logs.

update: httpd error log says 'RSA server certificate CommonName (CN) `Parallels Panel' does NOT match server name!?'
 
Last edited:
Hi bob147,

pls. be informed, that some service create their logs on each start/restart, so consider to restart ALL services, after you re-installed them.

If you experience any issues, consider to investigate your logs ( if created ), why a service couldn't be started/restarted and check as well the status of the depending service, to be sure, that it is really running.

For CentOS 6.x based systems, not using systemd:

service SERVICE-NAME start ( or restart )​

check the services:

service --status-all

service SERVICE-NAME status

List all installed services:

chkconfig --list

Turn on/off a service:

chkconfig SERVICE-NAME on
chkconfig SERVICE-NAME off


Each repair - process will create as well a log - file, which you definetly should inspect, in order to solve issues. If you need help here, it is essential to POST the corresponding repair - log, because we can't guess possible issues on your server.



Additional informations:


Sometimes, it is as well a good idea to change the log - level, to get more informations in psa - log - files:



 
thank you I went trough all error logs and the problems in my case were missing log diretories, even after the reinstallation of all packages

/var/log/nginx
/var/log/sw-cp-server
 
It may be easier to use "logrotate -f" (while logged in as root or use sudo) to have it create log files that are found in its rotation configs.
Then restart the server and see if it just begins with the new empty log files.

From the man file:
-f, --force
Tells logrotate to force the rotation, even if it doesn’t think this is necessary.
Sometimes this is useful after adding new entries to a logrotate config file, or
if old log files have been removed by hand, as the new files will be created, and logging will continue correctly.
 
It may be easier to use "logrotate -f" (while logged in as root or use sudo) to have it create log files that are found in its rotation configs.
Sorry, but "logrotate" itself doesn't create folders, it just tries to write new log - files after the rotation ( to the defined destinations in the depending configuration files ). :(
 
Sorry, but "logrotate" itself doesn't create folders, it just tries to write new log - files after the rotation ( to the defined destinations in the depending configuration files ). :(
Oh I see. If it were me, I'd dig through all the logrotate configs and manually create the folders I find listed there — before I tried reinstalling my entire system anyway. Surely all the folders are listed in them, or you'd have files that never got rotated. Anyway I see this thread is already "resolved" but I just thought I'd contribute another possible solution.
 
Back
Top