[MXS-951] Using utf8mb4 on galera hosts stops maxscale connections Created: 2016-10-19  Updated: 2017-01-27  Resolved: 2017-01-18

Status: Closed
Project: MariaDB MaxScale
Component/s: galeramon, readwritesplit
Affects Version/s: 2.0.1
Fix Version/s: 2.1.0

Type: Bug Priority: Minor
Reporter: Simon Hanmer Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: maxscale, utf8mb4
Environment:

Centos 7.1 64 bit
3 x galera hosts - mariadb=10.1.18, galera=25.3.18-1
1 x maxscale hosts - maxscale 2.0.1

installed using 64 bit rpms from mariadb repositories


Issue Links:
Relates
relates to CONC-223 utf8mb4_unicode_520_ci is not compile... Closed
Sprint: 2016-21, 2016-22, 2016-23, 2016-24, 2017-25

 Description   

Our hosts in the galera cluster are configured to use character set utf8mb4. If we try and configure maxscale to connect with this configuration, it will fail with errors such as :

[Galera Monitor] Failed to connect to server 'nnnn1.co.uk' (10.10.1.41:3306) when checking monitor user credentials and permissions: Can't initialize character set unknown (path: compiled_in)
[Splitter Service] Failed to connect to server 'nnnn1.co.uk' (10.10.1.41:3306) when checking authentication user credentials and permissions: 2019 Can't initialize character set unknown (path: compiled_in)

If we change the galera hosts to use character set utf8, this works without issue.



 Comments   
Comment by Timofey Turenko [ 2016-11-02 ]

I've tried to reproduce it. I tried to issue SET GLOBAL character_set_server = 'utf8mb4'; and SET NAMES 'utf8mb4'; against all backend servers and then restart maxscale.
Maxscale works.

Comment by Simon Hanmer [ 2016-11-03 ]

I've just rebuilt our config - we're using these packages:

  • MariaDB-server 10.1.18
  • galera 25.3.14-1
  • Maxscale 2.0.1

I've pasted our /etc/my.cnf.d/server.cnf below (with nodenames and passwd hash obfuscated):

[mysqld]
binlog_format = ROW
bind-address=0.0.0.0
character_set_server=utf8mb4
collation_server=utf8mb4_unicode_520_ci
datadir = /var/lib/mysql
default_storage_engine = InnoDB
ignore_db_dirs = lost+found
ignore_db_dirs = backups
innodb_autoinc_lock_mode = 2
innodb_doublewrite = 1
innodb_file_per_table = 1
innodb_flush_log_at_trx_commit=0
log-error = /var/log/mariadb/mariadb.log
max_connections=1024
open_files_limit = 40960
query_cache_size = 0
socket=/var/lib/mysql/mysql.sock
wsrep_cluster_address = gcomm://nnnn1.co.uk,nnnn2.co.uk,nnnn3.co.uk,nnnn4.co.uk
wsrep_on = ON
wsrep_provider = /usr/lib64/galera/libgalera_smm.so
wsrep_provider_options="gcache.size=1G;gcache.page_size=1G"
wsrep_sst_method=xtrabackup-v2
wsrep_sst_auth=sst_user:*0FC21somelonghashgoeshereEE3FA023
wsrep_causal_reads = ON
wsrep_sync_wait = 1
wsrep_slave_threads=32

with this setup, the cluster runs and connects but maxscale won't connect saying the servers are down. However if I change the language configuration as below and restart the mariadb servers, maxscale can connect:

character_set_server=utf8   #changed from utf8mb4
#collation_server=utf8mb4_unicode_520_ci

Comment by Timofey Turenko [ 2016-12-29 ]

Reproduced, test added. Moving to developers

Comment by markus makela [ 2017-01-02 ]

This seems to be a problem with the character sets that are compiled into the Connector/C we are using. I took a look at the source code and noticed that the utf8mb4_unicode_520_ci is missing from the list of character sets that are compiled.

Comment by markus makela [ 2017-01-04 ]

Requires an update of the connector.

Comment by markus makela [ 2017-01-18 ]

Updated connector version to 2.3.2.

Generated at Thu Feb 08 04:03:08 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.