[MXS-2143] Unable to connect to maxscale when dbusers reloads Created: 2018-11-06  Updated: 2018-11-22  Resolved: 2018-11-22

Status: Closed
Project: MariaDB MaxScale
Component/s: Authenticator
Affects Version/s: 2.1.17
Fix Version/s: 2.2.2

Type: Bug Priority: Major
Reporter: Igor V. Lovalev Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None
Environment:

Centos 6.9



 Description   

Hi there! I have some issue with maxscale when dbusers reloads. Maxscale reloads users 2 times at day: 00:10:01 and 12:10:01 o'clock. And everytime when it's done, users can't connect to mysql through maxscale. Logs and config below.

2018-10-27 00:10:01   warning: [MySQLAuth] ss_splitter: login attempt for user 'ss_local'@[192.168.1.36]:38594, authentication failed.
2018-10-27 00:10:01   warning: [MySQLAuth] ss_splitter: login attempt for user 'ss_local'@[192.168.1.22]:35068, authentication failed.
2018-10-27 00:10:01   warning: [MySQLAuth] ss_splitter: login attempt for user 'ss_local'@[192.168.1.37]:59714, authentication failed.
2018-10-27 00:10:01   notice : [MySQLAuth] [ss_splitter] Loaded 75 MySQL users for listener ss_listener.
2018-10-27 00:10:01   warning: [MySQLAuth] ss_splitter: login attempt for user 'maxscale_pinger'@[192.168.50.34]:47056, authentication failed.
2018-10-27 12:10:02   warning: [MySQLAuth] ss_splitter: login attempt for user 'ss_local'@[192.168.1.52]:43856, authentication failed.
2018-10-27 12:10:02   warning: [MySQLAuth] ss_splitter: login attempt for user 'ss_local'@[192.168.1.110]:36224, authentication failed.
2018-10-27 12:10:02   warning: [MySQLAuth] ss_splitter: login attempt for user 'ss_local'@[192.168.1.48]:35656, authentication failed.
2018-10-27 12:10:02   warning: [MySQLAuth] ss_splitter: login attempt for user 'ss_local_mnt_n'@[192.168.1.32]:47066, authentication failed.
2018-10-27 12:10:02   warning: [MySQLAuth] ss_splitter: login attempt for user 'ss_local'@[192.168.1.30]:43196, authentication failed.
2018-10-27 12:10:02   warning: [MySQLAuth] ss_splitter: login attempt for user 'ss_local'@[192.168.1.109]:52420, authentication failed.
2018-10-27 12:10:02   warning: [MySQLAuth] ss_splitter: login attempt for user 'k_local'@[192.168.1.27]:46920, authentication failed.
2018-10-27 12:10:02   warning: [MySQLAuth] ss_splitter: login attempt for user 'k_local'@[192.168.1.27]:46924, authentication failed.
2018-10-27 12:10:02   warning: [MySQLAuth] ss_splitter: login attempt for user 'ss_local'@[192.168.1.38]:51986, authentication failed.
2018-10-27 12:10:02   warning: [MySQLAuth] ss_splitter: login attempt for user 'ss_local_mnt_n'@[192.168.1.32]:47074, authentication failed.
2018-10-27 12:10:02   warning: [MySQLAuth] ss_splitter: login attempt for user 'ss_local'@[192.168.1.51]:46032, authentication failed.
2018-10-27 12:10:02   warning: [MySQLAuth] ss_splitter: login attempt for user 'ss_local_mnt_n'@[192.168.1.32]:47076, authentication failed.
2018-10-27 12:10:02   warning: [MySQLAuth] ss_splitter: login attempt for user 'ss_local'@[192.168.1.58]:33358, authentication failed.
2018-10-27 12:10:02   warning: [MySQLAuth] ss_splitter: login attempt for user 'ss_local_mnt_n'@[192.168.1.32]:47078, authentication failed.
2018-10-27 12:10:02   warning: [MySQLAuth] ss_splitter: login attempt for user 'ss_local'@[192.168.1.52]:43874, authentication failed. (subsequent similar messages suppressed for 10000 milliseconds)
2018-10-27 12:10:02   notice : [MySQLAuth] [ss_splitter] Loaded 75 MySQL users for listener ss_listener.
2018-10-28 00:10:01   warning: [MySQLAuth] ss_splitter: login attempt for user 'ss_local'@[192.168.1.50]:54272, authentication failed.
2018-10-28 00:10:01   warning: [MySQLAuth] ss_splitter: login attempt for user 'ss_local'@[192.168.1.23]:41204, authentication failed.

#
[maxscale]
threads=auto
maxlog=1
syslog=0
 
# filters
[Hint]
type=filter
module=hintfilter
 
# servers
[ss_1]
type=server
address=mysql-11.local
port=3306
protocol=MySQLBackend
s_weight=0
 
[ss_2]
type=server
address=mysql-22.local
port=3306
protocol=MySQLBackend
s_weight=0
 
[ss_3]
type=server
address=mysql-3.local
port=3306
protocol=MySQLBackend
s_weight=0
 
[ss_4]
type=server
address=mysql-4.local
port=3306
protocol=MySQLBackend
s_weight=0
 
[ss_5]
type=server
address=mysql-1.local
port=3306
protocol=MySQLBackend
s_weight=10
 
[ss_6]
type=server
address=mysql-2.local
port=3306
protocol=MySQLBackend
s_weight=10
 
# listeners
[ss_listener]
type=listener
service=ss_splitter
protocol=MySQLClient
address=192.168.1.2
port=3306
 
# monitors
[ss_monitor]
type=monitor
module=mysqlmon
servers=ss_1,ss_2,ss_3,ss_4,ss_5,ss_6
user=maxscale
 
passwd=YEJ3LKJDFKHAFA
events=master_down
failcount=3
backend_connect_timeout=10
backend_write_timeout=10
backend_read_timeout=10
monitor_interval=15000
detect_stale_master=true
detect_stale_slave=true
 
# read/write splitters
[ss_splitter]
type=service
router=readwritesplit
servers=ss_1,ss_2,ss_3,ss_4,ss_5,ss_6
user=maxscale
passwd=YEJ3LKJDFKHAFA
max_slave_connections=1
filters=Hint
disable_sescmd_history=true
slave_selection_criteria=LEAST_GLOBAL_CONNECTIONS
weightby=s_weight
 
# admin section
[MaxAdmin_Service]
type=service
router=cli
 
[MaxAdmin_Listener]
type=listener
service=MaxAdmin_Service
protocol=maxscaled
address=127.0.0.1
port=6603



 Comments   
Comment by markus makela [ 2018-11-06 ]

This is likely caused by the way the users are stored in 2.1. I'd recommend upgrading to 2.2, where the architecture of the authentication has been rewritten to better suit parallel authentication, and trying whether it solves the issue.

Comment by Igor V. Lovalev [ 2018-11-06 ]

Hi there, Markus! Nice to see you again!
Thanks, i'll see if i can update my maxscale on production. If u don't mind, i'll ask another one question. On my test maxscale, i have added some user to mysql backends, and i can to connect with this user to any mysql server (master/slave), but i can't to connect with this user through maxscale. I have tried to reload userdb with maxadmin -pmariadb reload dbusers ss_splitter, have tried to restart maxscale, but when i execute maxadmin -pmariadb show dbusers max_splitter - there is no my new user. In logs (with debug) i can't see any dbusers errors. Maybe it's not a bug, but i'm doing something wrong?

Comment by markus makela [ 2018-11-06 ]

I'd recommend taking a look at the MaxScale Troubleshooting article, it has some helpful steps on debugging authentication related issues.

Comment by markus makela [ 2018-11-22 ]

Fixed in 2.2 by having thread-local authenticators.

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