0

I am setting up a 3 node mysql galera cluster lab environment. All 3 nodes are centos 7 and followed the steps in below blog to setup mysql-wsrep-5.7

https://www.dreamvps.com/tutorials/install-mysql-galera-cluster-centos-7/

After setting up i am starting the first node by executing

/usr/bin/mysqld_bootstrap

But mysql service fails to start with below error in log

2019-02-04T13:13:10.053481Z 0 [ERROR] WSREP: failed to open gcomm backend connection: 110: failed to reach primary view: 110 (Connection timed out) at gcomm/src/pc.cpp:connect():158 2019-02-04T13:13:10.053494Z 0 [ERROR] WSREP: gcs/src/gcs_core.cpp:gcs_core_open():209: Failed to open backend connection: -110 (Connection timed out) 2019-02-04T13:13:10.053635Z 0 [ERROR] WSREP: gcs/src/gcs.cpp:gcs_open():1458: Failed to open channel 'galera_cluster' at 'gcomm://192.168.50.50:3306,192.168.50.51:3306, 192.168.50.52:3306': -110 (Connection timed out) 2019-02-04T13:13:10.053647Z 0 [ERROR] WSREP: gcs connect failed: Connection timed out 2019-02-04T13:13:10.053652Z 0 [ERROR] WSREP: wsrep::connect(gcomm://192.168.50.50:3306,192.168.50.51:3306,192.168.5.52:3306) failed: 7 2019-02-04T13:13:10.053661Z 0 [ERROR] Aborting

Form the log it is clear that its is not starting up as the first node in cluster as it should do, rather it is trying to establish connection to other nodes.

I also checked /var/lib/m.ysql/grastate.dat , safe_to_bootstrap is already set to 1. But still i dont know why this behavior.

How should i start up the first node in Mysql galera cluster in first node

Thanks in advance.

  • A few things to check: Is SELinux running in enforcing mode? Run sestatus to find out. If so, you'll have to put it into permissive mode or disable it. Also, are the necessary ports open in the firewall? Maybe just try with the firewall disabled to start with, just to be sure that's not blocking you. – dbdemon Feb 4 at 14:03
  • Hi.. I stopped firewalld and disabled SElinux and still same error . I could see one strange warning in the log [Warning] WSREP: access file(/var/lib/mysql//gvwstate.dat) failed(No such file or directory) . My only question is why the /usr/bin/mysqld_bootstrap script is not starting the node as first node in cluster. Instead of checking /var/lib/mysql/grastate.dat which has safe_to_bootstrap value, why it is checking /var/lib/mysql//gvwstate.dat invalid location. – udhayan dharmalingam Feb 5 at 10:38
  • You could try to edit the config file and set wsrep_cluster_address=gcomm:// - that used to be the way to bootstrap before scripts such as mysqld_bootstrap. Other tutorials also mention scripts / commands such as: galera_new_cluster and mysqld_safe --wsrep-new-cluster which also could be worth a try. I wouldn't worry about the warning about not finding gvwstate.dat - this is expected, I think. – dbdemon Feb 5 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.