繁体   English   中英

Maxscale:结合readwritesplit和schemarouter

[英]Maxscale: combine readwritesplit and schemarouter

我正在尝试设置maxscale以使用schemarouter和readwritesplit。 我的mysql数据库有很多碎片。 每个分片都有一个从属,因此其想法是在主服务器上使用一个schemarouter,在从属服务器上使用一个schemarouter代理所有分片。 然后在readwritesplit中使用这2个服务。

This cause the following issue:
2017-02-10 14:57:48   error  : Failure loading users data from backend [10.161.66.145:4009] for service [Splitter Service]. MySQL error 2013, Lost connection to MySQL server at 'handshake: waiting for inital communication packet', system error: 110
2017-02-10 14:57:52   error  : Failure loading users data from backend [10.161.66.145:4008] for service [Splitter Service]. MySQL error 2013, Lost connection to MySQL server at 'reading authorization packet', system error: 110
2017-02-10 14:57:52   error  : Unable to get user data from backend database for service [Splitter Service]. Failed to connect to any of the backend databases.

你能帮忙的话,我会很高兴。

我的schemarouter都工作正常。 这是readwritesplit配置:

[max_ro]
type=server
address=10.10.10.10
port=4009
protocol=MySQLBackend

[max_rw]
type=server
address=10.10.10.10
port=4008
protocol=MySQLBackend

[Splitter Service]
type=service
router=readwritesplit
servers=max_ro,max_rw
user=maxscale
passwd=maxscale

[Splitter Listener]
type=listener
service=Splitter Service
protocol=MySQLClient
port=4010

谢谢

该错误很可能是由于readsplitsplit服务尚未启动而引起的。 MariaDB Jira上有关于此行为的错误报告。

如果MaxScale启动后,分片服务正常工作,并且不再记录任何错误,则说明一切正常,并且可以按照此错误报告中的说明忽略错误

解决此问题的另一种方法是将配置分为两部分,并使用单独的MaxScale实例。 一个用于分片服务,另一个用于读写拆分服务。 这确实增加了一层额外的复杂性,因为需要启动两个服务而不是一个。

暂无
暂无

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

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