Debian Error Error Running Shared Postrotate Script For /var/log/mysql.log
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of Conduct Ubuntu Wiki Community Wiki Other Support Launchpad Answers Ubuntu IRC Support AskUbuntu Official Documentation User Documentation Social Media Facebook Twitter Useful Links Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web Upd8: Ubuntu OMG! Ubuntu Ubuntu Insights Planet Ubuntu Activity Page Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [SOLVED] Cron job error (MySQL) Having an Issue With Posting ? Do you want to help us debug the posting issues ? < is the place to report it, thanks ! Results 1 to 3 of 3 Thread: Cron job error (MySQL) Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode March 1st, 2010 #1 dwp0980 View Profile View Forum Posts Private Message 5 Cups of Ubuntu Join Date Jan 2008 Beans 22 Cron job error (MySQL) Hello, I'm hoping someone can point me in the right direction regarding a cron error mesage that I have received (via email). I'm not sure where to start to try and find out what has gone wrong and why. Below is the error text received from cron. Any help gratefully received. Code: /etc/cron.daily/logrotate: error: error running shared postrotate script for '/var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log ' run-parts: /etc/cron.daily/logrotate exited with return code 1 Adv Reply March 2nd, 2010 #2 kiranmurari View Profile View Forum Posts Private Message A Carafe of Ubuntu Join Date Nov 2009 Location Chennai, India Beans 116 DistroUbuntu 9.10 Karmic Koala Re: Cron job error (MySQL) Hi, The following link might be helpful. http://www.lornajane.net/posts/2008/...rror-on-Ubuntu Regards, Kiran Murari Open Thoughts | CS
have one accepted answer. Are you sure you want to replace the current answer with this one? Yes, I'm sure. Changed your mind? You previously marked this answer as accepted. Are you sure you want to unaccept it? Yes, I'm sure. Sign Up Log In submit Tutorials Questions Projects Meetups Main Site logo-horizontal DigitalOcean Community Menu Tutorials Questions Projects Meetups Main Site Sign Up Log In submit View All Results By: desiredpersona Subscribe Subscribed Share 0 Got an email from my server about a failed Cron Job October 30, 2015 2.4k views LEMP Nginx https://ubuntuforums.org/showthread.php?t=1418987 Email Logging Ubuntu I have a LEMP server running Ubuntu 14.04 LTS. (Nginx 1.8) I got this email about a failed cron job. Anyone have a solution? Subject Cron test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ) Body /etc/cron.daily/logrotate: error: error running shared postrotate script for '/var/log/nginx/*.log ' run-parts: /etc/cron.daily/logrotate exited with return code 1 The only edit ive made lately https://www.digitalocean.com/community/questions/got-an-email-from-my-server-about-a-failed-cron-job was open /etc/logrotate.conf I uncommented the following line so my log files will be compressed # uncomment this if you want your log files compressed compress Donno if that would have caused it? 2 comments 1 franklinkim December 21, 2015 This seems to be a bug in the postrotate script in /etc/logrotate.d/nginx as reported here. Try: ... # invoke-rc.d nginx rotate >/dev/null 2>&1 service nginx reload >/dev/null 2>&1 ... 0 desiredpersona December 22, 2015 @franklinkim Thanks Kevin. That solved the issue Log In to Comment Leave a Comment Add comments here to get more clarity or context around a question. To answer a question, use the “Answer” field below. Log In to Comment 1 Answer 1 jtittle November 2, 2015 @desiredpersona - Take a look at /etc/logrotate.d/nginx, does your file look like: /var/log/nginx/*.log { weekly missingok rotate 52 compress delaycompress notifempty create 0640 www-data adm sharedscripts prerotate if [ -d /etc/logrotate.d/httpd-prerotate ]; then \ run-parts /etc/logrotate.d/httpd-prerotate; \ fi \ endscript postrotate invoke-rc.d nginx rotate >/dev/null 2>&1 endscript } ....if so, try swapping out: invoke-rc.d nginx rotate >/dev/null 2>&1 ....with: nginx -s reload If that doesn't work, try swapping it out for: service nginx rotate I've
error (/etc/cron.daily/logrotate) 2016-03-302016-03-30 Nick RusslerAfter migrating my database to a new server running Ubuntu 14.04.4 LTS i received an email with the following content:SubjectCron test -x /usr/sbin/anacron || ( cd / && run-parts -report https://www.whitebyte.info/general/how-to-fix-logrotate-cron-job-error-etccron-dailylogrotate /etc/cron.daily )Body /etc/cron.daily/logrotate: error: error running shared postrotate script for ‘/var/log/mysql.log /var/log/mysql/mysql.log /var/log/mysql/mysql-slow.log /var/log/mysql/error.log ‘ run-parts: /etc/cron.daily/logrotate exited with return code 1The reason why i was getting this https://forum.ubuntuusers.de/topic/error-error-running-shared-postrotate-script-f/ error was because i imported my old mysql tables, including the users. This particular cron job uses a mysql user debian-sys-maint to flush the logs, but i changed debian error the password by importing all of my old tables.You can fix this by creating the user with the correct password which can be found in the /etc/mysql/debian.cnf file: # Automatically generated for Debian scripts. DO NOT TOUCH! [client] host = localhost user = debian-sys-maint password = xxxxxxxxxxxxxxxx socket = /var/run/mysqld/mysqld.sock [mysql_upgrade] host = localhost user = debian error error debian-sys-maint password = xxxxxxxxxxxxxxxx socket = /var/run/mysqld/mysqld.sock basedir = /usrTake the password and fix the mysql user in the mysql console:1 2 GRANT RELOAD, SHUTDOWN, PROCESS, SHOW DATABASES, SUPER, LOCK TABLES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'xxxxxxxxxxxxxxxx'; FLUSH PRIVILEGES;You can check if it worked by executing:1 mysqladmin --defaults-file=/etc/mysql/debian.cnf pingIt seems that sometimes the password found in /etc/mysql/debian.cnf isn't hashed, in my case it was. If the above snippet did not work try1 2 GRANT RELOAD, SHUTDOWN, PROCESS, SHOW DATABASES, SUPER, LOCK TABLES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY PASSWORD 'xxxxxxxxxxxxxxxx'; FLUSH PRIVILEGES;Thanks to Lorna Jane Mitchell post on this and the commentators.No related posts. General. permalink.Post navigation How to get random unique integers in a range with JavaPHP snippet to filter AirBnB Not available events and fix the end date One thought on “How to fix logrotate cron job error (/etc/cron.daily/logrotate)” John Chew says: 2016-06-16 at 15:30 Very helpful, thank you!ReplyLeave a Reply Cancel replyYour email address will not be published. Required fields are marked *C
nur hier Ungelöste Themen nur hier 24 Stunden nur hier 12 Stunden nur hier 6 Stunden nur hier Alle Foren als gelesen markieren Forum Fortgeschrittene Themen Serverdienste und Dateifreigaben im Netzwerk error: error running shared postrotate script for /var/log/mysql.log error: error running shared postrotate script for /var/log/mysql.log « Vorherige, 1, Nächste » Status: Ungelöst | Ubuntu-Version: Server 16.04 (Xenial Xerus) Antworten | Pfaelzerchen Anmeldungsdatum:25. Juni 2006 Beiträge: 8 Wohnort: Trier Zitieren 15. Juni 2016 20:56 Ich habe seit einiger Zeit ein Problem mit der Logrotation des MySQL-Servers. Jeden Tag erhalte ich eine Email: Betreff: Cron test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )/etc/cron.daily/logrotate:error: error running shared postrotate script for '/var/log/mysql.log /var/log/mysql/*log 'run-parts: /etc/cron.daily/logrotate exited with return code 1 Im Internet gibt es dazu sehr viele Treffer, die darauf hinweisen, dass das Passwort des debian-sys-maint Users unter MySQL stimmen muss. Ich habe die entsprechenden Hinweise geprüft und sicherheitshalber auch das Passwort entsprechend /etc/mysql/debian.cnf nochmal neu gesetzt. Das war allerdings wirkungslos.Ich kann mich mit den Zugangsdaten als debian-sys-maint mittels mysql anmelden und dort auch "FLUSH LOGS;" fehlerfrei ausführen.Auch einsudo /usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" flush-logs funktioniert ohne Fehler. Trotzdem erhalte ich täglich obige Fehlermeldung. sudo sudo /usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" ping liefert ebenfalls ein "mysqld is alive".Hat noch jemand einen Rat für mich? sebix Moderator Anmeldungsdatum:14. April 2009 Beiträge: 1196 Zitieren 15. Juni 2016 22:43 Wie ist denn das postrotate-commando definiert? Die logrotate config fuer MySQL findest du wahrscheinlich unter /etc/logrotate.d/mysql