Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MariaDB gcomm backend connection failed 110

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.

like image 777
Kamil Avatar asked May 13 '16 14:05

Kamil


3 Answers

I found solution and exact issue.

The issue was in way of starting cluster node. It's needed to start by script included in installation with MariaDB galera_new_cluster what will bootstrap new cluster and after that everything is working fine.

Hope this will help to others pass configuration under debian.

like image 99
Kamil Avatar answered Nov 13 '22 10:11

Kamil


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

like image 23
Arian Acosta Avatar answered Nov 13 '22 11:11

Arian Acosta


I have this error, but in my case galera_new_cluster not works.

problem solved by editing /var/lib/mysql/grastate.dat file and change safe_to_bootstrap to 1.

after doing it, galera_new_cluster works.

like image 7
vahid kargar Avatar answered Nov 13 '22 10:11

vahid kargar