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

MaxScale 2.5.6 and Xpand Direct connection issue with xpandmon

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.5.6
    • Component/s: xpandmon
    • Labels:
      None
    • Environment:

      Description

      I tried using xpandmon on MaxScale 2.5.6 , but this gives error:

      [root@vqc004d ~]#  mysql -h karma150 -u maxscale -pmaxscale_pw -P 4008
      ERROR 1045 (28000): Access denied for user 'maxscale'@'10.2.13.246' (using password: YES)
      

      MaxScale log:

      2020-12-08 22:35:23   notice : Starting a total of 1 services...
      2020-12-08 22:35:23   notice : (Backend-Read-Only-Listener) Listening for connections at [0.0.0.0]:4008
      2020-12-08 22:35:23   warning: Service 'Backend-Read-Only-Service' has a listener but no servers
      2020-12-08 22:35:23   notice : Service 'Backend-Read-Only-Service' started (1/1)
      2020-12-08 22:35:24   notice : Server '@@Backend-Monitor:node-2' version: 5.0.45-Xpand-glassbutte-16694
      2020-12-08 22:35:24   warning: Service user 'maxscale' of service 'Backend-Read-Only-Service' does not have 'SHOW DATABASES' or a similar global privilege on '@@Backend-Monitor:node-2'. This may cause authentication errors on clients logging in to a specific database.
      2020-12-08 22:35:24   notice : Read 10 user@host entries from '@@Backend-Monitor:node-2' for service 'Backend-Read-Only-Service'.
      2020-12-08 22:36:28   info   : Accept authentication from 'admin', using password. Request: /v1/servers
      2020-12-08 22:38:37   info   : (1) Found matching user 'maxscale'@'%' for client 'maxscale'@'10.2.13.246' with sufficient privileges.
      2020-12-08 22:38:37   warning: (1) [mariadbclient] Authentication failed for user 'maxscale'@[10.2.13.246] to service 'Backend-Read-Only-Service'. Originating listener: 'Backend-Read-Only-Listener'. MariaDB error: 'Access denied for user 'maxscale'@'10.2.13.246' (using password: YES)'.
      2020-12-08 22:38:37   info   : Stopped Backend-Read-Only-Service client session [1]
      2020-12-08 22:38:37   warning: Service user 'maxscale' of service 'Backend-Read-Only-Service' does not have 'SHOW DATABASES' or a similar global privilege on '@@Backend-Monitor:node-2'. This may cause authentication errors on clients logging in to a specific database.
      2020-12-08 22:38:37   info   : Read 10 user@host entries from '@@Backend-Monitor:node-2' for service 'Backend-Read-Only-Service'. The data was identical to existing user data.
      2020-12-08 22:39:37   info   : Accept authentication from 'admin', using password. Request: /v1/servers
      

      Permissions granted on Xpand Direct:

      CREATE USER 'maxscale'@'%' IDENTIFIED BY 'maxscale_pw';
          GRANT SELECT ON system.membership TO 'maxscale'@'%';
          GRANT SELECT ON system.nodeinfo TO 'maxscale'@'%';
          GRANT SELECT ON system.softfailed_nodes TO 'maxscale'@'%';
          GRANT SUPER ON *.* TO 'maxscale'@'%’;
      MySQL [system]> show grants for maxscale@'%';
      +---------------------------------------------------------------+
      | Grants for maxscale@%                                         |
      +---------------------------------------------------------------+
      | GRANT SUPER ON *.* TO 'maxscale'@'%'                          |
      | GRANT SELECT ON `system`.`membership` TO 'maxscale'@'%'       |
      | GRANT SELECT ON `system`.`nodeinfo` TO 'maxscale'@'%'         |
      | GRANT SELECT ON `system`.`softfailed_nodes` TO 'maxscale'@'%' |
      +---------------------------------------------------------------+
      

      There is no frontend MDB involved.

      MaxScale config file:

      [root@karma150 ~]# cat /etc/maxscale.cnf
      [maxscale]
      log_info=1
      logdir=/data/clustrix/log
      threads=auto
       
      # ------------------------------
      # Config to connect to backend directly:
       
      [karma055-backend]
      type=server
      address=karma055.colo.sproutsys.com
      port=3306
      protocol=MariaDBBackend
       
      # Backend specific monitor and router:
      [Backend-Monitor]
      type=monitor
      module=xpandmon
      servers=karma055-backend
      user=maxscale
      password=maxscale_pw
      monitor_interval=10000
      #dynamic_node_detection=false
      #health_check_port=3581
       
      [Backend-Read-Only-Service]
      type=service
      router=readconnroute
      user=maxscale
      password=maxscale_pw
      router_options=running
      cluster=Backend-Monitor
       
      [Backend-Read-Only-Listener]
      type=listener
      service=Backend-Read-Only-Service
      protocol=MariaDBClient
      address=0.0.0.0
      port=4008
      

      [root@karma150 ~]# maxctrl list servers
      ┌──────────────────────────┬─────────────────────────────┬──────┬─────────────┬─────────────────┬──────┐
      │ Server                   │ Address                     │ Port │ Connections │ State           │ GTID │
      ├──────────────────────────┼─────────────────────────────┼──────┼─────────────┼─────────────────┼──────┤
      │ @@Backend-Monitor:node-3 │ 10.2.15.126                 │ 3306 │ 0           │ Master, Running │      │
      ├──────────────────────────┼─────────────────────────────┼──────┼─────────────┼─────────────────┼──────┤
      │ @@Backend-Monitor:node-1 │ 10.2.15.139                 │ 3306 │ 0           │ Master, Running │      │
      ├──────────────────────────┼─────────────────────────────┼──────┼─────────────┼─────────────────┼──────┤
      │ @@Backend-Monitor:node-2 │ 10.2.15.144                 │ 3306 │ 0           │ Master, Running │      │
      ├──────────────────────────┼─────────────────────────────┼──────┼─────────────┼─────────────────┼──────┤
      │ karma055-backend         │ karma055.colo.sproutsys.com │ 3306 │ 0           │ Down            │      │
      └──────────────────────────┴─────────────────────────────┴──────┴─────────────┴─────────────────┴──────┘
      

        Attachments

          Activity

            People

            Assignee:
            esa.korhonen Esa Korhonen
            Reporter:
            rahul.joshi@mariadb.com Rahul Joshi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: