[MXS-1197] ERROR 1045 even if a master is running Created: 2017-03-21  Updated: 2017-04-03  Resolved: 2017-04-03

Status: Closed
Project: MariaDB MaxScale
Component/s: N/A
Affects Version/s: 2.1.0
Fix Version/s: 2.1.1

Type: Bug Priority: Major
Reporter: Fabrizio Assignee: markus makela
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

ubuntu 16.04 with mariadb 10.0.29


Sprint: 2017-31

 Description   

I have two server in master-slave replication.
Yesterday I had a failover and the master-slave roles were reverted.
The new slave was still up and running even if "stale"
The master was definitly running.
The connections to the read-write filter resulted in error:
ERROR 1045 (28000): failed to create new session

In this situation I have no high-availability.
I would expect that in such situation all my connections should be redirected on the running master.



 Comments   
Comment by markus makela [ 2017-03-27 ]

Did the output of maxadmin list servers show any server as the master or does the log file have a state change from slave to master?

Comment by Fabrizio [ 2017-03-27 ]

I had a switch from slave to master:
2017-03-21 10:09:54 notice : Server changed state: server2[xxx02-vrack.xxx.com:3306]: server_up. [Down] -> [Running]
2017-03-21 10:09:54 notice : Server changed state: server1[xxx01-vrack.xxx.com:3306]: lost_master. [Master, Stale Status, Running] -> [Running]
2017-03-21 10:09:54 error : [mysqlmon] No Master can be determined. Last known was hdb01-vrack.drivek.com:3306
2017-03-21 10:09:55 error : [readwritesplit] Couldn't find suitable Master from 2 candidates.
2017-03-21 10:09:55 error : Failed to create new router session for service 'Read-Write Service'. See previous errors for more details.
2017-03-21 10:09:58 error : [readwritesplit] Couldn't find suitable Master from 2 candidates.
2017-03-21 10:09:58 error : Failed to create new router session for service 'Read-Write Service'. See previous errors for more details.
2017-03-21 10:10:00 error : [readwritesplit] Couldn't find suitable Master from 2 candidates.
2017-03-21 10:10:00 error : Failed to create new router session for service 'Read-Write Service'. See previous errors for more details.
2017-03-21 10:10:03 error : [readwritesplit] Couldn't find suitable Master from 2 candidates.
2017-03-21 10:10:03 error : Failed to create new router session for service 'Read-Write Service'. See previous errors for more details.
2017-03-21 10:10:05 error : [readwritesplit] Couldn't find suitable Master from 2 candidates.

Comment by markus makela [ 2017-03-27 ]

It seems the replication between the two servers is broken and MaxScale only sees two standalone servers. Does the correct server get the master status once replication is working again?

Comment by Fabrizio [ 2017-03-27 ]

Yes, the replication was broken but the replication-manager elected a master and it worked correctly.
In this case I would have expected that maxscale uses only the master while ignoring the not-in-sync slave.
Otherwise the high-availability is not achievable through maxscale.
Am I wrong?

Comment by markus makela [ 2017-03-27 ]

In this case, you want to enable the new features added in the 2.1.1 version of MaxScale that handle this situation. Add detect_standalone_master=true to the mysqlmon configuration to enable the new features described here: https://mariadb.com/kb/en/mariadb-enterprise/6324/#detect_standalone_master

This should allow MaxScale to detect that replication-manager has performed a failover.

Comment by Fabrizio [ 2017-03-27 ]

Thank you, I was not aware about this feature.
I installed version 2.1.1 and enabled detect_standalone_master.
I don't think I will be able to give a feedback before the next master/slave malfunction.

Comment by markus makela [ 2017-04-03 ]

As this is normal behavior with the default settings, I'll close this as Not a Bug. If you find any problems with the new features, please open a different issue for those.

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