Question
MariaDB 10.1. I have 3 nodes:
KVM-1
wsrep_on=ON
binlog_format=ROW
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
innodb_locks_unsafe_for_binlog=1
query_cache_size=0
query_cache_type=0
innodb_log_file_size=100M
innodb_file_per_table
innodb_flush_log_at_trx_commit=2
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address="gcomm://192.168.2.68,192.168.2.69"
wsrep_cluster_name='galera_cluster'
wsrep_node_address='192.168.2.67'
wsrep_node_name='KVM-1'
wsrep_sst_method=rsync
wsrep_sst_auth=repl_user:PASS
KVM-2
wsrep_on=ON
binlog_format=ROW
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
innodb_locks_unsafe_for_binlog=1
query_cache_size=0
query_cache_type=0
innodb_log_file_size=100M
innodb_file_per_table
innodb_flush_log_at_trx_commit=2
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address="gcomm://192.168.2.67,192.168.2.69"
wsrep_cluster_name='galera_cluster'
wsrep_node_address='192.168.2.68'
wsrep_node_name='KVM-2'
wsrep_sst_method=rsync
wsrep_sst_auth=repl_user:PASS
KVM-3
wsrep_on=ON
binlog_format=ROW
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
innodb_locks_unsafe_for_binlog=1
query_cache_size=0
query_cache_type=0
innodb_log_file_size=100M
innodb_file_per_table
innodb_flush_log_at_trx_commit=2
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address="gcomm://192.168.2.67,192.168.2.68"
wsrep_cluster_name='galera_cluster'
wsrep_node_address='192.168.2.69'
wsrep_node_name='KVM-3'
wsrep_sst_method=rsync
wsrep_sst_auth=repl_user:PASS
I started mysql on 1st server with key --wsrep-new-clusterping
, ang get errors like this.
mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: failed (Result: exit-code) since Вт 2016-03-29 15:52:20 MSK; 6s ago
Process: 7845 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER (code=exited, status=1/FAILURE)
Main PID: 7845 (code=exited, status=1/FAILURE)
Status: "MariaDB server is down"
мар 29 15:52:19 KVM-1 mysqld[7845]: at gcomm/src/pc.cpp:connect():162
мар 29 15:52:19 KVM-1 mysqld[7845]: 2016-03-29 15:52:19 139885098440832 [ERROR] WSREP: gcs/src/gcs_core.cpp:gcs_core_open():208: Failed to open backend connection: -110 (Connection timed out)
мар 29 15:52:19 KVM-1 mysqld[7845]: 2016-03-29 15:52:19 139885098440832 [ERROR] WSREP: gcs/src/gcs.cpp:gcs_open():1379: Failed to open channel 'galera_cluster' at 'gcomm://192.168.2.68,192.168.2.69': -110 (Connection timed out)
мар 29 15:52:19 KVM-1 mysqld[7845]: 2016-03-29 15:52:19 139885098440832 [ERROR] WSREP: gcs connect failed: Connection timed out
мар 29 15:52:19 KVM-1 mysqld[7845]: 2016-03-29 15:52:19 139885098440832 [ERROR] WSREP: wsrep::connect(gcomm://192.168.2.68,192.168.2.69) failed: 7
мар 29 15:52:19 KVM-1 mysqld[7845]: 2016-03-29 15:52:19 139885098440832 [ERROR] Aborting
мар 29 15:52:20 KVM-1 systemd[1]: mariadb.service: main process exited, code=exited, status=1/FAILURE
мар 29 15:52:20 KVM-1 systemd[1]: Failed to start MariaDB database server.
мар 29 15:52:20 KVM-1 systemd[1]: Unit mariadb.service entered failed state.
мар 29 15:52:20 KVM-1 systemd[1]: mariadb.service failed.
SElinux disabled, iptables & firewalld stopped. Servers are available for each other under ip and hostname.
At MariaDB 10.0 was OK. Where did I go wrong?
Solution
Problem Solved.
On main node edit wsrep_cluster_address
to gcomm://
[mysqld]
bind-address=0.0.0.0
[galera]
wsrep_on=ON
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
binlog_format=ROW
innodb_autoinc_lock_mode=2
innodb_locks_unsafe_for_binlog=1
query_cache_size=0
query_cache_type=0
default_storage_engine=InnoDB
innodb_log_file_size=100M
innodb_file_per_table
innodb_flush_log_at_trx_commit=2
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address="gcomm://"
wsrep_cluster_name='galera_cluster'
wsrep_node_address='192.168.2.67'
wsrep_node_name='KVM-1'
wsrep_sst_method=rsync
wsrep_sst_auth=repl_user:PASS
On the other nodes
[mysqld]
bind-address=0.0.0.0
[galera]
wsrep_on=ON
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
binlog_format=ROW
innodb_autoinc_lock_mode=2
innodb_locks_unsafe_for_binlog=1
query_cache_size=0
query_cache_type=0
default_storage_engine=InnoDB
innodb_log_file_size=100M
innodb_file_per_table
innodb_flush_log_at_trx_commit=2
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_cluster_address="gcomm://IP_ADDR_MAIN_NODE,OTHER_NODES_ADDRS"
wsrep_cluster_name='galera_cluster'
wsrep_node_address='192.168.2.68'
wsrep_node_name='KVM-2'
wsrep_sst_method=rsync
wsrep_sst_auth=repl_user:PASS
Check Galera Status:
MariaDB [(none)]> SHOW STATUS LIKE 'wsrep%';
+------------------------------+-------------------------------------------------------+
| Variable_name | Value |
+------------------------------+-------------------------------------------------------+
| wsrep_apply_oooe | 0.000000 |
| wsrep_apply_oool | 0.000000 |
| wsrep_apply_window | 0.000000 |
| wsrep_causal_reads | 0 |
| wsrep_cert_deps_distance | 0.000000 |
| wsrep_cert_index_size | 0 |
| wsrep_cert_interval | 0.000000 |
| wsrep_cluster_conf_id | 3 |
| wsrep_cluster_size | 3 |
| wsrep_cluster_state_uuid | 2a4dbc40-f5bd-11e5-b2a9-ded6b93d45c9 |
| wsrep_cluster_status | Primary |
| wsrep_commit_oooe | 0.000000 |
| wsrep_commit_oool | 0.000000 |
| wsrep_commit_window | 0.000000 |
| 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 | 2a4cb0c4-f5bd-11e5-bef6-22e5e4b1a794 |
| wsrep_incoming_addresses | 192.168.2.67:3306,192.168.2.68:3306,192.168.2.69:3306 |
| wsrep_last_committed | 0 |
| wsrep_local_bf_aborts | 0 |
| wsrep_local_cached_downto | 18446744073709551615 |
| wsrep_local_cert_failures | 0 |
| wsrep_local_commits | 0 |
| wsrep_local_index | 0 |
| wsrep_local_recv_queue | 0 |
| wsrep_local_recv_queue_avg | 0.000000 |
| wsrep_local_recv_queue_max | 1 |
| wsrep_local_recv_queue_min | 0 |
| wsrep_local_replays | 0 |
| wsrep_local_send_queue | 0 |
| wsrep_local_send_queue_avg | 0.000000 |
| wsrep_local_send_queue_max | 1 |
| wsrep_local_send_queue_min | 0 |
| wsrep_local_state | 4 |
| wsrep_local_state_comment | Synced |
| wsrep_local_state_uuid | 2a4dbc40-f5bd-11e5-b2a9-ded6b93d45c9 |
| 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 | 10 |
| wsrep_received_bytes | 760 |
| wsrep_repl_data_bytes | 0 |
| wsrep_repl_keys | 0 |
| wsrep_repl_keys_bytes | 0 |
| wsrep_repl_other_bytes | 0 |
| wsrep_replicated | 0 |
| wsrep_replicated_bytes | 0 |
| wsrep_thread_count | 2 |
+------------------------------+-------------------------------------------------------+
57 rows in set (0.01 sec)
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange