Bug #77285 Audit log plugin error message not correctly formatted
Submitted: 9 Jun 2015 18:08 Modified: 10 Jun 2015 7:56
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Security: Audit Severity:S3 (Non-critical)
Version:5.6.24, 5.6.26 OS:Any
Assigned to: CPU Architecture:Any

[9 Jun 2015 18:08] Daniël van Eeden
Description:
When the audit log plugin can't write to the audit.log file at startup the server won't start and reports an error which isn't correctly formatted.

This bug is about the formatting of the error message.

How to repeat:
Set immutable flag on the file and restart the server. On MacOS that can be done with "chflags uchg audit.log" on Linux this can probably be done with "chattr +i audit.log" 

2015-06-09 20:01:52 69672 [ERROR] Plugin audit_log reported: 'Error reading file 'audit.log' (errno: 1 - Operation not permitted)'
2015-06-09 20:01:52 69672 [ERROR] Plugin audit_log reported: 'File 'audit.log-.200s' is corrupted'
2015-06-09 20:01:52 69672 [Note] Plugin audit_log reported: 'Renaming old log file.'
2015-06-09 20:01:52 69672 [ERROR] Plugin audit_log reported: 'Error on rename of 'audit.log' to 'audit.log.corrupted.14338729129054410.xml' (errno: 1 - Operation not permitted)'
2015-06-09 20:01:52 69672 [ERROR] Plugin 'audit_log' init function returned error.
2015-06-09 20:01:52 69672 [ERROR] Plugin 'audit_log' registration as a AUDIT failed.
2015-06-09 20:01:52 69672 [ERROR] Failed to initialize plugins.
2015-06-09 20:01:52 69672 [ERROR] Aborting
[10 Jun 2015 7:56] MySQL Verification Team
Hello Daniël,

Thank you for the report.
Observed this with 5.6.26(server not aborted but seen similar messages as reported).

Thanks,
Umesh
[10 Jun 2015 7:56] MySQL Verification Team
// 5.6.26

2015-06-10 09:39:55 30392 [ERROR] Plugin audit_log reported: 'Error reading file 'audit.log' (errno: 13 - Permission denied)'
2015-06-10 09:39:55 30392 [ERROR] Plugin audit_log reported: 'File 'audit.log-.200s' is corrupted'
2015-06-10 09:39:55 30392 [Note] Plugin audit_log reported: 'Renaming old log file.'
2015-06-10 09:39:55 30392 [ERROR] Plugin audit_log reported: 'Error on rename of 'audit.log' to 'audit.log.corrupted.14339219952707799.xml' (errno: 1 - Operation not permitted)'
2015-06-10 09:39:55 30392 [ERROR] Plugin 'audit_log' init function returned error.
2015-06-10 09:39:55 30392 [ERROR] Plugin 'audit_log' registration as a AUDIT failed.
2015-06-10 09:39:55 30392 [Note] RSA private key file not found: /export/umesh/server/binaries/mysql-5.6.26/77289//private_key.pem. Some authentication plugins will not work.
2015-06-10 09:39:55 30392 [Note] RSA public key file not found: /export/umesh/server/binaries/mysql-5.6.26/77289//public_key.pem. Some authentication plugins will not work.
2015-06-10 09:39:55 30392 [Note] Server hostname (bind-address): '*'; port: 15000
2015-06-10 09:39:55 30392 [Note] IPv6 is available.
2015-06-10 09:39:55 30392 [Note]   - '::' resolves to '::';
2015-06-10 09:39:55 30392 [Note] Server socket created on IP: '::'.
2015-06-10 09:39:55 30392 [Note] Event Scheduler: Loaded 0 events
2015-06-10 09:39:55 30392 [Note] bin/mysqld: ready for connections.