Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-7379

MariaDB v5.5.40 can't load "server_audit" plugin.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not a Bug
    • Affects Version/s: 5.5.41
    • Fix Version/s: N/A
    • Component/s: Plugin - Audit
    • Labels:
    • Environment:

      Description

      Can't load "server_audit.so" which is under "/usr/lib64/mysql/plugin" and installed by "MariaDB-5.5.40-centos6-x86_64-server.rpm".

      The error messages in err.log is as below.
      ERROR 1126 (HY000): Can't open shared library 'server_audit.so' (errno: 1, Loading of beta plugin SERVER_AUDIT is prohibited by --plugin-maturity=gamma)

      Download, replace (the original so file), and test audit plugin v1.1.1 ~ v1.1.8 with command "install plugin server_audit soname 'server_audit.so';".
      All failed as below.

      [Non-debug so file, v1.1.1]
      ERROR 1126 (HY000): Can't open shared library 'server_audit.so' (errno: 1, Loading of alpha plugin SERVER_AUDIT is prohibited by --plugin-maturity=gamma)
      [Non-debug so file, v1.1.2~v1.1.8]
      ERROR 1126 (HY000): Can't open shared library 'server_audit.so' (errno: 1, Loading of beta plugin SERVER_AUDIT is prohibited by --plugin-maturity=gamma)

      [Debug so file, v1.1.1~v1.1.8 except v1.1.6]
      ERROR 1126 (HY000): Can't open shared library '/usr/lib64/mysql/plugin/server_audit.so' (errno: 2, undefined symbol: safe_mutex_init)

      [Debug so file, v1.1.6]
      ERROR 1126 (HY000): Can't open shared library '/usr/lib64/mysql/plugin/server_audit.so' (errno: 2, undefined symbol: safe_mutex_lock)

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment - - edited

            Hi,

            Where did you download the packages from?
            Do you have plugin-maturity option in your cnf file(s)?
            If you do, and it's set to 'gamma', that's why you are getting the error – server_audit plugin is currently Beta.

            Show
            elenst Elena Stepanova added a comment - - edited Hi, Where did you download the packages from? Do you have plugin-maturity option in your cnf file(s)? If you do, and it's set to 'gamma', that's why you are getting the error – server_audit plugin is currently Beta.
            Hide
            jhcherng Jiunhorng Cherng added a comment - - edited

            Hi Elena,
            Thanks for you reply.

            The rpm files are downloaded from below URL.
            https://code.mariadb.com/mariadb-enterprise/5.5/yum/rhel6-amd64/rpms
            Did I download incorrect RPM files?

            There is no setting about "plugin-maturity" in "/etc/my.cnf" file.
            And this issue occurs on two machines where one is with MySQL already installed and the other is without MySQL before install MariaDB.
            It is very strange. Since I'm a new guy for MySQL/MariaDB, I spent several days to try to find out what happened.
            In the end, all evidences points to incorrect "plugin-maturity" and I can do nothing with it.

            By the way, I successfully configured the two machines as "Replication pair". That's wonderful.

            I just download the latest build v5.5.41 from below URL.
            http://sgp1.mirrors.digitalocean.com/mariadb/mariadb-5.5.41/yum/rhel6-amd64/rpms/
            After remove and re-install RPM files, it works now.
            I also notice that the original used RPM files are "MariaDB Enterprise" and new used RPM files are "MaraiDB".
            I would like to close this bug since this does not happen in v5.5.41.
            But I don't know how to change the status.

            Thank for all your help.

            Show
            jhcherng Jiunhorng Cherng added a comment - - edited Hi Elena, Thanks for you reply. The rpm files are downloaded from below URL. https://code.mariadb.com/mariadb-enterprise/5.5/yum/rhel6-amd64/rpms Did I download incorrect RPM files? There is no setting about "plugin-maturity" in "/etc/my.cnf" file. And this issue occurs on two machines where one is with MySQL already installed and the other is without MySQL before install MariaDB. It is very strange. Since I'm a new guy for MySQL/MariaDB, I spent several days to try to find out what happened. In the end, all evidences points to incorrect "plugin-maturity" and I can do nothing with it. By the way, I successfully configured the two machines as "Replication pair". That's wonderful. I just download the latest build v5.5.41 from below URL. http://sgp1.mirrors.digitalocean.com/mariadb/mariadb-5.5.41/yum/rhel6-amd64/rpms/ After remove and re-install RPM files, it works now. I also notice that the original used RPM files are "MariaDB Enterprise" and new used RPM files are "MaraiDB". I would like to close this bug since this does not happen in v5.5.41. But I don't know how to change the status. Thank for all your help.
            Hide
            elenst Elena Stepanova added a comment -

            You downloaded enterprise binaries. Unless you know for sure that's what you want and need, you don't. Please use community binaries instead, just like you did with 5.5.41.
            Among other things, enterprise binaries enforce a strict policy on plugin maturity, that's what you've encountered.

            Show
            elenst Elena Stepanova added a comment - You downloaded enterprise binaries. Unless you know for sure that's what you want and need, you don't. Please use community binaries instead, just like you did with 5.5.41. Among other things, enterprise binaries enforce a strict policy on plugin maturity, that's what you've encountered.
            Hide
            jhcherng Jiunhorng Cherng added a comment -

            Thank for you reply.

            But I still don't know why v5.5.40 Enterprise has issue with built-in server_audit plug-in.
            Also, why it is not compatible with server_audit plug-ins with version 1.1.11 ~ 1.1.18 provided by MariaDB?

            Does community binaries mean "Non-enterprise" binaries?

            Thanks!!

            Show
            jhcherng Jiunhorng Cherng added a comment - Thank for you reply. But I still don't know why v5.5.40 Enterprise has issue with built-in server_audit plug-in. Also, why it is not compatible with server_audit plug-ins with version 1.1.11 ~ 1.1.18 provided by MariaDB? Does community binaries mean "Non-enterprise" binaries? Thanks!!
            Hide
            elenst Elena Stepanova added a comment -

            It doesn't have an issue with the plugin, it has an issue with the plugin maturity. As I already said, enterprise binaries enforce strict policy on plugin usage, to make sure that experimental plugins do not get used by mistake. server_audit is now Beta, hence it was rejected. I suppose if you specify explicitly in your config --plugin-maturity=beta, it should work (I don't have the enterprise package handy at the moment to check myself; maybe I'm wrong and the policy is even stricter than that).

            Regarding compatibility, normally plugins should be from the same server build as the serer itself.

            I don't know what meaning you put into the term "non-enterprise" binaries, so I can't answer your last question accurately. From the perspective of packages provided by MariaDB, there are the traditional ones, that have been provided for years (http://downloads.askmonty.org/), and now there are also those that are called 'enterprise' (https://mariadb.com/products/mariadb-enterprise). Usually the former ones are referred to as just "MariaDB packages", while the latter ones – as "MariaDB enterprise packages". The former ones can also be called "community", as this difference in naming is familiar to MySQL users.

            Show
            elenst Elena Stepanova added a comment - It doesn't have an issue with the plugin, it has an issue with the plugin maturity. As I already said, enterprise binaries enforce strict policy on plugin usage, to make sure that experimental plugins do not get used by mistake. server_audit is now Beta, hence it was rejected. I suppose if you specify explicitly in your config --plugin-maturity=beta, it should work (I don't have the enterprise package handy at the moment to check myself; maybe I'm wrong and the policy is even stricter than that). Regarding compatibility, normally plugins should be from the same server build as the serer itself. I don't know what meaning you put into the term "non-enterprise" binaries, so I can't answer your last question accurately. From the perspective of packages provided by MariaDB, there are the traditional ones, that have been provided for years ( http://downloads.askmonty.org/ ), and now there are also those that are called 'enterprise' ( https://mariadb.com/products/mariadb-enterprise ). Usually the former ones are referred to as just "MariaDB packages", while the latter ones – as "MariaDB enterprise packages". The former ones can also be called "community", as this difference in naming is familiar to MySQL users.
            Hide
            jhcherng Jiunhorng Cherng added a comment -

            Hi Elena,

            No offense. I really appreciate your help and reply because I'm a rookie.
            Now I learned from you that the formal names of those packages are "MariaDB packages" & "MariaDB Enterprise packages".
            Below is what happened.

            Originally, I download "MariaDB Enterprise packages" and encounter some "condition".
            According to your reply, it is caused by the strict "plugin-maturity" control policy.
            That means the "server_audit" plugin which comes with the MariaDB Enterprise packages has maturity-level lower than "beta" but the default setting of "maturity-level" is "beta".
            Hence, when the mysql server starts, all plugins including server_audit under default plugin path, "/usr/lib64/mysql/plugin/", are loaded automatically and generate error log in "/var/lib/mysql/$

            {HOSTNAME}

            .err".
            Is it correct? (At least, I get the same thought as you at that time.)

            Then I try to find "server_audit" plugin with compatible maturity-level.
            https://mariadb.com/kb/en/mariadb/documentation/plugins/plugin-maturity/
            By checking the maturity-level table from above URL, I think latest version of "server_audit" plugin should be able to avoid the "condition".
            https://mariadb.com/kb/en/mariadb/documentation/plugins/mariadb-audit-plugin/release-notes-mariadb-audit-plugin/
            By double checking the release note of server_audit plugin v1.1.3~v1.1.7, the maturity-level are all "Stable".
            By replacing the so file, the condition still occurs with server_audit plugin v1.1.1~v1.1.8.
            Then I get confused and decide to look for professional opinion by posting the condition here.

            What I don't understand is
            a) Why the default "serer_audit" plugin comes with the MariaDB Enterprise packages will create error messages by default setting?
            b) Why server_audit plugin so files v1.1.3~v1.1.8, which should be at "Stable" maturity-level, are not recognized/accepted/loaded by "MariaDB Enterprise" mysql server?

            Since there is no such condition in "MariaDB Packages" v5.5.41, there is no need to go back to v5.5.40 or go further into this condition.
            However, in the beginning, I do encounter some "condition", get confused, and try to get some help here.

            Thanks.

            Show
            jhcherng Jiunhorng Cherng added a comment - Hi Elena, No offense. I really appreciate your help and reply because I'm a rookie. Now I learned from you that the formal names of those packages are "MariaDB packages" & "MariaDB Enterprise packages". Below is what happened. Originally, I download "MariaDB Enterprise packages" and encounter some "condition". According to your reply, it is caused by the strict "plugin-maturity" control policy. That means the "server_audit" plugin which comes with the MariaDB Enterprise packages has maturity-level lower than "beta" but the default setting of "maturity-level" is "beta". Hence, when the mysql server starts, all plugins including server_audit under default plugin path, "/usr/lib64/mysql/plugin/", are loaded automatically and generate error log in "/var/lib/mysql/$ {HOSTNAME} .err". Is it correct? (At least, I get the same thought as you at that time.) Then I try to find "server_audit" plugin with compatible maturity-level. https://mariadb.com/kb/en/mariadb/documentation/plugins/plugin-maturity/ By checking the maturity-level table from above URL, I think latest version of "server_audit" plugin should be able to avoid the "condition". https://mariadb.com/kb/en/mariadb/documentation/plugins/mariadb-audit-plugin/release-notes-mariadb-audit-plugin/ By double checking the release note of server_audit plugin v1.1.3~v1.1.7, the maturity-level are all "Stable". By replacing the so file, the condition still occurs with server_audit plugin v1.1.1~v1.1.8. Then I get confused and decide to look for professional opinion by posting the condition here. What I don't understand is a) Why the default "serer_audit" plugin comes with the MariaDB Enterprise packages will create error messages by default setting? b) Why server_audit plugin so files v1.1.3~v1.1.8, which should be at "Stable" maturity-level, are not recognized/accepted/loaded by "MariaDB Enterprise" mysql server? Since there is no such condition in "MariaDB Packages" v5.5.41, there is no need to go back to v5.5.40 or go further into this condition. However, in the beginning, I do encounter some "condition", get confused, and try to get some help here. Thanks.

              People

              • Assignee:
                Unassigned
                Reporter:
                jhcherng Jiunhorng Cherng
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: