node 2 cann't join cluster

Asked by Spark

Hi all:
  I'm a new guy using galera, i build 3 nodes galera cluster, node 1 works well, but when i config the sec node,this server met these errors:

131030 6:50:13 [Note] WSREP: Assign initial position for certification: -1, protocol version: -1
131030 6:50:13 [Note] WSREP: wsrep_sst_grab()
131030 6:50:13 [Note] WSREP: Start replication
131030 6:50:13 [Note] WSREP: Setting initial position to 00000000-0000-0000-0000-000000000000:-1
131030 6:50:13 [ERROR] WSREP: gcs/src/gcs_backend.c:gcs_backend_init():87: Invalid backend URI: gcomm:10.224.150.206:4567
131030 6:50:13 [ERROR] WSREP: gcs/src/gcs_core.c:gcs_core_open():203: Failed to initialize backend using 'gcomm:10.224.150.206:4567': -22 (Invalid argument)
131030 6:50:13 [ERROR] WSREP: gcs/src/gcs.c:gcs_open():1290: Failed to open channel 'my_wsrep_cluster' at 'gcomm:10.224.150.206:4567': -22 (Invalid argument)
131030 6:50:13 [ERROR] WSREP: gcs connect failed: Invalid argument
131030 6:50:13 [ERROR] WSREP: wsrep::connect() failed: 7
131030 6:50:13 [ERROR] Aborting

131030 6:50:13 [Note] WSREP: Service disconnected.
131030 6:50:14 [Note] WSREP: Some threads may fail to exit.
131030 6:50:14 [Note] /usr/sbin/mysqld: Shutdown complete

131030 06:50:14 mysqld_safe mysqld from pid file /var/lib/mysql/mysqlha02.pid ended

OS:galera-24.2.7-1.rhel6.x86_64
mysql version: MySQL-server-5.5.33_wsrep_24.8
gelera:galera-24.2.7-1.rhel6.x86_64
wsrep.cnf:
[mysqld]
wsrep_cluster_address="gcomm:/10.224.150.206:4567"
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_sst_auth=sst:pass

Thanks for your help~

Question information

Language:
English Edit question
Status:
Solved
For:
MySQL patches by Codership Edit question
Assignee:
No assignee Edit question
Solved by:
Spark
Solved:
Last query:
Last reply:
Revision history for this message
Seppo Jaakola (seppo-jaakola) said :
#1

wsrep_cluster_address has a bad value in your config. Use two slashes after 'gcomm' protocol selector in the URI:

wsrep_cluster_address="gcomm://10.224.150.206:4567"

Revision history for this message
Spark (rockdba) said :
#2

Thanks. But after changing the wsrep.cnf,still have some issues.

[root@mysqlha02 conf.d]# more wsrep.cnf
[mysqld]
wsrep_cluster_address="gcomm://10.224.150.206:4567"
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
wsrep_sst_auth=sst:pass

----------------------------------------------------------------------

131030 7:26:41 [Note] WSREP: Assign initial position for certification: -1, protocol version: -1
131030 7:26:41 [Note] WSREP: wsrep_sst_grab()
131030 7:26:41 [Note] WSREP: Start replication
131030 7:26:41 [Note] WSREP: Setting initial position to 00000000-0000-0000-0000-000000000000:-1
131030 7:26:41 [Note] WSREP: protonet asio version 0
131030 7:26:41 [Note] WSREP: backend: asio
131030 7:26:41 [Note] WSREP: GMCast version 0
131030 7:26:41 [Note] WSREP: (9f3b20be-4134-11e3-b4a6-3bcf5b2e9ace, 'tcp://0.0.0.0:4567') listening at tcp://0.0.0.0:4567
131030 7:26:41 [Note] WSREP: (9f3b20be-4134-11e3-b4a6-3bcf5b2e9ace, 'tcp://0.0.0.0:4567') multicast: , ttl: 1
131030 7:26:41 [Note] WSREP: EVS version 0
131030 7:26:41 [Note] WSREP: PC version 0
131030 7:26:41 [Note] WSREP: gcomm: connecting to group 'my_wsrep_cluster', peer '10.224.150.206:4567'
131030 7:26:41 [Warning] WSREP: (9f3b20be-4134-11e3-b4a6-3bcf5b2e9ace, 'tcp://0.0.0.0:4567') address 'tcp://10.224.150.206:4567' points to own listening address, blacklisting
131030 7:26:44 [Warning] WSREP: no nodes coming from prim view, prim not possible
131030 7:26:44 [Note] WSREP: view(view_id(NON_PRIM,9f3b20be-4134-11e3-b4a6-3bcf5b2e9ace,1) memb {
        9f3b20be-4134-11e3-b4a6-3bcf5b2e9ace,
} joined {
} left {
} partitioned {
})
131030 7:26:45 [Warning] WSREP: last inactive check more than PT1.5S ago (PT3.50137S), skipping check
131030 7:27:14 [Note] WSREP: view((empty))
131030 7:27:14 [ERROR] WSREP: failed to open gcomm backend connection: 110: failed to reach primary view: 110 (Connection timed out)
         at gcomm/src/pc.cpp:connect():141
131030 7:27:14 [ERROR] WSREP: gcs/src/gcs_core.c:gcs_core_open():196: Failed to open backend connection: -110 (Connection timed out)
131030 7:27:14 [ERROR] WSREP: gcs/src/gcs.c:gcs_open():1290: Failed to open channel 'my_wsrep_cluster' at 'gcomm://10.224.150.206:4567': -110 (Connection timed out)
131030 7:27:14 [ERROR] WSREP: gcs connect failed: Connection timed out
131030 7:27:14 [ERROR] WSREP: wsrep::connect() failed: 7
131030 7:27:14 [ERROR] Aborting

131030 7:27:14 [Note] WSREP: Service disconnected.
131030 7:27:15 [Note] WSREP: Some threads may fail to exit.
131030 7:27:15 [Note] /usr/sbin/mysqld: Shutdown complete
-------------------------------------------------------------------------------------------------------------------

Revision history for this message
Seppo Jaakola (seppo-jaakola) said :
#3

wsrep_cluster_address tells the node how to initialize a connection to the cluster. It should contain an IP address of one node in the cluster, or preferably a list of all nodes present in the cluster.

Now it looks like 10.224.150.206 is actually the IP address of node2. When you start node2 with this configuration, he tries to connect to himself, and bails out.

=> write in wsrep_cluster_address the IP address on node1 and you should be able to initialize the connection between these two nodes.

The next step in node joining process will be that node2 will ask for database state transfer (SST). If you configure:

wsrep_sst_method=rsync

..then node1 will try to send mysql datadirectory over rsync to node2. This is likely the most simple way to kick start a Galera Cluster for experimentation.

You can read more about Galera configuration e.g. here: http://www.codership.com/wiki/doku.php?id=mysql_galera_configuration

Revision history for this message
Spark (rockdba) said :
#4

Thanks a lot,!it works now~~