简体   繁体   English

maxscale 找不到 gtid_binlog_pos

[英]maxscale cannot find gtid_binlog_pos

I have active master - slave (ssl) replication.我有活动的主从 (ssl) 复制。 I installed maxscale, set a configuration, but maxscale cannot get gtid_binlog_pos我安装了maxscale,设置了配置,但是maxscale无法获取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.错误:[mariadbmon] 不能将 select 'master' 作为故障转移的降级目标,因为它没有 'gtid_binlog_pos' 并且禁用了不安全的故障转移。

Database: MariaDB 10.3.25 OS: Ubuntu 20.04数据库:MariaDB 10.3.25 操作系统:Ubuntu 20.04

my 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 ```

Ssl connection in mysql working, i checked it. And gtid_binlog_pos i can got


MariaDB [(none)]> SELECT @@global.gtid_binlog_pos;  @@global.gtid_binlog_pos - 1-1-517                  

Problem found.发现问题。 The skip-networking = 0 variable was missing in the database configuration.数据库配置中缺少skip-networking = 0变量。 By default, it was set to 1. This meant that I could only connect via localhost.默认情况下,它设置为 1。这意味着我只能通过 localhost 连接。

But it's not clear how replication worked with skip-networking = 1...但目前尚不清楚复制如何与 skip-networking = 1 一起工作......

That error is logged whenever the replication isn't set up in a way that would allow safe failover to occur.只要没有以允许安全故障转移的方式设置复制,就会记录该错误。 This usually tells that there's something wrong with either the user the monitor is configured to use or that the replication was started in a way that isn't compatible with the automatic server management in MaxScale.这通常表明监视器配置使用的用户有问题,或者复制是以与 MaxScale 中的自动服务器管理不兼容的方式启动的。

You can disable this safety check and force the monitor to create a simple topology by adding enforce_simple_topology=true to the monitor definition.您可以禁用此安全检查并通过将enforce_simple_topology=true添加到监视器定义来强制监视器创建简单拓扑。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM