• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • 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.

Issue /etc/cron-daily/50plesk-daily error 1

theWoosh

Basic Pleskian
Hi - I know this has happened many times before, but can't quite figure out the solution...

For a while now I have been getting emails saying that the daily cron job has exited with error 1.
Assuming it is the mysqldump...

When I try and run mysqldump.sh on the command line I get the following:
# /opt/psa/bin/mysqldump.sh
Dump databases: psa mysql horde sitebuilder5 apsc roundcubemail
mysqldump: Got error: 1045: Access denied for user 'admin'@'localhost' (using password: YES) when trying to connect
Failed to dump databases

...but when I do the following:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -u admin mysql
...it logs into Mysql fine and admin has all privileges..

I am also running the:
# /opt/psa/bin/sw-engine-pleskrun /opt/psa/admin/plib/DailyMaintainance/script.php
...to see if this throws up any errors, but this takes an age...

Many Thanks
 
Hi theWoosh,

Assuming it is the mysqldump...
Could you pls. explain WHY you assume that without investigating the root cause? Without any debug - log - entries, which might point to such an assumption?

I am also running the:
# /opt/psa/bin/sw-engine-pleskrun /opt/psa/admin/plib/DailyMaintainance/script.php
...to see if this throws up any errors, but this takes an age...
... and in the end? Did you get any errors/issues/problems in your logs?



Sometimes, it is as well a good idea to change the log - level ( TEMPORARILY! ), to get more informations in Plesk - log - files:

 
Thanks for responding ...almost nothing in /var/log/sw-cp-server/error_log and /var/log/sw-cp-server/sw-engine.log, but there was so much in /usr/local/psa/admin/logs/panel.log that I couldn't really tell - I did set the error level to 4 before running ...
THe reason I thought it might be the mysqldump is that it wouldn't run on the command line without the error mentioned...
 
Hi theWoosh,

the file "mysqldump.sh" is not intended to be used without additional command strings. ;)

but there was so much in /usr/local/psa/admin/logs/panel.log that I couldn't really tell - I did set the error level to 4 before running ...
Well, sorry... but such an answer doesn't lead to possible investigations and people willing to help only could guess what's happening ( or what's NOT happening ). :(
 
...the line in cron.daily just says:
/opt/psa/bin/mysqldump.sh >/dev/null 2>&1
...can't see any arguments...?
 
Hi theWoosh,

your answer still doesn't lead to additional guessings and I could only suggest, that you could consider to change the admin password over the Plesk Control Panel, to see if that solves your issue with the "mysqldump.sh" - script. I can' reproduce your issue on CentOS or Debian, nor on Ubuntu - based systems, sorry.
 
Hi,

...the line in cron.daily just says:
/opt/psa/bin/mysqldump.sh >/dev/null 2>&1
...can't see any arguments...?

I looked inside "mysqldump.sh" script. I see, that arguments to mysqldump are provided via shell' environment variable.
# more ./bin/mysqldump.sh | grep mysqldump
${MYSQL_BIN_D}/mysqldump $mysql_user --quote-names $MYSQLDUMP_OPTIONS --databases $databases

So, you can't exec mysqldump.sh without MYSQLDUMP_OPTIONS otherwise you get error like 'mysqldump: Got error: 1045: Access denied'
 
Back
Top