[MXS-3335] MaxScale 2.5.6 and Xpand Direct connection issue with xpandmon Created: 2020-12-09  Updated: 2020-12-11  Resolved: 2020-12-11

Status: Closed
Project: MariaDB MaxScale
Component/s: xpandmon
Affects Version/s: 2.5
Fix Version/s: 2.5.6

Type: Bug Priority: Blocker
Reporter: Rahul Joshi (Inactive) Assignee: Esa Korhonen
Resolution: Fixed Votes: 0
Labels: None
Environment:

MaxScale Version:
[root@karma150 ~]# maxscale --version-full
MaxScale 2.5.6 - 4d939d406f175cc4143f7a3b22b475cfdc3c95f1
CMake flags: -DBUILD_TESTS=N -DBUILD_MMMON=Y -DBUILD_CDC=Y -DBUILD_GUI=Y -DPACKAGE=Y -DDISTRIB_SUFFIX=rhel.7

Xpand Direct version:
Cluster Version: Xpand-glassbutte-16694



 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            │      │
└──────────────────────────┴─────────────────────────────┴──────┴─────────────┴─────────────────┴──────┘



 Comments   
Comment by Manjinder Nijjar [ 2020-12-09 ]

Marking this blocker since this prevents use of MaxScale with rebranded Xpand which is going GA with 10.5 ES.

Generated at Thu Feb 08 04:20:40 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.