Details

    Description

      I have a 10.1.26 docker alpine container based on a previous version of Johan Bergström working with sphinx (on docker hub kklepper/mariadb33).

      In order to upgrade, I adopted the new version of Johan (kklepper/mariadb33-10.4.18) in which I cannot activate the sphinx plugin:

      M:2521920 [(none)]>INSTALL SONAME 'ha_sphinx';
      ERROR 1126 (HY000): Can't open shared library '/usr/lib/mariadb/plugin/ha_sphinx.so' (errno: 13, Error relocating /usr/lib/mariadb/plugin/ha_sphinx.so: _ZNK30Type_handler_hybrid_field_type26get_handler_by_result_typeE11Item_r)
      

      Unfortunately, this plugin is crucial for my application, so I have to fix this.

      The error message is enigmatic for me, however, and I have no idea of how to debug this.

      I added ha_sphinx.so to /usr/lib/mariadb/plugin/ manually. The original file is indeed present at the given path and file privileges do not matter.

      The former image features 36 plugins. I had to manually add ha_sphinx.so in previous versions, so I guess the appropriate alpine package had been augmented.

      What can I do to resolve this problem? Is it a problem of MariaDB or of the alpine package involved?

      Attachments

        Activity

          kklepper Karl Klepper added a comment -

          Johan Bergstroem just mailed me:

          As I mentioned previously, I think this is by design (not a bug, but intentional). I believe you have the answer here: https://git.alpinelinux.org/aports/tree/main/mariadb/APKBUILD#n162.

          So the Alpine-maintainer of MariaDB is in charge? Do I understand correctly the Alpine compiles MariaDB without Sphinx? The error message is by MariaDB, not Alpine, right? And it would be triggered by the omission in the build process?

          kklepper Karl Klepper added a comment - Johan Bergstroem just mailed me: As I mentioned previously, I think this is by design (not a bug, but intentional). I believe you have the answer here: https://git.alpinelinux.org/aports/tree/main/mariadb/APKBUILD#n162 . So the Alpine-maintainer of MariaDB is in charge? Do I understand correctly the Alpine compiles MariaDB without Sphinx? The error message is by MariaDB, not Alpine, right? And it would be triggered by the omission in the build process?
          danblack Daniel Black added a comment - - edited

          > So the Alpine-maintainer of MariaDB is in charge?

          Yes.

          > Do I understand correctly the Alpine compiles MariaDB without Sphinx?

          Yes.

          > The error message is by MariaDB, not Alpine, right?

          ":errno: 13, Error relocating" is caused by copying around a file that is tightly coupled build process and mariadb version and the dynamic loader not handling it.

          > And it would be triggered by the omission in the build process?

          Its triggered by YOU, who ignored "Google copy/paste/no analysis/move file X will just end in tears like where you started".

          Stop using alpine based containers for sphinxse. It obviously doesn't work. The reasons the official docker image isn't alpine is it isn't actually tested prior to release (https://github.com/MariaDB/mariadb-docker/pull/343), though the alpine maintainers run some tests.

          The reasons the official Docker Library mariadb does actually work is because it has sphinx as part of the image already.

          Very simple:

          $ podman run --name mdb10.4-sphinx-test -d -e MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1 mariadb:10.4 --plugin-load-add=ha_sphinx.so
          482ec0ef47a7ab89163e187132ecc1d7170d9a034a84c9f5d25af10691d3dea4
           
          $ docker exec -ti mdb10.4-sphinx-test mysql -e 'show plugins'
          +-------------------------------+----------+--------------------+--------------+---------+
          | Name                          | Status   | Type               | Library      | License |
          +-------------------------------+----------+--------------------+--------------+---------+
          | binlog                        | ACTIVE   | STORAGE ENGINE     | NULL         | GPL     |
          | mysql_native_password         | ACTIVE   | AUTHENTICATION     | NULL         | GPL     |
          | mysql_old_password            | ACTIVE   | AUTHENTICATION     | NULL         | GPL     |
          | wsrep                         | ACTIVE   | REPLICATION        | NULL         | GPL     |
          | CSV                           | ACTIVE   | STORAGE ENGINE     | NULL         | GPL     |
          | MEMORY                        | ACTIVE   | STORAGE ENGINE     | NULL         | GPL     |
          | Aria                          | ACTIVE   | STORAGE ENGINE     | NULL         | GPL     |
          | MyISAM                        | ACTIVE   | STORAGE ENGINE     | NULL         | GPL     |
          | MRG_MyISAM                    | ACTIVE   | STORAGE ENGINE     | NULL         | GPL     |
          | CLIENT_STATISTICS             | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INDEX_STATISTICS              | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | TABLE_STATISTICS              | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | USER_STATISTICS               | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | SQL_SEQUENCE                  | ACTIVE   | STORAGE ENGINE     | NULL         | GPL     |
          | InnoDB                        | ACTIVE   | STORAGE ENGINE     | NULL         | GPL     |
          | INNODB_TRX                    | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_LOCKS                  | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_LOCK_WAITS             | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_CMP                    | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_CMP_RESET              | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_CMPMEM                 | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_CMPMEM_RESET           | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_CMP_PER_INDEX          | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_CMP_PER_INDEX_RESET    | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_BUFFER_PAGE            | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_BUFFER_PAGE_LRU        | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_BUFFER_POOL_STATS      | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_METRICS                | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_FT_DEFAULT_STOPWORD    | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_FT_DELETED             | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_FT_BEING_DELETED       | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_FT_CONFIG              | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_FT_INDEX_CACHE         | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_FT_INDEX_TABLE         | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_SYS_TABLES             | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_SYS_TABLESTATS         | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_SYS_INDEXES            | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_SYS_COLUMNS            | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_SYS_FIELDS             | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_SYS_FOREIGN            | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_SYS_FOREIGN_COLS       | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_SYS_TABLESPACES        | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_SYS_DATAFILES          | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_SYS_VIRTUAL            | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_MUTEXES                | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_SYS_SEMAPHORE_WAITS    | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | INNODB_TABLESPACES_ENCRYPTION | ACTIVE   | INFORMATION SCHEMA | NULL         | BSD     |
          | INNODB_TABLESPACES_SCRUBBING  | ACTIVE   | INFORMATION SCHEMA | NULL         | BSD     |
          | PERFORMANCE_SCHEMA            | ACTIVE   | STORAGE ENGINE     | NULL         | GPL     |
          | SEQUENCE                      | ACTIVE   | STORAGE ENGINE     | NULL         | GPL     |
          | unix_socket                   | ACTIVE   | AUTHENTICATION     | NULL         | GPL     |
          | FEEDBACK                      | DISABLED | INFORMATION SCHEMA | NULL         | GPL     |
          | user_variables                | ACTIVE   | INFORMATION SCHEMA | NULL         | GPL     |
          | partition                     | ACTIVE   | STORAGE ENGINE     | NULL         | GPL     |
          | SPHINX                        | ACTIVE   | STORAGE ENGINE     | ha_sphinx.so | GPL     |
          +-------------------------------+----------+--------------------+--------------+---------+
          

          Replacing podman with docker in the above is exactly the same.

          Final notes:

          • Use a officially supported image - https://hub.docker.com/_/mariadb - packaging bugs of anything else don't belong here (though we'll try to address crashes and other bugs).
          • Stop copying around files especially shared libraries and expect them to magicly work (host OS != container OS).
          • Use docker logs containername in bug reports (not used once in this bug report by you)
          • You can't just up/downgrade mariadb 10.1 -> 10.5 and back to 10.4 hence you jumping on a remove the datadir.
          • Slow down and analyze and learn (and much less copy whatever google result returned).
          danblack Daniel Black added a comment - - edited > So the Alpine-maintainer of MariaDB is in charge? Yes. > Do I understand correctly the Alpine compiles MariaDB without Sphinx? Yes. > The error message is by MariaDB, not Alpine, right? ":errno: 13, Error relocating" is caused by copying around a file that is tightly coupled build process and mariadb version and the dynamic loader not handling it. > And it would be triggered by the omission in the build process? Its triggered by YOU, who ignored "Google copy/paste/no analysis/move file X will just end in tears like where you started". Stop using alpine based containers for sphinxse. It obviously doesn't work. The reasons the official docker image isn't alpine is it isn't actually tested prior to release ( https://github.com/MariaDB/mariadb-docker/pull/343 ), though the alpine maintainers run some tests. The reasons the official Docker Library mariadb does actually work is because it has sphinx as part of the image already. Very simple: $ podman run --name mdb10.4-sphinx-test -d -e MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1 mariadb:10.4 --plugin-load-add=ha_sphinx.so 482ec0ef47a7ab89163e187132ecc1d7170d9a034a84c9f5d25af10691d3dea4   $ docker exec -ti mdb10.4-sphinx-test mysql -e 'show plugins' +-------------------------------+----------+--------------------+--------------+---------+ | Name | Status | Type | Library | License | +-------------------------------+----------+--------------------+--------------+---------+ | binlog | ACTIVE | STORAGE ENGINE | NULL | GPL | | mysql_native_password | ACTIVE | AUTHENTICATION | NULL | GPL | | mysql_old_password | ACTIVE | AUTHENTICATION | NULL | GPL | | wsrep | ACTIVE | REPLICATION | NULL | GPL | | CSV | ACTIVE | STORAGE ENGINE | NULL | GPL | | MEMORY | ACTIVE | STORAGE ENGINE | NULL | GPL | | Aria | ACTIVE | STORAGE ENGINE | NULL | GPL | | MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL | | MRG_MyISAM | ACTIVE | STORAGE ENGINE | NULL | GPL | | CLIENT_STATISTICS | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INDEX_STATISTICS | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | TABLE_STATISTICS | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | USER_STATISTICS | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | SQL_SEQUENCE | ACTIVE | STORAGE ENGINE | NULL | GPL | | InnoDB | ACTIVE | STORAGE ENGINE | NULL | GPL | | INNODB_TRX | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_LOCKS | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_LOCK_WAITS | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_CMP | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_CMP_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_CMPMEM | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_CMPMEM_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_CMP_PER_INDEX | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_CMP_PER_INDEX_RESET | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_BUFFER_PAGE | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_BUFFER_PAGE_LRU | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_BUFFER_POOL_STATS | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_METRICS | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_FT_DEFAULT_STOPWORD | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_FT_DELETED | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_FT_BEING_DELETED | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_FT_CONFIG | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_FT_INDEX_CACHE | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_FT_INDEX_TABLE | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_SYS_TABLES | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_SYS_TABLESTATS | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_SYS_INDEXES | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_SYS_COLUMNS | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_SYS_FIELDS | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_SYS_FOREIGN | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_SYS_FOREIGN_COLS | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_SYS_TABLESPACES | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_SYS_DATAFILES | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_SYS_VIRTUAL | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_MUTEXES | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_SYS_SEMAPHORE_WAITS | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | INNODB_TABLESPACES_ENCRYPTION | ACTIVE | INFORMATION SCHEMA | NULL | BSD | | INNODB_TABLESPACES_SCRUBBING | ACTIVE | INFORMATION SCHEMA | NULL | BSD | | PERFORMANCE_SCHEMA | ACTIVE | STORAGE ENGINE | NULL | GPL | | SEQUENCE | ACTIVE | STORAGE ENGINE | NULL | GPL | | unix_socket | ACTIVE | AUTHENTICATION | NULL | GPL | | FEEDBACK | DISABLED | INFORMATION SCHEMA | NULL | GPL | | user_variables | ACTIVE | INFORMATION SCHEMA | NULL | GPL | | partition | ACTIVE | STORAGE ENGINE | NULL | GPL | | SPHINX | ACTIVE | STORAGE ENGINE | ha_sphinx.so | GPL | +-------------------------------+----------+--------------------+--------------+---------+ Replacing podman with docker in the above is exactly the same. Final notes: Use a officially supported image - https://hub.docker.com/_/mariadb - packaging bugs of anything else don't belong here (though we'll try to address crashes and other bugs). Stop copying around files especially shared libraries and expect them to magicly work (host OS != container OS). Use docker logs containername in bug reports (not used once in this bug report by you) You can't just up/downgrade mariadb 10.1 -> 10.5 and back to 10.4 hence you jumping on a remove the datadir. Slow down and analyze and learn (and much less copy whatever google result returned).
          kklepper Karl Klepper added a comment -

          Thank you very much for your patience.

          kklepper Karl Klepper added a comment - Thank you very much for your patience.
          kklepper Karl Klepper added a comment -

          I managed to update my system to use the official mariadb container with little effort.

          Thank you for your persistent support and detailed teaching.

          kklepper Karl Klepper added a comment - I managed to update my system to use the official mariadb container with little effort. Thank you for your persistent support and detailed teaching.
          danblack Daniel Black added a comment -

          Glad to hear you managed the migration.

          If you are stuck trying to achieve something take note of the "Where to get help" in the Quick Reference https://hub.docker.com/_/mariadb.

          Do report bugs/feature requests with the official container here.

          Happy MariaDBing.

          danblack Daniel Black added a comment - Glad to hear you managed the migration. If you are stuck trying to achieve something take note of the "Where to get help" in the Quick Reference https://hub.docker.com/_/mariadb . Do report bugs/feature requests with the official container here. Happy MariaDBing.

          People

            danblack Daniel Black
            kklepper Karl Klepper
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.