[MXS-1606] After enabling detect_replication_lag, MariaDBMon does not create the maxscale_schema.replication_heartbeat database and table Created: 2018-01-15  Updated: 2018-01-19  Resolved: 2018-01-19

Status: Closed
Project: MariaDB MaxScale
Component/s: mariadbmon
Affects Version/s: 2.2.1
Fix Version/s: 2.2.2

Type: Bug Priority: Major
Reporter: Wagner Bianchi (Inactive) Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None
Environment:

CentOS 7.2


Sprint: MXS-SPRINT-50

 Description   

Folks,

Maxscale is running, if I stop it and manually edit the monitor file at /var/lib/maxscale/maxscale.cnf.d, enabling the detect_replication_lag, I see that MariaDBMon (and MySQLMon as well, don't create the database maxscale_schema and the table heartbeat.

#: changing configs
[root@box01 ~]# vi /var/lib/maxscale/maxscale.cnf.d/cluster-monitor.cnf
[root@box01 ~]# grep lag /var/lib/maxscale/maxscale.cnf.d/cluster-monitor.cnf
detect_replication_lag=true
 
#: logs
2018-01-15 16:56:32   notice : MaxScale started with 1 worker threads, each with a stack size of 8388608 bytes.
2018-01-15 16:56:32   info   : [qc_sqlite] In-memory sqlite database successfully opened for thread 139803373354112.
 
2018-01-15 16:56:32   error  : [mariadbmon] Error creating maxscale_schema.replication_heartbeat table in Master server: Unknown database 'maxscale_schema'
 
2018-01-15 16:56:32   error  : [mariadbmon] Error deleting from maxscale_schema.replication_heartbeat table: [DELETE FROM maxscale_schema.replication_heartbeat WHERE master_timestamp < 1515862592], Table 'maxscale_schema.replication_heartbeat' doesn't exist
2018-01-15 16:56:32   error  : [mariadbmon] Error updating maxscale_schema.replication_heartbeat table: [UPDATE maxscale_schema.replication_heartbeat SET master_timestamp = 1516035392 WHERE master_server_id = 2 AND maxscale_id = 0], Table 'maxscale_schema.replication_heartbeat' doesn't exist
2018-01-15 16:56:32   error  : [mariadbmon] error: replication heartbeat: failed selecting from hearthbeat table of 192.168.50.13:3306 : [SELECT master_timestamp FROM maxscale_schema.replication_heartbeat WHERE maxscale_id = 0 AND master_server_id = 2], Table 'maxscale_schema.replication_heartbeat' doesn't exist
2018-01-15 16:56:33   error  : [mariadbmon] Error creating maxscale_schema.replication_heartbeat table in Master server: Unknown database 'maxscale_schema'
2018-01-15 16:56:33   error  : [mariadbmon] Error deleting from maxscale_schema.replication_heartbeat table: [DELETE FROM maxscale_schema.replication_heartbeat WHERE master_timestamp < 1515862593], Table 'maxscale_schema.replication_heartbeat' doesn't exist
 
#: current monitor user's grants
MariaDB [(none)]> show grants for maxuser@'192.168.50.11'\G
*************************** 1. row ***************************
Grants for maxuser@192.168.50.11: GRANT ALL PRIVILEGES ON *.* TO 'maxuser'@'192.168.50.11' IDENTIFIED BY PASSWORD '*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9'
1 row in set (0.00 sec)

Is it correct or we need to review something else?

Thanks, folks!



 Comments   
Comment by markus makela [ 2018-01-19 ]

The reason for the failure was that the database was missing. It is now created if it does not exist.

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