A
A
Alexander2021-04-02 12:24:30
ubuntu
Alexander, 2021-04-02 12:24:30

Why can't Maxscale get gtid_binlog_pos?

I have an active master > slave (ssl) replication, I put a maxscale proxy server on top, to automatically switch the master in case of an accident. Maxscale cannot get gtid_binlog_pos.

error : [mariadbmon] Can not select 'master' as a demotion target for failover because it does not have a 'gtid_binlog_pos' and unsafe failover is disabled.

Database: MariaDB 10.3.25
OS: Ubuntu 20.04

config maxscale:

threads=auto
log_info=1
log_debug=1
logdir=/opt/sslmaxscale/maxscale.log

[master]
type=server
address=192.168.89.234
port=3306
protocol=MariaDBBackend
ssl=required
ssl_ca_cert=/opt/sslmaxscale/ca-cert.pem
ssl_cert=/opt/sslmaxscale/server-cert.pem
ssl_key=/opt/sslmaxscale/server-key.pem

[slave]
type=server
address=192.168.89.231
port=3306
protocol=MariaDBBackend
ssl=required
ssl_ca_cert=/opt/sslmaxscale/ca-cert.pem
ssl_cert=/opt/sslmaxscale/server-cert.pem
ssl_key=/opt/sslmaxscale/server-key.pem

[MariaDB-Monitor]
type=monitor
module=mariadbmon
servers=master,slave
user=repl
password=password
monitor_interval=2000
auto_rejoin=true
auto_failover=true
replication_master_ssl=true


Naturally, I checked with my hands if there is binlog_pos:
MariaDB [(none)]> SELECT @@global.gtid_binlog_pos;  @@global.gtid_binlog_pos - 1-1-517

I also added the enforce_simple_topology=true option to the monitor . The error message has changed, but the essence remains the same.

Cluster gtid domain is unknown. This is usually caused by the cluster never having a master server while MaxScale was running

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2021-04-13
@MonsterCatz

A problem has been detected. The variable skip-network = 0 was missing from the database configuration. By default it is skip-networking=1. This meant that I could only connect via localhost.
But it's unclear how replication worked with skip-network = 1... Most likely a mariadb bug.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question