MySQL Galera节点未启动(终止并显示错误"WSREP:[...]:60:无法到达主视图:60(操作超时)") [英] MySQL Galera node not starting (aborting with Error 'WSREP: [...]: 60: failed to reach primary view: 60 (Operation timed out)')

查看:745
本文介绍了MySQL Galera节点未启动(终止并显示错误"WSREP:[...]:60:无法到达主视图:60(操作超时)")的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在FreeBSD 10上使用MySQL 5.6.26和VirtualBox设置三个Galera节点.当我完成所有设置并运行MySQL时,它会在一段时间后退出并且无法正常启动.

I am trying to setup three Galera nodes on FreeBSD 10 with MySQL 5.6.26 and VirtualBox. When I set up everything and run MySQL, it exits after some time and cannot start properly.

这是我的日志:

2015-10-22 15:23:24 9402 [Note] WSREP: Read nil XID from storage engines, skipping position init
2015-10-22 15:23:24 9402 [Note] WSREP: wsrep_load(): loading provider library '/usr/local/lib/libgalera_smm.so'
2015-10-22 15:23:24 9402 [Note] WSREP: wsrep_load(): Galera 3.5(rXXXX) by Codership Oy <info@codership.com> loaded successfully.
2015-10-22 15:23:24 9402 [Note] WSREP: CRC-32C: using "slicing-by-8" algorithm.
2015-10-22 15:23:24 9402 [Note] WSREP: Found saved state: 9bfd9448-780a-11e5-a465-e268e80baf6e:-1
2015-10-22 15:23:24 9402 [Note] WSREP: Passing config to GCS: base_host = 192.168.1.10; base_port = 4567; cert.log_conflicts = no; debug = no; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.join_retrans_period = PT1S; evs.max_install_timeouts = 1; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT5S; evs.user_send_window = 2; evs.view_forget_timeout = PT24H; gcache.dir = /home/mysql/; gcache.keep_pages_size = 0; gcache.mem_size = 0; gcache.name = /home/mysql//galera.cache; gcache.page_size = 128M; gcache.size = 128M; gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 16; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; gcs.recv_q_hard_limit = 9223372036854775807; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; gmcast.listen_addr = 192.168.1.10; gmcast.segment = 0; gmcast.version = 0; ist.recv_addr = 192.168.1.10; pc.announce_timeout = PT3S; pc.checksum = false; pc.ignore_quorum = false; pc.ignore_sb = false; pc.npvo = false; pc.version = 0; pc.wait_prim 
2015-10-22 15:23:24 9402 [Note] WSREP: Service thread queue flushed.
2015-10-22 15:23:24 9402 [Note] WSREP: Assign initial position for certification: 4, protocol version: -1
2015-10-22 15:23:24 9402 [Note] WSREP: wsrep_sst_grab()
2015-10-22 15:23:24 9402 [Note] WSREP: Start replication
2015-10-22 15:23:24 9402 [Note] WSREP: Setting initial position to 9bfd9448-780a-11e5-a465-e268e80baf6e:4
2015-10-22 15:23:24 9402 [Note] WSREP: protonet asio version 0
2015-10-22 15:23:24 9402 [Note] WSREP: Using CRC-32C (optimized) for message checksums.
2015-10-22 15:23:24 9402 [Note] WSREP: backend: asio
2015-10-22 15:23:24 9402 [Note] WSREP: GMCast version 0
2015-10-22 15:23:24 9402 [Note] WSREP: (b08a4d6e-78b7-11e5-80bf-12866e73025e, 'tcp://192.168.1.10:4567') listening at tcp://192.168.1.10:4567
2015-10-22 15:23:24 9402 [Note] WSREP: (b08a4d6e-78b7-11e5-80bf-12866e73025e, 'tcp://192.168.1.10:4567') multicast: , ttl: 1
2015-10-22 15:23:24 9402 [Note] WSREP: EVS version 0
2015-10-22 15:23:24 9402 [Note] WSREP: PC version 0
2015-10-22 15:23:24 9402 [Note] WSREP: gcomm: connecting to group 'test', peer '192.168.1.10:,192.168.1.20:,192.168.1.30:'
2015-10-22 15:23:27 9402 [Warning] WSREP: no nodes coming from prim view, prim not possible
2015-10-22 15:23:27 9402 [Note] WSREP: view(view_id(NON_PRIM,b08a4d6e-78b7-11e5-80bf-12866e73025e,1) memb {
    b08a4d6e-78b7-11e5-80bf-12866e73025e,0
} joined {
} left {
} partitioned {
})
2015-10-22 15:23:27 9402 [Warning] WSREP: last inactive check more than PT1.5S ago (PT3.6479S), skipping check
2015-10-22 15:23:57 9402 [Note] WSREP: view((empty))
2015-10-22 15:23:57 9402 [ERROR] WSREP: failed to open gcomm backend connection: 60: failed to reach primary view: 60 (Operation timed out)
     at gcomm/src/pc.cpp:connect():141
2015-10-22 15:23:57 9402 [ERROR] WSREP: gcs/src/gcs_core.c:gcs_core_open():202: Failed to open backend connection: -60 (Operation timed out)
2015-10-22 15:23:57 9402 [ERROR] WSREP: gcs/src/gcs.c:gcs_open():1291: Failed to open channel 'test' at 'gcomm://192.168.1.10,192.168.1.20,192.168.1.30': -60 (Operation timed out)
2015-10-22 15:23:57 9402 [ERROR] WSREP: gcs connect failed: Operation timed out
2015-10-22 15:23:57 9402 [ERROR] WSREP: wsrep::connect(gcomm://192.168.1.10,192.168.1.20,192.168.1.30) failed: 7
2015-10-22 15:23:57 9402 [ERROR] Aborting

2015-10-22 15:23:57 9402 [Note] WSREP: Service disconnected.
2015-10-22 15:23:58 9402 [Note] WSREP: Some threads may fail to exit.
2015-10-22 15:23:58 9402 [Note] Binlog end
2015-10-22 15:23:58 9402 [Note] /usr/local/libexec/mysqld: Shutdown complete

151022 15:23:58 mysqld_safe mysqld from pid file /home/mysql/galera1.pid ended

my.cnf中有关wsrep配置的部分:

Part of my.cnf regarding wsrep config:

wsrep_provider=/usr/local/lib/libgalera_smm.so
wsrep_cluster_name="test"
wsrep_cluster_address="gcomm://192.168.1.10,192.168.1.20,192.168.1.30"
wsrep_slave_threads=8
wsrep_node_address = "192.168.1.10"
wsrep_sst_receive_address = "192.168.1.10"
wsrep_node_incoming_address = "192.168.1.10"
wsrep_provider_options = "gmcast.listen_addr=192.168.1.10;gcache.size=128M;ist.recv_addr=192.168.1.10"
wsrep_auto_increment_control=1
wsrep_retry_autocommit=0
wsrep_max_ws_size=3741824
wsrep_max_ws_rows=56000
wsrep_certify_nonPK=1
wsrep_convert_LOCK_to_trx=0
wsrep_sst_donor=galera1
wsrep_sst_donor_rejects_queries=1

  • 节点1-192.168.1.10
  • 节点2-192.168.1.20
  • 节点3-192.168.1.30
  • 以上输出来自节点1.

    节点之间的网络正常运行,所以我似乎找不到原因.

    The networking between the nodes is working properly, so I can't seem to find a reason for this not to work.

    推荐答案

    请确保通过运行以下命令启动第一个节点:

    Make sure you start the first node by running the following command:

    service mysql start --wsrep-new-cluster
    

    通过运行以下命令来启动下一个节点:

    Start the next nodes by running the command:

    service mysql start
    

    启动第一个节点时忘记添加参数--wsrep-new-cluster时,会得到与您完全相同的错误.

    I get exactly the same errors as your when I forget to add the param --wsrep-new-cluster when I start the first node.

    查看此页面以获取详细信息:启动集群

    Check this page for details: Starting the cluster

    快速我个人将Galera与MariaDB一起使用,并且上面的命令可以正常工作.使用MySQL时,可能需要在上面的命令中将mysqlmysqld切换.尝试两者.

    Just a quick edit: I personally use Galera with MariaDB and the commands above work properly. As you use MySQL, you might need to switch mysql with mysqld in the commands above. Try with both.

    这篇关于MySQL Galera节点未启动(终止并显示错误"WSREP:[...]:60:无法到达主视图:60(操作超时)")的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆