mysqlfabric commands
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group lookup_servers mysql-ha-group
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
server_uuid address status mode weight
———————————— ——————- ——- ———- ——
4a914fd4-1eec-11e5-972b-005056bb627d 10.116.175.107:3306 PRIMARY READ_WRITE 1.0
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group remove mysql-ha-group 10.116.175.107:3306
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
ServerError: Cannot remove server (4a914fd4-1eec-11e5-972b-005056bb627d), which is master in group (mysql-ha-group). Please, demote it first.
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group demote mysql-ha-group
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
uuid finished success result
———————————— ——– ——- ——
32041f81-a475-42b9-a9ba-81c8284bb5a1 1 1 1
state success when description
—– ——- ————- ————————————————————-
3 2 1.43574e+09 Triggered by <mysql.fabric.events.Event object at 0x1745090>.
4 2 1.43574e+09 Executing action (_block_write_demote).
5 2 1.43574e+09 Executed action (_block_write_demote).
3 2 1.43574e+09 Triggered by <mysql.fabric.events.Event object at 0x1745110>.
4 2 1.43574e+09 Executing action (_wait_slaves_demote).
5 2 1.43574e+09 Executed action (_wait_slaves_demote).
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group lookup_servers mysql-ha-group
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
server_uuid address status mode weight
———————————— ——————- ——— ——— ——
4a914fd4-1eec-11e5-972b-005056bb627d 10.116.175.107:3306 SECONDARY READ_ONLY 1.0
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group remove mysql-ha-group 10.116.175.107:3306
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
uuid finished success result
———————————— ——– ——- ——
3682fc69-aea9-4d99-9302-4cbc31a00ad6 1 1 1
state success when description
—– ——- ————- ————————————————————-
3 2 1.43574e+09 Triggered by <mysql.fabric.events.Event object at 0x16cec90>.
4 2 1.43574e+09 Executing action (_remove_server).
5 2 1.43574e+09 Executed action (_remove_server).
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group lookup_servers mysql-ha-group
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
server_uuid address status mode weight
———– ——- —— —- ——
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group remove mysql-ha-group 10.116.175.107:3306
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
ServerError: Cannot remove server (4a914fd4-1eec-11e5-972b-005056bb627d), which is master in group (mysql-ha-group). Please, demote it first.
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group demote mysql-ha-group
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
uuid finished success result
———————————— ——– ——- ——
4bd02dfe-df97-4555-9673-faff3e87cbc4 1 1 1
state success when description
—– ——- ————- ————————————————————-
3 2 1.43574e+09 Triggered by <mysql.fabric.events.Event object at 0x1745090>.
4 2 1.43574e+09 Executing action (_block_write_demote).
5 2 1.43574e+09 Executed action (_block_write_demote).
3 2 1.43574e+09 Triggered by <mysql.fabric.events.Event object at 0x1745110>.
4 2 1.43574e+09 Executing action (_wait_slaves_demote).
5 2 1.43574e+09 Executed action (_wait_slaves_demote).
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group lookup_servers mysql-ha-group
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
server_uuid address status mode weight
———————————— ——————- ——— ——— ——
4a914fd4-1eec-11e5-972b-005056bb627d 10.116.175.107:3306 SECONDARY READ_ONLY 1.0
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group remove mysql-ha-group 10.116.175.107:3306
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
uuid finished success result
———————————— ——– ——- ——
e5421a4a-20b0-49b1-a65d-9f7ab6609c44 1 1 1
state success when description
—– ——- ————- ————————————————————-
3 2 1.43574e+09 Triggered by <mysql.fabric.events.Event object at 0x16cec90>.
4 2 1.43574e+09 Executing action (_remove_server).
5 2 1.43574e+09 Executed action (_remove_server).
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group lookup_servers mysql-ha-group
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
server_uuid address status mode weight
———– ——- —— —- ——
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group lookup_servers mysql-ha-group
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
server_uuid address status mode weight
———– ——- —— —- ——
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group add mysql-ha-group 10.40.87.36:3306
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
uuid finished success result
———————————— ——– ——- ——
b622b447-d14f-4826-b943-b1c9ad6d3132 1 1 1
state success when description
—– ——- ————- ————————————————————-
3 2 1.43574e+09 Triggered by <mysql.fabric.events.Event object at 0x1758850>.
4 2 1.43574e+09 Executing action (_add_server).
5 2 1.43574e+09 Executed action (_add_server).
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group lookup_servers mysql-ha-group
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
server_uuid address status mode weight
———————————— —————- ——— ——— ——
138642ec-1fc4-11e5-9caa-001635823fd4 10.40.87.36:3306 SECONDARY READ_ONLY 1.0
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group promote mysql-ha-group
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
uuid finished success result
———————————— ——– ——- ——
4a1c8da5-b442-4831-90dd-317287a7a5fa 1 1 1
state success when description
—– ——- ————- ————————————————————-
3 2 1.43574e+09 Triggered by <mysql.fabric.events.Event object at 0x156e550>.
4 2 1.43574e+09 Executing action (_define_ha_operation).
5 2 1.43574e+09 Executed action (_define_ha_operation).
3 2 1.43574e+09 Triggered by <mysql.fabric.events.Event object at 0x16cee50>.
4 2 1.43574e+09 Executing action (_find_candidate_fail).
5 2 1.43574e+09 Executed action (_find_candidate_fail).
3 2 1.43574e+09 Triggered by <mysql.fabric.events.Event object at 0x16ce9d0>.
4 2 1.43574e+09 Executing action (_check_candidate_fail).
5 2 1.43574e+09 Executed action (_check_candidate_fail).
3 2 1.43574e+09 Triggered by <mysql.fabric.events.Event object at 0x16e2dd0>.
4 2 1.43574e+09 Executing action (_wait_slave_fail).
5 2 1.43574e+09 Executed action (_wait_slave_fail).
3 2 1.43574e+09 Triggered by <mysql.fabric.events.Event object at 0x16e2fd0>.
4 2 1.43574e+09 Executing action (_change_to_candidate).
5 2 1.43574e+09 Executed action (_change_to_candidate).
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group lookup_servers mysql-ha-group
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
server_uuid address status mode weight
———————————— —————- ——- ———- ——
138642ec-1fc4-11e5-9caa-001635823fd4 10.40.87.36:3306 PRIMARY READ_WRITE 1.0
[ root @ vm-5cc5-bad6 : ~ ]
[root@12d4-dl585-03 mysql]# hostname -i
10.40.87.36
[root@12d4-dl585-03 mysql]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 447
Server version: 5.6.25-log MySQL Community Server (GPL)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
mysql>
mysql>
mysql>
mysql> show slave status\G
Empty set (0.00 sec)
mysql> show master status\G
*************************** 1. row ***************************
File: 12d4-dl585-03.000003
Position: 978
Binlog_Do_DB:
Binlog_Ignore_DB:
Executed_Gtid_Set: 138642ec-1fc4-11e5-9caa-001635823fd4:1-5
1 row in set (0.00 sec)
mysql>
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group lookup_servers mysql-ha-group
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
server_uuid address status mode weight
———————————— ——————- ——— ———- ——
1c8d27f1-1fc5-11e5-9cb1-005056b84054 10.40.45.124:3306 SECONDARY READ_ONLY 1.0
5a043518-1fc6-11e5-9cb9-005056bb627d 10.116.175.107:3306 PRIMARY READ_WRITE 1.0
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group health mysql-ha-group
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
uuid is_alive status is_not_running is_not_configured io_not_running sql_not_running io_error sql_error
———————————— ——– ——— ————– —————– ————– ————— ———————————————————————————— ———
1c8d27f1-1fc5-11e5-9cb1-005056b84054 1 SECONDARY 0 0 1 0 error connecting to master ‘fabric@10.116.175.107:3306’ – retry-time: 60 retries: 2 False
5a043518-1fc6-11e5-9cb9-005056bb627d 1 PRIMARY 0 0 0 0 False False
issue
—–
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group create group1
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
uuid finished success result
———————————— ——– ——- ——
4038f917-b33e-4da0-8c03-6831d6b9bc65 1 1 1
state success when description
—– ——- ————- ————————————————————-
3 2 1.43574e+09 Triggered by <mysql.fabric.events.Event object at 0x1758490>.
4 2 1.43574e+09 Executing action (_create_group).
5 2 1.43574e+09 Executed action (_create_group).
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group lookup_servers group1
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
server_uuid address status mode weight
———– ——- —— —- ——
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group add group1 10.40.45.124:3306
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
uuid finished success result
———————————— ——– ——- ——
bc457e6c-498c-463d-8f44-f5ec935f4d7d 1 1 1
state success when description
—– ——- ————- ————————————————————-
3 2 1.43574e+09 Triggered by <mysql.fabric.events.Event object at 0x1758850>.
4 2 1.43574e+09 Executing action (_add_server).
5 2 1.43574e+09 Executed action (_add_server).
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group lookup_servers group1
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
server_uuid address status mode weight
———————————— —————– ——— ——— ——
9dcb167f-1fce-11e5-9cef-005056b84054 10.40.45.124:3306 SECONDARY READ_ONLY 1.0
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group add group1 10.40.87.36:3306
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
ServerError: Error accessing server (10.40.87.36:3306): 2055: Lost connection to MySQL server at ‘10.40.87.36:3306’, system error: timed out.
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group lookup_servers group1
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
server_uuid address status mode weight
———————————— —————– ——— ——— ——
9dcb167f-1fce-11e5-9cef-005056b84054 10.40.45.124:3306 SECONDARY READ_ONLY 1.0
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group add group1 10.116.175.107:3306
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
uuid finished success result
———————————— ——– ——- ——
3f8afe18-04aa-4512-97b2-75ce690555fd 1 1 1
state success when description
—– ——- ————- ————————————————————-
3 2 1.43574e+09 Triggered by <mysql.fabric.events.Event object at 0x1758850>.
4 2 1.43574e+09 Executing action (_add_server).
5 2 1.43574e+09 Executed action (_add_server).
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group lookup_servers group1
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
server_uuid address status mode weight
———————————— ——————- ——— ——— ——
9b1a37e9-1fce-11e5-9cef-005056bb627d 10.116.175.107:3306 SECONDARY READ_ONLY 1.0
9dcb167f-1fce-11e5-9cef-005056b84054 10.40.45.124:3306 SECONDARY READ_ONLY 1.0
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group activate group1
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
uuid finished success result
———————————— ——– ——- ——
c1f54fc1-9e88-41e7-9358-289683e9bcc6 1 1 1
state success when description
—– ——- ————- ————————————————————-
3 2 1.43574e+09 Triggered by <mysql.fabric.events.Event object at 0x1758950>.
4 2 1.43574e+09 Executing action (_activate_group).
5 2 1.43574e+09 Executed action (_activate_group).
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group lookup_servers group1
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
server_uuid address status mode weight
———————————— ——————- ——— ——— ——
9b1a37e9-1fce-11e5-9cef-005056bb627d 10.116.175.107:3306 SECONDARY READ_ONLY 1.0
9dcb167f-1fce-11e5-9cef-005056b84054 10.40.45.124:3306 SECONDARY READ_ONLY 1.0
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group promote group1
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
uuid finished success result
———————————— ——– ——- ——
3c199c7b-e3ae-4a49-acd2-c192766d73fb 1 1 1
state success when description
—– ——- ————- ————————————————————-
3 2 1.43574e+09 Triggered by <mysql.fabric.events.Event object at 0x156e550>.
4 2 1.43574e+09 Executing action (_define_ha_operation).
5 2 1.43574e+09 Executed action (_define_ha_operation).
3 2 1.43574e+09 Triggered by <mysql.fabric.events.Event object at 0x16cee50>.
4 2 1.43574e+09 Executing action (_find_candidate_fail).
5 2 1.43574e+09 Executed action (_find_candidate_fail).
3 2 1.43574e+09 Triggered by <mysql.fabric.events.Event object at 0x16ce9d0>.
4 2 1.43574e+09 Executing action (_check_candidate_fail).
5 2 1.43574e+09 Executed action (_check_candidate_fail).
3 2 1.43574e+09 Triggered by <mysql.fabric.events.Event object at 0x16e2dd0>.
4 2 1.43574e+09 Executing action (_wait_slave_fail).
5 2 1.43574e+09 Executed action (_wait_slave_fail).
3 2 1.43574e+09 Triggered by <mysql.fabric.events.Event object at 0x16e2fd0>.
4 2 1.43574e+09 Executing action (_change_to_candidate).
5 2 1.43574e+09 Executed action (_change_to_candidate).
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : ~ ] mysqlfabric group lookup_servers group1
Fabric UUID: 5ca1ab1e-a007-feed-f00d-cab3fe13249e
Time-To-Live: 1
server_uuid address status mode weight
———————————— ——————- ——— ———- ——
9b1a37e9-1fce-11e5-9cef-005056bb627d 10.116.175.107:3306 PRIMARY READ_WRITE 1.0
9dcb167f-1fce-11e5-9cef-005056b84054 10.40.45.124:3306 SECONDARY READ_ONLY 1.0
[ root @ vm-5cc5-bad6 : ~ ]
[ root @ vm-5cc5-bad6 : /tmp ] cat SratAgentHealth.txt
MSTMonitoringFlag=11
GangliaAgentFlag=
FlumeAgentFlag=
DateTime=07/01/15.05:37:15 @HostName=vm-5cc5-bad6
[ root @ vm-5cc5-bad6 : /tmp ]
[ root @ vm-5cc5-bad6 : /tmp ]
[ root @ vm-5cc5-bad6 : /tmp ]
[ root @ vm-5cc5-bad6 : /tmp ] cat ServerStartTime.txt
ServerUptime= 05:37:15 up 23:41, 7 users, load average: 0.00, 0.00, 0.00
[ root @ vm-5cc5-bad6 : /tmp ]
[ root @ vm-5cc5-bad6 : /tmp ]
[ root @ vm-5cc5-bad6 : /tmp ]
[ root @ vm-5cc5-bad6 : /tmp ] cat fabric.log
[INFO] 1435743652.307270 – Executor-1 – Master has changed from bae91923-1fd1-11e5-9d03-005056bb627d to None.
[ root @ vm-5cc5-bad6 : /tmp ]
[ root @ vm-5cc5-bad6 : /tmp ]
[ root @ vm-5cc5-bad6 : /tmp ] tailf fabric.log
[INFO] 1435743652.307270 – Executor-1 – Master has changed from bae91923-1fd1-11e5-9d03-005056bb627d to None.
[WARNING] 1435744077.541677 – Executor-1 – Candidate (9c757b54-1fd5-11e5-9d1c-005056b84054) cannot become a master due to the following reasons: issues to become a master ({‘is_gtid_not_enabled’: False, ‘is_slave_updates_not_enabled’: False, ‘is_not_running’: False, ‘is_binlog_not_enabled’: False, ‘no_rpl_user’: False}), prerequistes as a slave ({}), valid master (True).
[WARNING] 1435744078.864941 – Executor-1 – Error trying to process transactions in the relay log for candidate (<server(uuid=8ba1bfd5-1fd5-11e5-9d1c-005056bb627d, address=10.116.175.107:3306, mode=READ_ONLY, status=SECONDARY>): Command (START SLAVE SQL_THREAD, ()) failed accessing (10.116.175.107:3306). 1200 (HY000): The server is not configured as slave; fix in config file or with CHANGE MASTER TO..
[INFO] 1435744079.735877 – Executor-1 – Master has changed from None to 8ba1bfd5-1fd5-11e5-9d1c-005056bb627d.
http://bugs.mysql.com/bug.php?id=74509
[ root @ vm-5cc5-bad6 : ~ ] vi /etc/mysql/fabric.cfg
[protocol.mysql]
threads = 5
address = localhost:32275
user = admin
password = DBvers1ty
disable_authentication = no
ssl_ca =
ssl_cert =
ssl_key =