MariaDB gcomm backend connection failed 110

Kamil picture Kamil · May 13, 2016 · Viewed 43.8k times · Source

I'm trying to get work MariaDB Galera 10.1 under debian 8 jessie.

I've installed all neccesary components and did configurations but i cannot get it work.

The nodes are builded as VPS.

Configuration of node 1:

[mysqld]

# Cluster node configurations
wsrep_cluster_address="gcomm://172.16.0.102,172.16.0.112"
wsrep_node_address="172.16.0.102"
wsrep_node_name='n1' 
wsrep_cluster_name='cluster'
innodb_buffer_pool_size=400M
# Mandatory settings to enable Galera
wsrep_provider=/usr/lib/galera/libgalera_smm.so
binlog_format=ROW
default-storage-engine=InnoDB
innodb_autoinc_lock_mode=2
innodb_doublewrite=1
query_cache_size=0
bind-address=0.0.0.0
# Galera synchronisation configuration
wsrep_sst_method=rsync

Configuration of node 2:

[mysqld]

# Cluster node configurations
wsrep_cluster_address="gcomm://172.16.0.102,172.16.0.112"
wsrep_node_address="172.16.0.112"
wsrep_node_name='n2' 
wsrep_cluster_name='cluster'
innodb_buffer_pool_size=400M
# Mandatory settings to enable Galera
wsrep_provider=/usr/lib/galera/libgalera_smm.so
binlog_format=ROW
default-storage-engine=InnoDB
innodb_autoinc_lock_mode=2
innodb_doublewrite=1
query_cache_size=0
bind-address=0.0.0.0
# Galera synchronisation configuration
wsrep_sst_method=rsync

When I'm trying to run on node 1 bootstrap command

service mysql bootstrap

It fails with error's

May 13 15:59:28 test mysqld[2397]: 2016-05-13 15:59:28  139843152635840 [ERROR] WSREP: failed to open gcomm backend connection: 110: failed to reach primary view: 110 (Connection timed out)
May 13 15:59:28 test mysqld[2397]: at gcomm/src/pc.cpp:connect():162
May 13 15:59:28 test mysqld[2397]: 2016-05-13 15:59:28 139843152635840 [ERROR] WSREP: gcs/src/gcs_core.cpp:gcs_core_open():208: Failed to open backend connection: -110 (Connection timed out) 
May 13 15:59:28 test mysqld[2397]: 2016-05-13 15:59:28 139843152635840 [ERROR] WSREP: gcs/src/gcs.cpp:gcs_open():1379: Failed to open channel 'cluster' at 'gcomm://172.16.0.102,172.16.0.112': -110 (Connection timed out)
May 13 15:59:28 test mysqld[2397]: 2016-05-13 15:59:28 139843152635840 [ERROR] WSREP: gcs connect failed: Connection timed out
May 13 15:59:28 test mysqld[2397]: 2016-05-13 15:59:28 139843152635840 [ERROR] WSREP: wsrep::connect(gcomm://172.16.0.102,172.16.0.112) failed: 7
May 13 15:59:28 test mysqld[2397]: 2016-05-13 15:59:28 139843152635840 [ERROR] Aborting

The network configuration is private I'm using:

2x DEDICATED server installed with ProxmoxVE 4.0 the servers are in vRack network is configured on VPS as:

node1: 172.16.0.102 //node 1 is on server 1

node2: 172.16.0.112 //node 2 is on server 2

They're able to ping each other on private network.

Answer

Arian Acosta picture Arian Acosta · Aug 4, 2016

Since MariaDB 10.1.8, systemd is the new init and it affects the way Galera is bootstrapped on RPM and Debian based Linux distributions (in my case Ubuntu 16.04). On previous versions, you would use something like service mysql start --wsrep-new-cluster or service mysqld bootstrap but that doesn't work any more as it fails with:

[ERROR] WSREP: gcs/src/gcs_core.cpp:gcs_core_open():208: Failed to open backend connection: -110 (Connection timed out)

To fix this issue run:

galera_new_cluster

Note that you only need to run this script on the 'first' server.

To test if it is running, enter mysql with mysql -u [your mysql user] -p and then run

SHOW GLOBAL STATUS LIKE 'wsrep_cluster_size';

You should see something like:

+--------------+
| cluster size |
+--------------+
| 1            |
+--------------+

Just in case it is useful to anyone, this is my my.conf (MariaDB 10.1.16)

[galera]
# Mandatory settings
wsrep_on=ON
wsrep_provider=/usr/lib/galera/libgalera_smm.so
wsrep_cluster_address="gcomm://[first ip],[second ip]"
binlog_format=row
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2

More details here:

MariaDB systemd and galera_new_cluster

Galera Cluster System Variables