Mon environnement :
-
Deux nœuds - CentOS 6.4 x86_64
Node1 : 10.10.201.3
Node2 : 10.10.201.4
-
MariaDB-server-10.2.0-1.el6.x86_64
Les deux nœuds fonctionnent normalement, mais après avoir redémarré mysql sur le nœud 1, il ne pourra pas redémarrer alors que mysql sur le nœud 2 continue à fonctionner sans problème.
Configuration sur Node1 :
#/etc/my.cnf.d/server.cnf
node1
bind-address=10.10.201.3
datadir=/opt/mysql
socket=/opt/mysql/mysql.sock
handlersocket_address="10.10.201.3"
handlersocket_port="9998"
handlersocket_port_wr="9999"
open_files_limit = 25600
log-error=/opt/mysql/log/mysqld.log
[galera]
# Mandatory settings
wsrep_on=ON
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address="gcomm://10.10.201.4,10.10.201.3"
wsrep_cluster_name='galera_cluster_www'
wsrep_node_address='10.10.201.3'
wsrep_node_name='www-node1'
wsrep_sst_method=rsync
wsrep_sst_auth=sst_user:password
wsrep-slave-threads=16
binlog_format=ROW
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
wsrep_log_conflicts=ON
wsrep_provider_options="cert.log_conflicts=ON"
wsrep_debug=ON
wsrep_max_ws_size = 2G
binlog_row_image = minimal
Configuration sur Node2 :
#/etc/my.cnf.d/server.cnf
node2
bind-address=10.10.201.4
datadir=/opt/mysql
socket=/opt/mysql/mysql.sock
handlersocket_address="10.10.201.4"
handlersocket_port="9998"
handlersocket_port_wr="9999"
open_files_limit = 25600
[galera]
# Mandatory settings
wsrep_on=ON
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address="gcomm://10.10.201.3,10.10.201.4"
wsrep_cluster_name='galera_cluster_www'
wsrep_node_address='10.10.201.4'
wsrep_node_name='www-node2'
wsrep_sst_method=rsync
wsrep_sst_auth=sst_user:password
wsrep-slave-threads=16
binlog_format=ROW
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
wsrep_log_conflicts=ON
wsrep_provider_options="cert.log_conflicts=ON"
wsrep_debug=ON
wsrep_max_ws_size = 2G
binlog_row_image = minimal
Et enfin, Information sur le Cluster sur Node2 après l'échec de mysql sur le premier noeud (Node1) :
MariaDB [(none)]> show status like 'wsrep%';
+------------------------------+--------------------------------------+
| Variable_name | Value |
+------------------------------+--------------------------------------+
| wsrep_apply_oooe | 0.017353 |
| wsrep_apply_oool | 0.000050 |
| wsrep_apply_window | 1.021550 |
| wsrep_causal_reads | 0 |
| wsrep_cert_deps_distance | 24.564685 |
| wsrep_cert_index_size | 48 |
| wsrep_cert_interval | 0.021750 |
| wsrep_cluster_conf_id | 69 |
| wsrep_cluster_size | 1 |
| wsrep_cluster_state_uuid | c07f825f-132f-11e6-b219-d7e841605104 |
| wsrep_cluster_status | Primary |
| wsrep_commit_oooe | 0.000000 |
| wsrep_commit_oool | 0.000034 |
| wsrep_commit_window | 1.005403 |
| wsrep_connected | ON |
| wsrep_evs_delayed | |
| wsrep_evs_evict_list | |
| wsrep_evs_repl_latency | 0/0/0/0/0 |
| wsrep_evs_state | OPERATIONAL |
| wsrep_flow_control_paused | 0.000000 |
| wsrep_flow_control_paused_ns | 0 |
| wsrep_flow_control_recv | 0 |
| wsrep_flow_control_sent | 0 |
| wsrep_gcomm_uuid | 401f6755-71da-11e6-8244-9e88079ed6c4 |
| wsrep_incoming_addresses | 10.10.201.4:3306 |
| wsrep_last_committed | 2364263 |
| wsrep_local_bf_aborts | 116 |
| wsrep_local_cached_downto | 2221069 |
| wsrep_local_cert_failures | 23 |
| wsrep_local_commits | 729390 |
| wsrep_local_index | 0 |
| wsrep_local_recv_queue | 0 |
| wsrep_local_recv_queue_avg | 0.004725 |
| wsrep_local_recv_queue_max | 6 |
| wsrep_local_recv_queue_min | 0 |
| wsrep_local_replays | 112 |
| wsrep_local_send_queue | 0 |
| wsrep_local_send_queue_avg | 0.000335 |
| wsrep_local_send_queue_max | 2 |
| wsrep_local_send_queue_min | 0 |
| wsrep_local_state | 4 |
| wsrep_local_state_comment | Synced |
| wsrep_local_state_uuid | c07f825f-132f-11e6-b219-d7e841605104 |
| wsrep_protocol_version | 7 |
| wsrep_provider_name | Galera |
| wsrep_provider_vendor | Codership Oy <info@codership.com> |
| wsrep_provider_version | 25.3.15(r3578) |
| wsrep_ready | ON |
| wsrep_received | 1376816 |
| wsrep_received_bytes | 630752657 |
| wsrep_repl_data_bytes | 303429595 |
| wsrep_repl_keys | 3039261 |
| wsrep_repl_keys_bytes | 41097380 |
| wsrep_repl_other_bytes | 0 |
| wsrep_replicated | 729452 |
| wsrep_replicated_bytes | 391211903 |
| wsrep_thread_count | 17 |
+------------------------------+--------------------------------------+