Reputation: 61
mariadb 10.1.x galera cluster setting.
first node 192.168.159.132
[galera]
# Mandatory settings
wsrep_on=ON
wsrep_provider=/usr/lib/galera/libgalera_smm.so
wsrep_cluster_address=gcomm://192.168.159.132,192.168.159.135,192.168.159.136
binlog_format=row
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
first node 192.168.159.132
* Bootstrapping the cluster mysqld
Starting mysql (via systemctl): mysql.service
Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.
[ERROR] WSREP: gcs/src/gcs_core.cpp:gcs_core_open():208: Failed to open backend connection: -110 (Connection timed out)
[ERROR] WSREP: gcs/src/gcs.cpp:gcs_open():1379: Failed to open channel 'my_wsrep_cluster' at 'gcomm://192.168.32.251,192.168.32.252,192.168.32...ection timed out)
[ERROR] WSREP: gcs connect failed: Connection timed out
[ERROR] WSREP: wsrep::connect(gcomm://192.168.32.251,192.168.32.252,192.168.32.253) failed: 7
[ERROR] Aborting
systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: Failed to start MariaDB database server.
systemd[1]: mariadb.service: Unit entered failed state.
systemd[1]: mariadb.service: Failed with result 'exit-code'.
Upvotes: 4
Views: 2912
Reputation: 408
The galera configuration looks fine. But you have to provide an extra argument while bootstrapping the first node. Try this:
mysqld --wsrep-new-cluster
For the first node wsrep_cluster_address
can be empty. For next nodes you have to provide at least one ip address that is already a part of cluster. But it's a good practice to provide the list of all the nodes that you are going to use. It wont give you any error for mentioning a node in cluster-address which is not present in the cluster yet. So you can use, wsrep_cluster_address=gcomm://192.168.159.132,192.168.159.135,192.168.159.136
for every node.
Upvotes: 1
Reputation: 706
their is an error:
use format as below:
wsrep_cluster_address="gcomm://first_ip,second_ip,third_ip"
Upvotes: 1
Reputation: 126
You are getting "connection timed out" because the node is trying to connect to the other nodes listed in wsrep_cluster_address, which aren't online as this is the very first node in the cluster. So, during bootstrap you should start the first node with empty wsrep_cluster_address :.wsrep_cluster_address='gcomm://'.
Upvotes: 0
Reputation: 15057
There is a Error in your config. After gcom you only use one : like:
wsrep_cluster_address=gcomm://192.168.159.132,192.168.159.135,192.168.159.136
Upvotes: 1