[opensuse] error logrotate mariadb on 42.3
Hello OpenSUSE users, since recently upgrading from 42.2 to 42.3 I do receive an error with logrotate on the mariadb config. 2018-03-14T00:00:01.845385+01:00 cx20-2 logrotate[22165]: error: 'Access denied for user 'root'@'localhost' (using password: NO)' 2018-03-14T00:00:01.846915+01:00 cx20-2 logrotate[22165]: the root acount is protected by password. 2018-03-14T00:00:01.847363+01:00 cx20-2 logrotate[22165]: See comments in /etc/logrotate.d/mariadb on how to fix this 2018-03-14T00:00:01.849623+01:00 cx20-2 logrotate[22165]: error: error running non-shared postrotate script for /var/log/mysql/mysqld.log of '/var/log/mysql/mysqld.log ' yes, I did create the file /root/.my.cnf with read only permissions 0600 for root only [mysqladmin] password = mysecretpassword user = root but it doesn't help ;( If I login via CLI all is fine. First I try without password which fails. Next with password and all is fine ;) cx20-2:~ # mysql -u root -h localhost ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) cx20-2:~ # mysql -u root -h localhost -p mysql Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 6685 Server version: 10.0.33-MariaDB SLE 12 SP1 package Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [mysql]> quit; Any idea on how to fix / debug this issue? Perhaps someone did have a similar experience while upgrading from 42.2 to 42.3? Thanks & greetings Becki -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-03-14 09:58, Admin Beckspaced wrote:
Hello OpenSUSE users,
since recently upgrading from 42.2 to 42.3 I do receive an error with logrotate on the mariadb config.
2018-03-14T00:00:01.845385+01:00 cx20-2 logrotate[22165]: error: 'Access denied for user 'root'@'localhost' (using password: NO)' 2018-03-14T00:00:01.846915+01:00 cx20-2 logrotate[22165]: the root acount is protected by password. 2018-03-14T00:00:01.847363+01:00 cx20-2 logrotate[22165]: See comments in /etc/logrotate.d/mariadb on how to fix this 2018-03-14T00:00:01.849623+01:00 cx20-2 logrotate[22165]: error: error running non-shared postrotate script for /var/log/mysql/mysqld.log of '/var/log/mysql/mysqld.log '
Same here: <3.6> 2018-03-04 00:00:01 Telcontar logrotate 13465 - - #007/usr/bin/mysqladmin: connect to server at 'localhost' failed <3.6> 2018-03-04 00:00:01 Telcontar logrotate 13465 - - error: 'Access denied for user 'root'@'localhost' (using password: NO)' <3.6> 2018-03-04 00:00:01 Telcontar logrotate 13465 - - /etc/logrotate.d/mariadb failed, probably because <3.6> 2018-03-04 00:00:01 Telcontar logrotate 13465 - - the root acount is protected by password. <3.6> 2018-03-04 00:00:01 Telcontar logrotate 13465 - - See comments in /etc/logrotate.d/mariadb on how to fix this <3.6> 2018-03-04 00:00:01 Telcontar logrotate 13465 - - error: error running non-shared postrotate script for /var/log/mysql/mysqld.log of '/var/log/mysql/mysqld.log ' <3.5> 2018-03-04 00:00:09 Telcontar systemd 1 - - logrotate.service: Main process exited, code=exited, status=1/FAILURE <3.5> 2018-03-04 00:00:09 Telcontar systemd 1 - - logrotate.service: Unit entered failed state. <3.4> 2018-03-04 00:00:09 Telcontar systemd 1 - - logrotate.service: Failed with result 'exit-code'.
yes, I did create the file /root/.my.cnf with read only permissions 0600 for root only
[mysqladmin] password = mysecretpassword user = root
Same here.
but it doesn't help ;(
If I login via CLI all is fine. First I try without password which fails. Next with password and all is fine ;)
cx20-2:~ # mysql -u root -h localhost ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
Same here.
cx20-2:~ # mysql -u root -h localhost -p mysql Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A
Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 6685 Server version: 10.0.33-MariaDB SLE 12 SP1 package
Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [mysql]> quit;
Same here. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
Admin Beckspaced wrote:
Hello OpenSUSE users,
since recently upgrading from 42.2 to 42.3 I do receive an error with logrotate on the mariadb config.
2018-03-14T00:00:01.845385+01:00 cx20-2 logrotate[22165]: error: 'Access denied for user 'root'@'localhost' (using password: NO)' 2018-03-14T00:00:01.846915+01:00 cx20-2 logrotate[22165]: the root acount is protected by password. 2018-03-14T00:00:01.847363+01:00 cx20-2 logrotate[22165]: See comments in /etc/logrotate.d/mariadb on how to fix this 2018-03-14T00:00:01.849623+01:00 cx20-2 logrotate[22165]: error: error running non-shared postrotate script for /var/log/mysql/mysqld.log of '/var/log/mysql/mysqld.log '
yes, I did create the file /root/.my.cnf with read only permissions 0600 for root only
[mysqladmin] password = mysecretpassword user = root
but it doesn't help ;(
I use this: [client] password=mysecretpassword As root, I can enter 'mysql' or 'mysql -u root' or 'mysql -u root -h localhost' and log in. As for rotating mysqlk.log, I never bother. -- Per Jessen, Zürich (7.8°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2018-03-14 11:16, Per Jessen wrote:
yes, I did create the file /root/.my.cnf with read only permissions 0600 for root only
[mysqladmin] password = mysecretpassword user = root
but it doesn't help ;(
I use this:
[client] password=mysecretpassword
That appears to work. Then the text in /etc/logrotate.d/mariadb is incorrect. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
Carlos E. R. wrote:
On 2018-03-14 11:16, Per Jessen wrote:
yes, I did create the file /root/.my.cnf with read only permissions 0600 for root only
[mysqladmin] password = mysecretpassword user = root
but it doesn't help ;(
I use this:
[client] password=mysecretpassword
That appears to work. Then the text in /etc/logrotate.d/mariadb is incorrect.
Yeah. The mariadb manual is better. -- Per Jessen, Zürich (13.1°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am 14.03.2018 um 16:17 schrieb Per Jessen:
Carlos E. R. wrote:
On 2018-03-14 11:16, Per Jessen wrote:
yes, I did create the file /root/.my.cnf with read only permissions 0600 for root only
[mysqladmin] password = mysecretpassword user = root
but it doesn't help ;( I use this:
[client] password=mysecretpassword That appears to work. Then the text in /etc/logrotate.d/mariadb is incorrect. Yeah. The mariadb manual is better.
Just a follow up as the error still exists in my journal log files: cx20-2:~ # journalctl -u logrotate.service --since "2018-03-17" -- Logs begin at Wed 2017-06-07 19:42:37 CEST, end at Mon 2018-03-19 15:25:01 CET. -- Mar 17 00:00:00 cx20-2 systemd[1]: Starting Rotate log files... Mar 17 00:00:00 cx20-2 logrotate[12950]: [61B blob data] Mar 17 00:00:00 cx20-2 logrotate[12950]: error: 'Access denied for user 'root'@'localhost' (using password: NO)' Mar 17 00:00:00 cx20-2 logrotate[12950]: /etc/logrotate.d/mariadb failed, probably because Mar 17 00:00:00 cx20-2 logrotate[12950]: the root acount is protected by password. Mar 17 00:00:00 cx20-2 logrotate[12950]: See comments in /etc/logrotate.d/mariadb on how to fix this Mar 17 00:00:00 cx20-2 logrotate[12950]: error: error running non-shared postrotate script for /var/log/mysql/mysqld Mar 17 00:00:00 cx20-2 systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE Mar 17 00:00:00 cx20-2 systemd[1]: Failed to start Rotate log files. Mar 17 00:00:00 cx20-2 systemd[1]: logrotate.service: Unit entered failed state. Mar 17 00:00:00 cx20-2 systemd[1]: logrotate.service: Failed with result 'exit-code'. Mar 18 00:00:01 cx20-2 systemd[1]: Starting Rotate log files... Mar 18 00:01:04 cx20-2 systemd[1]: Started Rotate log files. Mar 19 00:00:01 cx20-2 systemd[1]: Starting Rotate log files... Mar 19 00:00:02 cx20-2 logrotate[6075]: [61B blob data] Mar 19 00:00:02 cx20-2 logrotate[6075]: error: 'Access denied for user 'root'@'localhost' (using password: NO)' Mar 19 00:00:02 cx20-2 logrotate[6075]: /etc/logrotate.d/mariadb failed, probably because Mar 19 00:00:02 cx20-2 logrotate[6075]: the root acount is protected by password. Mar 19 00:00:02 cx20-2 logrotate[6075]: See comments in /etc/logrotate.d/mariadb on how to fix this Mar 19 00:00:02 cx20-2 logrotate[6075]: error: error running non-shared postrotate script for /var/log/mysql/mysqld. Mar 19 00:00:05 cx20-2 systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE Mar 19 00:00:05 cx20-2 systemd[1]: Failed to start Rotate log files. Mar 19 00:00:05 cx20-2 systemd[1]: logrotate.service: Unit entered failed state. Mar 19 00:00:05 cx20-2 systemd[1]: logrotate.service: Failed with result 'exit-code'. I already had added both sections, mysql & mariadb, in /root/.my.cnf which is only readable by root 600 [client] password = "topsecret" user = root [mysqladmin] password = "topsecret" user = root I had both sections in from the beginning even before the update from 42.2 -> 42.3 on 42.2 and earlier it always worked without problems. If i do a manual login via CLI I have no problems as password is specified in /root/.my.cnf : cx20-2:~ # mysql -u root -h mysql: option '-h' requires an argument cx20-2:~ # mysql -u root -h localhost Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 4158 Server version: 10.0.34-MariaDB SLE 12 SP1 package Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> quit Bye If i change the password in .my.cnf and try to login it fails ... surprise ;) cx20-2:~ # mysql -u root -h localhost ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) If i run the command from /etc/logrotate.d/mariadb with wrong password in .my.cnf cx20-2:~ # /usr/bin/mysqladmin --local flush-error-log flush-engine-log flush-general-log flush-slow-log /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: YES)' If i set the proper password in .my.cnf it runs fine without any errors ... cx20-2:~ # /usr/bin/mysqladmin --local flush-error-log flush-engine-log flush-general-log flush-slow-log cx20-2:~ # so setting the password in .my.cnf seems to work fine ... the only difference I see is when running logrotate via systemd it says using password: NO Mar 19 00:00:02 cx20-2 logrotate[6075]: [61B blob data] Mar 19 00:00:02 cx20-2 logrotate[6075]: error: 'Access denied for user 'root'@'localhost' (using password: NO)' Mar 19 00:00:02 cx20-2 logrotate[6075]: /etc/logrotate.d/mariadb failed, probably because Mar 19 00:00:02 cx20-2 logrotate[6075]: the root acount is protected by password. Mar 19 00:00:02 cx20-2 logrotate[6075]: See comments in /etc/logrotate.d/mariadb on how to fix this Mar 19 00:00:02 cx20-2 logrotate[6075]: error: error running non-shared postrotate script for /var/log/mysql/mysqld. Mar 19 00:00:05 cx20-2 systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE Mar 19 00:00:05 cx20-2 systemd[1]: Failed to start Rotate log files. Mar 19 00:00:05 cx20-2 systemd[1]: logrotate.service: Unit entered failed state. Mar 19 00:00:05 cx20-2 systemd[1]: logrotate.service: Failed with result 'exit-code'. If i run the command manually via CLI it says using password: YES cx20-2:~ # /usr/bin/mysqladmin --local flush-error-log flush-engine-log flush-general-log flush-slow-log /usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: YES)' perhaps that's the problem with systemd? that it is somehow not using a password and therefore doesn't read the content of .my.cnf? so ... error with logrotate and mariadb here still exists on 42.3 ... altogether on 4 machines the same results any more insights anyone? any more ideas how to debug? thanks & all the best wishes Becki -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Admin Beckspaced
-
Carlos E. R.
-
Per Jessen