由于losf引起的pxc启动报错处理

PXC主节点启动完成后,再启动node1,error日志报错:
2017-05-02T15:23:42.830888Z 0 [ERROR] WSREP: Failed to read 'ready <addr>' from: wsrep_sst_rsync --role 'joiner' --address '192.168.30
.221:5020' --datadir '/data/mysql/mysql_3307/data/' --defaults-file '/data/mysql/mysql_3307/my.cnf' --defaults-group-suffix '' --paren
t '5303'  ''
        Read: ''lsof' not found in PATH'
2017-05-02T15:23:42.831042Z 0 [ERROR] WSREP: Process completed with error: wsrep_sst_rsync --role 'joiner' --address '192.168.30.221:5
020' --datadir '/data/mysql/mysql_3307/data/' --defaults-file '/data/mysql/mysql_3307/my.cnf' --defaults-group-suffix '' --parent '530
3'  '' : 2 (No such file or directory)
2017-05-02T15:23:42.831131Z 2 [ERROR] WSREP: Failed to prepare for 'rsync' SST. Unrecoverable.
2017-05-02T15:23:42.831151Z 2 [ERROR] Aborting
 
检查思路:
1、先检查rsync是否已安装:
[root@localhost mysql]# yum search rsync
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.sohu.com
 * extras: mirrors.sohu.com
 * updates: mirrors.aliyun.com
================ N/S matched: rsync ===============================
libguestfs-rsync.x86_64 : rsync support for libguestfs
rsync.x86_64 : A program for synchronizing files over a network
 
  Name and summary matches only, use "search all" for everything.
表示rsync已经安装好。
2、检查lsof是否安装:
[root@localhost mysql]# yum search lsof
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.sohu.com
 * extras: mirrors.sohu.com
 * updates: mirrors.aliyun.com
================= N/S matched: lsof =================
lsof.x86_64 : A utility which lists open files on a Linux/UNIX system
 
  Name and summary matches only, use "search all" for everything.
 
即lsof未安装。
先查找centos7的lsof的rpm包:
找到后下载,传给服务器:
[root@localhost src]# rpm -ivh lsof-4.87-4.el7.x86_64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:lsof-4.87-4.el7                  ################################# [100%]
安装完成后再启动node2,启动完成:
[root@localhost mysql]# ./bin/mysqld_safe --defaults-file=/data/mysql/mysql_3307/my.cnf
2017-05-02T16:18:06.438428Z mysqld_safe Logging to '/data/mysql/mysql_3307/logs/error.log'.
2017-05-02T16:18:06.441666Z mysqld_safe error: log-error set to '/data/mysql/mysql_3307/logs/error.log', however file don't exists. Create writable for user 'mysql'.
[root@localhost mysql]# touch /data/mysql/mysql_3307/logs/error.log
[root@localhost mysql]# chown -R mysql:mysql /data/mysql/mysql_3307/
[root@localhost mysql]# ./bin/mysqld_safe --defaults-file=/data/mysql/mysql_3307/my.cnf
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
grep: write error: Broken pipe
2017-05-02T16:18:35.846719Z mysqld_safe Logging to '/data/mysql/mysql_3307/logs/error.log'.
2017-05-02T16:18:35.851450Z mysqld_safe Logging to '/data/mysql/mysql_3307/logs/error.log'.
2017-05-02T16:18:35.889501Z mysqld_safe Starting mysqld daemon with databases from /data/mysql/mysql_3307/data
2017-05-02T16:18:35.896799Z mysqld_safe Skipping wsrep-recover for empty datadir: /data/mysql/mysql_3307/data
2017-05-02T16:18:35.900008Z mysqld_safe Assigning 00000000-0000-0000-0000-000000000000:-1 to wsrep_start_position
 
 
在主节点上查看:
mysql> show global status like 'wsrep_cluster_size';
+--------------------+-------+
| Variable_name      | Value |
+--------------------+-------+
| wsrep_cluster_size | 2     |
+--------------------+-------+
1 row in set (0.01 sec)
添加节点成功!

posted on 2017-05-05 17:12  lzfj  阅读(1532)  评论(0编辑  收藏  举报

导航