Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-2256

hint "maxscale route to slave" does not work

    XMLWordPrintable

Details

    Description

      I have a mysql master with 2 slave

      =================my configure file begin
      [maxscale]
      threads=auto
      log_info=1
      log_debug=1

      [server1]
      type=server
      address=10.40.12.101
      port=3366
      protocol=MariaDBBackend

      [server2]
      type=server
      address=10.40.12.102
      port=3366
      protocol=MariaDBBackend

      [server3]
      type=server
      address=10.40.12.103
      port=3366
      protocol=MariaDBBackend

      [MariaDB-Monitor]
      type=monitor
      module=mariadbmon
      servers=server1,server2,server3
      user=lbadmin
      passwd=lbadmin
      monitor_interval=2000

      [Read-Only-Service]
      type=service
      router=readconnroute
      servers=server1,server2,server3
      user=lbadmin
      passwd=lbadmin
      router_options=slave,master

      [Read-Write-Service]
      type=service
      router=readwritesplit
      servers=server1,server2,server3
      user=lbadmin
      passwd=lbadmin
      router_options=master_accept_reads=true
      filters=Hint

      [Hint]
      type=filter
      module=hintfilter

      [MaxAdmin-Service]
      type=service
      router=cli
      [Read-Only-Listener]
      type=listener
      service=Read-Only-Service
      protocol=MariaDBClient
      port=4008

      [Read-Write-Listener]
      type=listener
      service=Read-Write-Service
      protocol=MariaDBClient
      port=4006

      [MaxAdmin-Listener]
      type=listener
      service=MaxAdmin-Service
      protocol=maxscaled
      socket=default

      =================my configure file end

      1. maxctrl list servers
        ┌─────────┬──────────────┬──────┬─────────────┬─────────────────┬──────┐
        │ Server │ Address │ Port │ Connections │ State │ GTID │
        ├─────────┼──────────────┼──────┼─────────────┼─────────────────┼──────┤
        │ server1 │ 10.40.12.101 │ 3366 │ 0 │ Master, Running │ │
        ├─────────┼──────────────┼──────┼─────────────┼─────────────────┼──────┤
        │ server2 │ 10.40.12.102 │ 3366 │ 0 │ Slave, Running │ │
        ├─────────┼──────────────┼──────┼─────────────┼─────────────────┼──────┤
        │ server3 │ 10.40.12.103 │ 3366 │ 0 │ Slave, Running │ │
        └─────────┴──────────────┴──────┴─────────────┴─────────────────┴──────┘

      hint "maxscale route to master" or "maxscale route to server server[1-3]" works fine
      but hint "maxscale route to slave" does not work

      =============debug log begin

      2019-01-11 13:59:43 info : [readwritesplit] Servers and router connection counts:
      2019-01-11 13:59:43 info : [readwritesplit] current operations : 0 in [10.40.12.101]:3366 RUNNING MASTER
      2019-01-11 13:59:43 info : [readwritesplit] current operations : 0 in [10.40.12.102]:3366 RUNNING SLAVE
      2019-01-11 13:59:43 info : [readwritesplit] current operations : 0 in [10.40.12.103]:3366 RUNNING SLAVE
      2019-01-11 13:59:43 info : [readwritesplit] Selected RUNNING MASTER in [10.40.12.101]:3366
      2019-01-11 13:59:43 info : [readwritesplit] Selected RUNNING SLAVE in [10.40.12.102]:3366
      2019-01-11 13:59:43 info : [readwritesplit] Selected RUNNING SLAVE in [10.40.12.103]:3366
      2019-01-11 13:59:43 info : Started Read-Write-Service client session [50] for 'lbadmin' from ::ffff:10.40.20.203
      2019-01-11 13:59:43 info : (50) [readwritesplit] > Autocommit: [enabled], trx is [not open], cmd: (0x03) COM_QUERY, plen: 37, type: QUERY_TYPE_READ|QUERY_TYPE_SYSVAR_READ, stmt: select @@version_comment limit 1
      2019-01-11 13:59:43 info : (50) [readwritesplit] Route query to master [10.40.12.101]:3366 <
      2019-01-11 13:59:43 info : (50) [readwritesplit] Reply complete, last reply from server1
      2019-01-11 13:59:43 info : (50) [readwritesplit] > Autocommit: [enabled], trx is [not open], cmd: (0x03) COM_QUERY, plen: 49, type: QUERY_TYPE_READ|QUERY_TYPE_SYSVAR_READ, stmt: select @@hostname – maxscale route to slave, Hint: HINT_ROUTE_TO_SLAVE
      2019-01-11 13:59:43 info : (50) [readwritesplit] Route query to master [10.40.12.101]:3366 <
      2019-01-11 13:59:43 info : (50) [readwritesplit] Reply complete, last reply from server1
      2019-01-11 13:59:43 info : (50) [readwritesplit] > Autocommit: [enabled], trx is [not open], cmd: (0x01) COM_QUIT, plen: 5, type: QUERY_TYPE_SESSION_WRITE, stmt:
      2019-01-11 13:59:43 info : (50) [readwritesplit] Session write, routing to all servers.
      2019-01-11 13:59:43 info : (50) [readwritesplit] Route query to master [10.40.12.101]:3366
      2019-01-11 13:59:43 info : (50) [readwritesplit] Route query to slave [10.40.12.102]:3366
      2019-01-11 13:59:43 info : (50) [readwritesplit] Route query to slave [10.40.12.103]:3366
      2019-01-11 13:59:43 info : Stopped Read-Write-Service client session [50]

      =============debug log end

      there's some issue in my configure? or bugs ?
      thanks for any reply!

      Attachments

        Activity

          People

            Unassigned Unassigned
            sdmei meishidong
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.