[英]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.