• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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