Comments - MaxScale, "No Master can be determined"

5 years, 6 months ago Sam

module=galeramon was in comments in maxscale.cnf.

Trying to copy paste again:

[maxscale]
threads=auto
log_trace=1

[server1]
type=server
address=172.17.0.3
port=3306
protocol=MariaDBBackend

[server2]
type=server
address=172.17.0.4
port=3306
protocol=MariaDBBackend

[server3]
type=server
address=172.17.0.5
port=3306
protocol=MariaDBBackend

[WriteService]
type=service
router=readconnroute
router_options=master
servers=server1,server2,server3
user=maxscale
passwd=paswd

[ReadService]
type=service
router=readconnroute
router_options=slave
servers=server1,server2,server3
user=maxscale
passwd=paswd

[WriteListener]
type=listener
service=WriteService
protocol=MariaDBClient
port=4306
## socket=/tmp/ClusterMaster

[ReadListener]
type=listener
service=ReadService
protocol=MariaDBClient
#protocol=MySQLClient
port=4307

[ReplicationMonitor]
type=monitor
module=mariadbmon
servers=server1,server2,server3
user=maxscale
passwd=paswd
monitor_interval=1000

[CLI]
type=service
router=cli

[CLIListener]
type=listener
service=CLI
protocol=maxscaled
socket=default

 
5 years, 6 months ago Sam

All grants were tried to be given. When maxscale is started, the error appears, "No Master can be determined".

systemctl status maxscale
● maxscale.service - MariaDB MaxScale Database Proxy
   Loaded: loaded (/lib/systemd/system/maxscale.service; disabled; vendor preset: enabled)
   Active: active (running) since to 2018-10-18 07:59:45 EEST; 6s ago
  Process: 8512 ExecStart=/usr/bin/maxscale (code=exited, status=0/SUCCESS)
  Process: 8508 ExecStartPre=/usr/bin/install -d /var/run/maxscale -o maxscale -g maxscale (code=exited, status=0/SUCCESS)
 Main PID: 8516 (maxscale)
    Tasks: 9
   Memory: 6.6M
      CPU: 144ms
   CGroup: /system.slice/maxscale.service
           └─8516 /usr/bin/maxscale

loka 18 07:59:45 mycomputer maxscale[8516]: [MySQLAuth] Added user: INSERT OR REPLACE INTO mysqlauth_users VALUES ('cm', '172.17.0.2', NULL, 1, '...
loka 18 07:59:45 mycomputer maxscale[8516]: [MySQLAuth] Added user: INSERT OR REPLACE INTO mysqlauth_users VALUES ('maxscale', '127.0.0.1', NULL, 1, '...
loka 18 07:59:45 mycomputer maxscale[8516]: [MySQLAuth] Added user: INSERT OR REPLACE INTO mysqlauth_users VALUES ('maxscale', '127.0.0.%', NULL, 1, '...
loka 18 07:59:45 mycomputer maxscale[8516]: [MySQLAuth] Added user: INSERT OR REPLACE INTO mysqlauth_users VALUES ('cm', '127.0.0.1', NULL, 1, '...
loka 18 07:59:45 mycomputer maxscale[8516]: [MySQLAuth] Added user: INSERT OR REPLACE INTO mysqlauth_users VALUES ('maxscale', '<laptop_ip>', NULL, 1, '...
loka 18 07:59:45 mycomputer maxscale[8516]: [MySQLAuth] Added user: INSERT OR REPLACE INTO mysqlauth_users VALUES ('myuser', '172.17.0.2', 'mysql', 0, '...
loka 18 07:59:45 mycomputer maxscale[8516]: [MySQLAuth] Added user: INSERT OR REPLACE INTO mysqlauth_users VALUES ('maxscale', '172.17.0.2', 'mysql', 1, '...
loka 18 07:59:45 mycomputer maxscale[8516]: [MySQLAuth] Added user: INSERT OR REPLACE INTO mysqlauth_users VALUES ('maxscale', '127.0.0.1', 'mysql', 1, '...
loka 18 07:59:45 mycomputer maxscale[8516]: [MySQLAuth] Added user: INSERT OR REPLACE INTO mysqlauth_users VALUES ('maxscale', '<laptop_ip>', 'mysql', 1, '
loka 18 07:59:45 mycomputer maxscale[8516]: [mariadbmon] No Master can be determined   

Following grants were given:

grant all privileges on *.* to 'maxscale'@'127.0.0.1' with grant option;

grant all privileges on *.* to 'maxscale'@'<laptop_ip>' with grant option;
 
5 years, 6 months ago Sam

In logs, maxscale otherwise starts up:

2018-10-18 07:59:45   info   : [MySQLAuth] Added user: INSERT OR REPLACE INTO mysqlauth_users VALUES ('maxscale', '127.0.0.1', 'mysql', 1, '4ACFE3202A5FF5CF467898FC58AAB1D615029441')
2018-10-18 07:59:45   info   : [MySQLAuth] Added user: INSERT OR REPLACE INTO mysqlauth_users VALUES ('maxscale', '10.144.114.162', 'mysql', 1, '4ACFE3202A5FF5CF467898FC58AAB1D615029441')
2018-10-18 07:59:45   notice : [MySQLAuth] [ReadService] Loaded 15 MySQL users for listener ReadListener.
2018-10-18 07:59:45   notice : Listening for connections at [::]:4307 with protocol MySQL
2018-10-18 07:59:45   info   : Started session [2] for ReadService service 
2018-10-18 07:59:45   notice : Service 'ReadService' started (2/3)
2018-10-18 07:59:45   notice : Listening for connections at [/tmp/maxadmin.sock]:0 with protocol MaxScale Admin
2018-10-18 07:59:45   info   : Started session [3] for CLI service 
2018-10-18 07:59:45   notice : Service 'CLI' started (3/3)
2018-10-18 07:59:45   notice : Started MaxScale log flusher.
2018-10-18 07:59:45   info   : [qc_sqlite] In-memory sqlite database successfully opened for thread 140506755454720.
2018-10-18 07:59:45   info   : [qc_sqlite] In-memory sqlite database successfully opened for thread 140506747062016.
2018-10-18 07:59:45   notice : Started REST API on [127.0.0.1]:8989
2018-10-18 07:59:45   info   : [qc_sqlite] In-memory sqlite database successfully opened for thread 140506730276608.
2018-10-18 07:59:45   info   : [qc_sqlite] In-memory sqlite database successfully opened for thread 140506738669312.
2018-10-18 07:59:45   notice : MaxScale started with 4 worker threads, each with a stack size of 8388608 bytes.

In other window: No Master can be determined

Tried to set as master, but it did not help.

MaxScale> set server server1 master

in logs:

2018-10-18 08:09:36   info   : (4) [cli] MaxAdmin: set server server1 master
2018-10-18 08:09:36   notice : Server changed state: server1[172.17.0.3:3306]: lost_master. [Master, Running] -> [Running]

All servers are in Running state (not as master / slave states):

MaxScale> list servers
Servers.
-------------------+-----------------+-------+-------------+--------------------
Server             | Address         | Port  | Connections | Status              
-------------------+-----------------+-------+-------------+--------------------
server1            | 172.17.0.3      |  3306 |           0 | Running
server2            | 172.17.0.4      |  3306 |           0 | Running
server3            | 172.17.0.5      |  3306 |           0 | Running
-------------------+-----------------+-------+-------------+--------------------


 
5 years, 6 months ago Sam

Same happens also with readwritesplit.

 
5 years, 6 months ago Markus Mäkelä

Is it a Galera cluster or a cluster with master-slave replication?

 
5 years, 6 months ago Sam

Hi! It is not galera cluster. It is MaxScale with Master Slave Slave (M-S-S) configuration. (M-S would be enough too.) I have tried with readwritesplit and readconnroute. There may be something basic missing. Grants given incorrectly? Something else missing / not executed?

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.