简体   繁体   English

设置具有2个服务器的Percona Xtradb Cluster时出现问题

[英]Issues setting up Percona Xtradb Cluster with 2 servers

I'm trying to set up a Percona XtraDB cluster on two machines.. but i'm having a terrible time in getting the second machine up and running. 我正在尝试在两台计算机上设置Percona XtraDB集群..但是我在使第二台计算机启动并运行方面花费了很多时间。

I have used this article as a reference, and while it seems to be almost working, there's probably something basic i'm missing. 我已将本文用作参考,尽管它似乎几乎可以正常工作,但我可能缺少一些基本知识。

Machines are as follows: 机器如下:

Node 1: 192.168.2.10
Node 2: 192.168.2.11

Both machines run Ubuntu 12.04 LTS. 两台机器都运行Ubuntu 12.04 LTS。

The config file on Node 1 is similar to the article. 节点1上的配置文件与本文类似。

When i start this node using the above configuration, it works normally. 当我使用以上配置启动此节点时,它可以正常工作。 I can log into it via command line and run the 我可以通过命令行登录并运行

mysql> SHOW status LIKE 'wsrep%';

command as it describes. 命令描述。 Everything looks normal. 一切看起来都很正常。

NOTE: Node 1 was previously a standard mySQL server, and has data already in the /var/lib/mysql folder. 注意:节点1以前是标准的mySQL服务器,并且在/ var / lib / mysql文件夹中已经有数据。 This has not affected it starting normally with the above configuration. 从上面的配置开始,这通常不会影响它。

I then follow the steps outlined in the article regarding adding a new node. 然后,我按照文章中概述的有关添加新节点的步骤进行操作。 This seems to be where I run into issues. 这似乎是我遇到问题的地方。

I created the my.ini on Node 2 (192.168.2.11) , and used a configuration similar to the article. 我在节点2 (192.168.2.11)上创建了my.ini,并使用了与本文类似的配置。

When I try starting the service using service mysql start , it says it's started, yet I can no longer connect via the command line. 当我尝试使用服务mysql start来启动服务时 ,它说它已经启动,但是我无法再通过命令行连接。

I tried changing the config file on Node 1 back to the original one, and then starting Node 2, but thats not working either. 我尝试将节点1上的配置文件改回原始文件,然后启动节点2,但这都不起作用。

I have captured the logs by simply starting mysql with the mysqld command on the command line, and here's the trimmed result (only stuff with errors): 我已经通过在命令行上使用mysqld命令简单地启动mysql来捕获日志,这是经过修剪的结果(仅包含错误的内容):

130206 14:53:56 [ERROR] WSREP: Failed to read 'ready <addr>' from: wsrep_sst_xtrabackup --role 'joiner' --address 'ip_address' --auth 'root:password' --datadir '/var/lib/mysql/' --defaults-file '/etc/mysql/my.cnf' --parent '14762'
        Read: '(null)'
130206 14:53:56 [ERROR] WSREP: Process completed with error: wsrep_sst_xtrabackup --role 'joiner' --address 'ip_address' --auth 'root:password' --datadir '/var/lib/mysql/' --defaults-file '/etc/mysql/my.cnf' --parent '14762': 2 (No such file or directory)
130206 14:53:56 [ERROR] WSREP: Failed to prepare for 'xtrabackup' SST. Unrecoverable.
130206 14:53:56 [ERROR] Aborting

Here's what Node 1 reports while Node 2 is connecting (Node 1 using the first config file - again trimmed) 这是节点2连接时节点1的报告(节点1使用第一个配置文件-再次修剪)

130206 14:59:44 [ERROR] WSREP: failed to open gcomm backend connection: 110: failed to reach primary view: 110 (Connection timed out)
         at gcomm/src/pc.cpp:connect():139
130206 14:59:44 [ERROR] WSREP: gcs/src/gcs_core.c:gcs_core_open():195: Failed to open backend connection: -110 (Connection timed out)
130206 14:59:44 [ERROR] WSREP: gcs/src/gcs.c:gcs_open():1290: Failed to open channel 'percona_cluster' at 'gcomm://192.168.2.11': -110 (Connection timed out)
130206 14:59:44 [ERROR] WSREP: gcs connect failed: Connection timed out
130206 14:59:44 [ERROR] WSREP: wsrep::connect() failed: 6
130206 14:59:44 [ERROR] Aborting

Node 2 reported similar. 节点2报告类似。

If anyone can help me with what silly mistake I've made, it would be greatly appreciated. 如果有人可以帮助我解决我犯的愚蠢错误,将不胜感激。

(Sorry for the length of the post - I wanted to provide as much info as possible) (很抱歉,文章的长度-我想提供尽可能多的信息)

It appears there was something wrong with my install. 看来我的安装有问题。 Installing on clean servers setup went fine, but using it as a dropin replacement I ran into errors. 在干净的服务器上进行安装可以很好地进行安装,但是将其用作直接替代品却遇到了错误。

I needed to completely purge the other mysql software I had to get it to run better on my 'dirty' servers. 我需要彻底清除其他mysql软件,以使其在“脏”服务器上更好地运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM