Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL 8.0.30: Plugin 'AUDIT' registration as a AUDIT failed. #264

Open
GrimUncle opened this issue Aug 11, 2023 · 1 comment
Open

MySQL 8.0.30: Plugin 'AUDIT' registration as a AUDIT failed. #264

GrimUncle opened this issue Aug 11, 2023 · 1 comment

Comments

@GrimUncle
Copy link

Hi, Greetings.
I'm getting the following error trying to install libaudit_plugin.so. Appreciate any ideas. Thank you.

Error messages:

2023-08-11T11:15:51.064503Z 0 [ERROR] [MY-000000] [Server] Trellix Audit Plugin: unable to init compatibility layer. Aborting.
2023-08-11T11:15:51.064510Z 0 [ERROR] [MY-010202] [Server] Plugin 'AUDIT' init function returned error.
2023-08-11T11:15:51.064515Z 0 [ERROR] [MY-010734] [Server] Plugin 'AUDIT' registration as a AUDIT failed.

Audit plugin version(i see the plugin description says it starts to support MySQL 64-bit 8.0.30, so I installed the MYSQL community server 8.0.30, however, i didn't get luck to make it successfully be installed on my redhat 9.0 server):

audit-plugin-mysql-8.0-1.1.13-1008

OS version:

[root@localhost etc]# cat /etc/os-release
NAME="Red Hat Enterprise Linux"
VERSION="9.0 (Plow)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="9.0"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Red Hat Enterprise Linux 9.0 (Plow)"
ANSI_COLOR="0;31"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:redhat:enterprise_linux:9::baseos"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/red_hat_enterprise_linux/9/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 9"
REDHAT_BUGZILLA_PRODUCT_VERSION=9.0
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.0"
[root@localhost etc]#

MYSQL version:
[

root@localhost etc]# rpm -qa|grep -i mysql
mysql-community-common-8.0.30-1.el9.x86_64
mysql-community-client-plugins-8.0.30-1.el9.x86_64
mysql-community-libs-8.0.30-1.el9.x86_64
mysql-community-client-8.0.30-1.el9.x86_64
mysql-community-icu-data-files-8.0.30-1.el9.x86_64
mysql-community-server-8.0.30-1.el9.x86_64
mysql-community-debuginfo-8.0.30-1.el9.x86_64
mysql-community-server-debuginfo-8.0.30-1.el9.x86_64
mysql-community-server-debug-8.0.30-1.el9.x86_64
mysql-community-devel-8.0.30-1.el9.x86_64
[root@localhost etc]#

My.cnf settings:

[mysqld]
log_error_verbosity=3
plugin-load=AUDIT=libaudit_plugin.so
audit_validate_checksum=OFF
audit_offsets=9400, 9440, 4936, 6416, 1288, 0, 0, 32, 64, 160, 1376, 9540, 6040, 4248, 4256, 4260, 7696, 1576, 32, 8656, 8696, 8680, 12424, 140, 664, 328
audit_json_file = on
audit_record_cmds = 'insert,delete'

offset values (it matches the one added in the my.cnf):

[root@localhost utils]# ./offset-extract.sh /usr/sbin/mysqld
//offsets for: /usr/sbin/mysqld (8.0.30)
{"8.0.30","261d2873569af68aadffccb793a59957", 9400, 9440, 4936, 6416, 1288, 0, 0, 32, 64, 160, 1376, 9540, 6040, 4248, 4256, 4260, 7696, 1576, 32, 8656, 8696, 8680, 12424, 140, 664, 328},
[root@localhost utils]#

Entire error logs (logs are captured whilerunning systemctl restart mysqld):

2023-08-11T11:15:49.422478Z 0 [System] [MY-013172] [Server] Received SHUTDOWN from user . Shutting down mysqld (Version: 8.0.30).
2023-08-11T11:15:49.422871Z 0 [Note] [MY-010067] [Server] Giving 1 client threads a chance to die gracefully
2023-08-11T11:15:49.422893Z 0 [Note] [MY-010117] [Server] Shutting down slave threads
2023-08-11T11:15:49.422901Z 0 [Note] [MY-010054] [Server] Event Scheduler: Killing the scheduler thread, thread id 5
2023-08-11T11:15:49.422909Z 0 [Note] [MY-010050] [Server] Event Scheduler: Waiting for the scheduler thread to reply
2023-08-11T11:15:49.422960Z 0 [Note] [MY-010048] [Server] Event Scheduler: Stopped
2023-08-11T11:15:49.422969Z 0 [Note] [MY-010118] [Server] Forcefully disconnecting 0 remaining clients
2023-08-11T11:15:49.422974Z 0 [Note] [MY-010043] [Server] Event Scheduler: Purging the queue. 0 events
2023-08-11T11:15:49.424150Z 0 [Note] [MY-012330] [InnoDB] FTS optimize thread exiting.
2023-08-11T11:15:49.495052Z 0 [Note] [MY-010120] [Server] Binlog end
2023-08-11T11:15:49.498176Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'mysqlx'
2023-08-11T11:15:49.498395Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'mysqlx_cache_cleaner'
2023-08-11T11:15:49.498409Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'ngram'
2023-08-11T11:15:49.498415Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'BLACKHOLE'
2023-08-11T11:15:49.498420Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'ARCHIVE'
2023-08-11T11:15:49.498424Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'TempTable'
2023-08-11T11:15:49.498429Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'PERFORMANCE_SCHEMA'
2023-08-11T11:15:49.498444Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'MRG_MYISAM'
2023-08-11T11:15:49.498449Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'MyISAM'
2023-08-11T11:15:49.498465Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_SESSION_TEMP_TABLESPACES'
2023-08-11T11:15:49.498470Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_CACHED_INDEXES'
2023-08-11T11:15:49.498475Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_VIRTUAL'
2023-08-11T11:15:49.498479Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_COLUMNS'
2023-08-11T11:15:49.498483Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_TABLESPACES'
2023-08-11T11:15:49.498486Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_INDEXES'
2023-08-11T11:15:49.498490Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_TABLESTATS'
2023-08-11T11:15:49.498494Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_TABLES'
2023-08-11T11:15:49.498498Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2023-08-11T11:15:49.498502Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2023-08-11T11:15:49.498506Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_FT_CONFIG'
2023-08-11T11:15:49.498510Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2023-08-11T11:15:49.498514Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_FT_DELETED'
2023-08-11T11:15:49.498518Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2023-08-11T11:15:49.498522Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_METRICS'
2023-08-11T11:15:49.498529Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2023-08-11T11:15:49.498533Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2023-08-11T11:15:49.498537Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2023-08-11T11:15:49.498541Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_BUFFER_PAGE'
2023-08-11T11:15:49.498545Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2023-08-11T11:15:49.498549Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2023-08-11T11:15:49.498553Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_CMPMEM_RESET'
2023-08-11T11:15:49.498557Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_CMPMEM'
2023-08-11T11:15:49.498561Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_CMP_RESET'
2023-08-11T11:15:49.498565Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_CMP'
2023-08-11T11:15:49.498569Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'INNODB_TRX'
2023-08-11T11:15:49.498573Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'InnoDB'
2023-08-11T11:15:49.498593Z 0 [Note] [MY-013072] [InnoDB] Starting shutdown...
2023-08-11T11:15:49.498728Z 0 [Note] [MY-011944] [InnoDB] Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2023-08-11T11:15:49.498872Z 0 [Note] [MY-011944] [InnoDB] Buffer pool(s) dump completed at 230811 20:15:49
2023-08-11T11:15:49.599761Z 0 [Note] [MY-013084] [InnoDB] Log background threads are being closed...
2023-08-11T11:15:49.948827Z 0 [Note] [MY-013854] [InnoDB] Bytes written to disk by DBLWR (ON): 884736
2023-08-11T11:15:49.949089Z 0 [Note] [MY-012980] [InnoDB] Shutdown completed; log sequence number 21605425
2023-08-11T11:15:49.949586Z 0 [Note] [MY-012255] [InnoDB] Removed temporary tablespace data file: "ibtmp1"
2023-08-11T11:15:49.949626Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'MEMORY'
2023-08-11T11:15:49.949653Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'CSV'
2023-08-11T11:15:49.949677Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'daemon_keyring_proxy_plugin'
2023-08-11T11:15:49.949707Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'sha2_cache_cleaner'
2023-08-11T11:15:49.949731Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'caching_sha2_password'
2023-08-11T11:15:49.949755Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'sha256_password'
2023-08-11T11:15:49.949777Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'mysql_native_password'
2023-08-11T11:15:49.949907Z 0 [Note] [MY-010733] [Server] Shutting down plugin 'binlog'
2023-08-11T11:15:49.950253Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30) MySQL Community Server - GPL.
2023-08-11T11:15:50.742411Z 0 [Note] [MY-010949] [Server] Basedir set to /usr/.
2023-08-11T11:15:50.742419Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 5745
2023-08-11T11:15:50.748032Z 0 [Note] [MY-012366] [InnoDB] Using Linux native AIO
2023-08-11T11:15:50.748192Z 0 [Note] [MY-010747] [Server] Plugin 'FEDERATED' is disabled.
2023-08-11T11:15:50.749099Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-08-11T11:15:50.749150Z 1 [Note] [MY-013546] [InnoDB] Atomic write enabled
2023-08-11T11:15:50.749191Z 1 [Note] [MY-012932] [InnoDB] PUNCH HOLE support available
2023-08-11T11:15:50.749224Z 1 [Note] [MY-012944] [InnoDB] Uses event mutexes
2023-08-11T11:15:50.749249Z 1 [Note] [MY-012945] [InnoDB] GCC builtin __atomic_thread_fence() is used for memory barrier
2023-08-11T11:15:50.749274Z 1 [Note] [MY-012948] [InnoDB] Compressed tables use zlib 1.2.12
2023-08-11T11:15:50.750626Z 1 [Note] [MY-013251] [InnoDB] Number of pools: 1
2023-08-11T11:15:50.750756Z 1 [Note] [MY-012951] [InnoDB] Using hardware accelerated crc32 and polynomial multiplication.
2023-08-11T11:15:50.751057Z 1 [Note] [MY-012203] [InnoDB] Directories to scan './'
2023-08-11T11:15:50.751123Z 1 [Note] [MY-012204] [InnoDB] Scanning './'
2023-08-11T11:15:50.752182Z 1 [Note] [MY-012208] [InnoDB] Completed space ID check of 4 files.
2023-08-11T11:15:50.752636Z 1 [Note] [MY-012955] [InnoDB] Initializing buffer pool, total size = 128.000000M, instances = 1, chunk size =128.000000M
2023-08-11T11:15:50.757351Z 1 [Note] [MY-012957] [InnoDB] Completed initialization of buffer pool
2023-08-11T11:15:50.815920Z 0 [Note] [MY-011952] [InnoDB] If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2023-08-11T11:15:50.816299Z 1 [Note] [MY-013532] [InnoDB] Using './#ib_16384_0.dblwr' for doublewrite
2023-08-11T11:15:50.816511Z 1 [Note] [MY-013532] [InnoDB] Using './#ib_16384_1.dblwr' for doublewrite
2023-08-11T11:15:50.823300Z 1 [Note] [MY-013566] [InnoDB] Double write buffer files: 2
2023-08-11T11:15:50.823379Z 1 [Note] [MY-013565] [InnoDB] Double write buffer pages per instance: 4
2023-08-11T11:15:50.823421Z 1 [Note] [MY-013532] [InnoDB] Using './#ib_16384_0.dblwr' for doublewrite
2023-08-11T11:15:50.823461Z 1 [Note] [MY-013532] [InnoDB] Using './#ib_16384_1.dblwr' for doublewrite
2023-08-11T11:15:50.849993Z 1 [Note] [MY-013883] [InnoDB] The latest found checkpoint is at lsn = 21605425 in redo log file ./#innodb_redo/#ib_redo6.
2023-08-11T11:15:50.850112Z 1 [Note] [MY-013086] [InnoDB] Starting to parse redo log at lsn = 21605425, whereas checkpoint_lsn = 21605425 and start_lsn = 21605376
2023-08-11T11:15:50.856803Z 1 [Note] [MY-013083] [InnoDB] Log background threads are being started...
2023-08-11T11:15:50.887866Z 1 [Note] [MY-012532] [InnoDB] Applying a batch of 0 redo log records ...
2023-08-11T11:15:50.887923Z 1 [Note] [MY-012535] [InnoDB] Apply batch completed!
2023-08-11T11:15:50.888320Z 1 [Note] [MY-013252] [InnoDB] Using undo tablespace './undo_001'.
2023-08-11T11:15:50.889215Z 1 [Note] [MY-013252] [InnoDB] Using undo tablespace './undo_002'.
2023-08-11T11:15:50.890276Z 1 [Note] [MY-012910] [InnoDB] Opened 2 existing undo tablespaces.
2023-08-11T11:15:50.890318Z 1 [Note] [MY-011980] [InnoDB] GTID recovery trx_no: 25870
2023-08-11T11:15:50.893509Z 1 [Note] [MY-013777] [InnoDB] Time taken to initialize rseg using 1 thread: 3183 ms.
2023-08-11T11:15:50.893636Z 1 [Note] [MY-012923] [InnoDB] Creating shared tablespace for temporary tables
2023-08-11T11:15:50.893711Z 1 [Note] [MY-012265] [InnoDB] Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2023-08-11T11:15:50.911257Z 1 [Note] [MY-012266] [InnoDB] File './ibtmp1' size is now 12 MB.
2023-08-11T11:15:50.911366Z 1 [Note] [MY-013627] [InnoDB] Scanning temp tablespace dir:'./#innodb_temp/'
2023-08-11T11:15:50.938698Z 1 [Note] [MY-013018] [InnoDB] Created 128 and tracked 128 new rollback segment(s) in the temporary tablespace. 128 are now active.
2023-08-11T11:15:50.953460Z 1 [Note] [MY-012976] [InnoDB] 8.0.30 started; log sequence number 21605435
2023-08-11T11:15:50.954039Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-08-11T11:15:50.956984Z 1 [Note] [MY-011089] [Server] Data dictionary restarting version '80023'.
2023-08-11T11:15:51.022666Z 1 [Note] [MY-012357] [InnoDB] Reading DD tablespace files
2023-08-11T11:15:51.023163Z 1 [Note] [MY-012356] [InnoDB] Scanned 6 tablespaces. Validated 6.
2023-08-11T11:15:51.061370Z 1 [Note] [MY-010006] [Server] Using data dictionary with version '80023'.
2023-08-11T11:15:51.062265Z 0 [Warning] [MY-000080] [Server] option 'audit-json-file-bufsize': signed value 0 adjusted to 1.
2023-08-11T11:15:51.062279Z 0 [Warning] [MY-000080] [Server] option 'plugin-audit-json-file-bufsize': signed value 0 adjusted to 1.
2023-08-11T11:15:51.064401Z 0 [Note] [MY-011332] [Server] Plugin mysqlx reported: 'IPv6 is available'
2023-08-11T11:15:51.064470Z 0 [Note] [MY-011323] [Server] Plugin mysqlx reported: 'X Plugin ready for connections. bind-address: '::' port: 33060'
2023-08-11T11:15:51.064483Z 0 [Note] [MY-011323] [Server] Plugin mysqlx reported: 'X Plugin ready for connections. socket: '/var/run/mysqld/mysqlx.sock''
2023-08-11T11:15:51.064503Z 0 [ERROR] [MY-000000] [Server] Trellix Audit Plugin: unable to init compatibility layer. Aborting.
2023-08-11T11:15:51.064510Z 0 [ERROR] [MY-010202] [Server] Plugin 'AUDIT' init function returned error.
2023-08-11T11:15:51.064515Z 0 [ERROR] [MY-010734] [Server] Plugin 'AUDIT' registration as a AUDIT failed.
2023-08-11T11:15:51.064522Z 0 [Note] [MY-000000] [Server] Trellix Audit Plugin: deinit
2023-08-11T11:15:51.064529Z 0 [Note] [MY-000000] [Server] trampolinesize: 0
2023-08-11T11:15:51.064532Z 0 [Note] [MY-000000] [Server] saved_code->size: 0
2023-08-11T11:15:51.064536Z 0 [Note] [MY-000000] [Server] Audit Plugin: not removing as hot patch was not set: 0x951270
2023-08-11T11:15:51.064541Z 0 [Note] [MY-000000] [Server] trampolinesize: 0
2023-08-11T11:15:51.064545Z 0 [Note] [MY-000000] [Server] saved_code->size: 0
2023-08-11T11:15:51.064548Z 0 [Note] [MY-000000] [Server] Audit Plugin: not removing as hot patch was not set: 0xb85a70
2023-08-11T11:15:51.064551Z 0 [Note] [MY-000000] [Server] trampolinesize: 0
2023-08-11T11:15:51.064554Z 0 [Note] [MY-000000] [Server] saved_code->size: 0
2023-08-11T11:15:51.064557Z 0 [Note] [MY-000000] [Server] Audit Plugin: not removing as hot patch was not set: 0x9f4f10
2023-08-11T11:15:51.078251Z 0 [Note] [MY-010902] [Server] Thread priority attribute setting in Resource Group SQL shall be ignored due to unsupported platform or insufficient privilege.
2023-08-11T11:15:51.087911Z 0 [Note] [MY-013911] [Server] Crash recovery finished in binlog engine. No attempts to commit, rollback or prepare any transactions.
2023-08-11T11:15:51.088015Z 0 [Note] [MY-013911] [Server] Crash recovery finished in InnoDB engine. No attempts to commit, rollback or prepare any transactions.
2023-08-11T11:15:51.094525Z 0 [Note] [MY-012487] [InnoDB] DDL log recovery : begin
2023-08-11T11:15:51.094569Z 0 [Note] [MY-012488] [InnoDB] DDL log recovery : end
2023-08-11T11:15:51.096898Z 0 [Note] [MY-011946] [InnoDB] Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2023-08-11T11:15:51.097093Z 0 [Note] [MY-011946] [InnoDB] Buffer pool(s) load completed at 230811 20:15:51
2023-08-11T11:15:51.143957Z 0 [Note] [MY-010913] [Server] You have not provided a mandatory server-id. Servers in a replication topology must have unique server-ids. Please refer to the proper server start-up parameters documentation.
2023-08-11T11:15:51.146197Z 0 [Note] [MY-010182] [Server] Found ca.pem, server-cert.pem and server-key.pem in data directory. Trying to enable SSL support using them.
2023-08-11T11:15:51.146246Z 0 [Note] [MY-010304] [Server] Skipping generation of SSL certificates as certificate files are present in data directory.
2023-08-11T11:15:51.149807Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2023-08-11T11:15:51.149863Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2023-08-11T11:15:51.149896Z 0 [Note] [MY-010308] [Server] Skipping generation of RSA key pair through --sha256_password_auto_generate_rsa_keys as key files are present in data directory.
2023-08-11T11:15:51.149922Z 0 [Note] [MY-010308] [Server] Skipping generation of RSA key pair through --caching_sha2_password_auto_generate_rsa_keys as key files are present in data directory.
2023-08-11T11:15:51.152829Z 0 [Note] [MY-010252] [Server] Server hostname (bind-address): '*'; port: 3306
2023-08-11T11:15:51.152900Z 0 [Note] [MY-010253] [Server] IPv6 is available.
2023-08-11T11:15:51.152929Z 0 [Note] [MY-010264] [Server] - '::' resolves to '::';
2023-08-11T11:15:51.152958Z 0 [Note] [MY-010251] [Server] Server socket created on IP: '::'.
2023-08-11T11:15:51.172383Z 0 [Note] [MY-011025] [Repl] Failed to start slave threads for channel ''.
2023-08-11T11:15:51.173311Z 0 [Note] [MY-011240] [Server] Plugin mysqlx reported: 'Using SSL configuration from MySQL Server'
2023-08-11T11:15:51.175672Z 0 [Note] [MY-011243] [Server] Plugin mysqlx reported: 'Using OpenSSL for TLS connections'
2023-08-11T11:15:51.175759Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
2023-08-11T11:15:51.175854Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.30' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server - GPL.
2023-08-11T11:15:51.178412Z 5 [Note] [MY-010051] [Server] Event Scheduler: scheduler thread started with id 5

@GrimUncle
Copy link
Author

GrimUncle commented Aug 16, 2023

i'm not familiar with the code, seems like when to install the mysql plugin, failed at the init check as below,

static int audit_plugin_init(void *p)
{

DBUG_ENTER("audit_plugin_init");
const bool compat_init_ok = compat::init(); ------> personally thinking a 'false' is returned in my case
if (!compat_init_ok) ------> as "false" is returned, this part of code is executed.
{
sql_print_error("%s unable to init compatibility layer. Aborting.", log_prefix);
DBUG_RETURN(1);
}

so i checked the init() function as below,

static inline bool init()
{
#if !defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 80000 --> since my installed mysql version is 8.0.30, so i think this if sentence is matched
return init_vio_socket_connect() && init_str_session();
#elif defined(HAVE_SESS_CONNECT_ATTRS) && defined(MARIADB_BASE_VERSION)
return init_PFS_thread_get_current_thread();
#else
return true;
#endif
}

then, i checked the function init_vio_socket_connect() and init_str_session() respectively,

static inline bool init_vio_socket_connect()
{
void* handle = dlopen(NULL, RTLD_LAZY);
if (!handle)
return false;
_vio_socket_connect = (decltype(_vio_socket_connect))dlsym(handle, "_Z18vio_socket_connectP3VioP8sockaddrji");
_vio_socket_connect_80016 = (decltype(_vio_socket_connect_80016))dlsym(handle, "_Z18vio_socket_connectP3VioP8sockaddrjbi");
_vio_socket_connect_80020 = (decltype(_vio_socket_connect_80020))dlsym(handle, "_Z18vio_socket_connectP3VioP8sockaddrjbiPb");
dlclose(handle);
return _vio_socket_connect || _vio_socket_connect_80016 || _vio_socket_connect_80020;
}

the mysql i installed on my server has this "_Z18vio_socket_connectP3VioP8sockaddrjbiPb", so this function will return 'true'

[root@localhost ~]# nm -D /usr/sbin/mysqld | grep -i "_Z18vio"
0000000001a42a10 T _Z18vio_socket_connectP3VioP8sockaddrjbiPb
0000000001a428c0 T _Z18vio_socket_io_waitP3Vio17enum_vio_io_event
0000000001a3aaf0 T _Z18vio_socket_timeoutP3Viojb

static inline bool init_str_session()
{
void* handle = dlopen(NULL, RTLD_LAZY);
if (!handle)
return false;
_command_name = (decltype(_command_name))dlsym(handle, "command_name");
_str_session_80026 = (decltype(_str_session_80026))dlsym(handle, "_ZN13Command_names11str_sessionE19enum_server_command");
dlclose(handle);
return _command_name || _str_session_80026;
}

unfortunately, there is no "command_name" and "_ZN13Command_names11str_sessionE19enum_server_command" found in my mysql server, so this function will return 'false'

[root@localhost ~]# nm -D /usr/sbin/mysqld | grep -i "_ZN13command_name"
00000000009b7830 T _ZN13Command_names10str_globalB5cxx11E19enum_server_command
00000000009b7780 T _ZN13Command_names11str_sessionB5cxx11E19enum_server_command ----> this one is similar to the ""_ZN13Command_names11str_sessionE19enum_server_command""

00000000035aad20 B _ZN13Command_names13m_replace_strB5cxx11E
0000000003592860 B _ZN13Command_names7m_namesB5cxx11E
00000000009b7750 T _ZN13Command_names9translateB5cxx11ERK16System_variables
[root@localhost ~]# nm -D /usr/sbin/mysqld | grep "command_name"
[root@localhost ~]#

because of this, function init() does an operation "init_vio_socket_connect() && init_str_session();" then returns a 'false'.
maybe that's why mysql server fails to pass the init check and reports an error "Trellix Audit Plugin: unable to init compatibility layer. Aborting."

no clue if my guess is correct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant