[MXS-3584] Invalid authentication message 'Unknown command' when persistent connections are used Created: 2021-06-01  Updated: 2021-08-02  Resolved: 2021-08-02

Status: Closed
Project: MariaDB MaxScale
Component/s: Core
Affects Version/s: 2.5.11
Fix Version/s: 2.5.14

Type: Bug Priority: Major
Reporter: Alex Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None
Environment:

Debian buster. Backend 10.4.19, 10.5.10


Sprint: MXS-SPRINT-133

 Description   

In the logs:

2021-06-01 13:41:22   info   : (4608237) (Read-Write-Service) > Autocommit: [enabled], trx is [not open], cmd: (0x03) COM_QUERY, plen: 550, type: QUERY_TYPE_READ, stmt: SET STATE
MENT max_statement_time = 60 FOR 
       SELECT 
         posts.post_id 
       FROM phpbb.search_wordlist 
       LEFT JOIN phpbb.search_wordmatch ON 
         search_wordmatch.word_id=search_wordlist.word_id 
         AND search_wordmatch.title_match = 1
       LEFT JOIN phpbb.posts FORCE index (f_p_t_i) ON 
         posts.post_id=search_wordmatch.post_id 
         AND posts.forum_id = 36 
       WHERE 
         search_wordlist.word_text = '324021' 
       AND posts.post_time > UNIX_TIMESTAMP() - 86400 * 30 
       LIMIT 1
      
2021-06-01 13:41:22   info   : (4608237) (flea) Sent COM_CHANGE_USER
2021-06-01 13:41:22   info   : (4608237) [readwritesplit] (Read-Write-Service) Connected to 'flea'
2021-06-01 13:41:22   info   : (4608237) [readwritesplit] (Read-Write-Service) Route query to slave: flea <
2021-06-01 13:41:22   info   : (4608237) (flea) COM_CHANGE_USER in progress, appending query to queue
2021-06-01 13:41:23   error  : (4608237) Invalid authentication message from backend 'flea'. Error code: 1047, Msg : #08S01: Unknown command
2021-06-01 13:41:23   info   : (4608237) [readwritesplit] (Read-Write-Service) Slave 'flea' failed: #HY000: Lost connection to backend server: connection closed by peer (flea: Generated event)
2021-06-01 13:41:23   info   : (4608237) [readwritesplit] (Read-Write-Service) Re-routing failed read after server 'flea' failed



 Comments   
Comment by Alex [ 2021-06-01 ]

Config:

https://jira.mariadb.org/browse/MXS-3578?focusedCommentId=190701&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-190701

Comment by Alex [ 2021-06-01 ]

Using this lib to connect: https://www.npmjs.com/package/mysql2

Comment by markus makela [ 2021-06-01 ]

Is this with or without persistent connections in MaxScale?

Comment by Alex [ 2021-06-01 ]

Between MaxScale and Backend or Application and Maxscale?

Comment by markus makela [ 2021-06-01 ]

MaxScale and the backend database servers.

Comment by Alex [ 2021-06-01 ]

yes. persitent connections enabled

Comment by Alex [ 2021-06-03 ]

I've set persistpoolmax=0 for all backends and the problem has disapeared.

Comment by markus makela [ 2021-06-03 ]

Thanks for confirming, I think this and MXS-3578 might be related to the similar problem but manifest in different ways.

Comment by markus makela [ 2021-06-21 ]

Once we release MaxScale 2.5.14, please try and see if this now works with persistent connections. If it does, then this is likely the same problem that was in MXS-3578. If not, we'll have to continue investigating this.

Comment by Kester Riley [ 2021-06-21 ]

Please note I am having this issue with MaxScale 2.5.13 with one of my customers currently as well.

Comment by markus makela [ 2021-07-23 ]

alexcool now that 2.5.14 is out, would it be possible for you to re-test and see if this still occurs?

Comment by markus makela [ 2021-08-02 ]

Closing as Fixed until, it's highly likely that this is fixed by the other fixes in 2.5.14. If this bug still happens with 2.5.14, please let us know and we'll reopen it.

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