配置openstack mysql HA centos7

來源:互聯網
上載者:User

標籤:

看了官網的配置說明 跟實際有點不一樣(centos7),經過一番摸索,把這個配置過程記錄下來

1.下載MariaDB-Galera-server xinetd,官網的文檔寫的是mariadb-galera-server,搜尋後只有MariaDB-Galera-server,而且安裝它以後,之前的mariadb會被替換掉;

   a.mariadb.repo

   b.yum --enablerepo=mariadb.repo install -y MariaDB-Galera-server xinetd

2.配置clustercheck和galera參見http://docs.openstack.org/zh_CN/high-availability-guide/content/ha-aa-db-mariadb-galera-rh.html

(第一個node啟動的命令有點不同,文檔上是/usr/libexec/mysqld,我用的是/usr/sbin/mysqld,這個搜下mysqld的位置來確定)

3.安裝完畢後出現一個問題,除了第一個node,其他兩個都啟不來mysql.service:

151020 15:30:01 [Note] WSREP: New cluster view: global state: 969b16ae-77a4-11e5-98d9-eea35bd653ec:5857, view# 12: Primary, number of nodes: 2, my index: 0, protocol version 3
151020 15:30:01 [Warning] WSREP: Gap in state sequence. Need state transfer.
151020 15:30:01 [Note] WSREP: Running: ‘wsrep_sst_rsync --role ‘joiner‘ --address ‘172.16.5.74‘ --auth ‘‘ --datadir ‘/var/lib/mysql/‘ --defaults-file ‘/etc/my.cnf‘ --defaults-group-suffix ‘‘ --parent ‘30117‘ ‘‘ ‘
151020 15:30:01 [ERROR] WSREP: Failed to read ‘ready <addr>‘ from: wsrep_sst_rsync --role ‘joiner‘ --address ‘172.16.5.74‘ --auth ‘‘ --datadir ‘/var/lib/mysql/‘ --defaults-file ‘/etc/my.cnf‘ --defaults-group-suffix ‘‘ --parent ‘30117‘ ‘‘
Read: ‘(null)‘
151020 15:30:01 [ERROR] WSREP: Process completed with error: wsrep_sst_rsync --role ‘joiner‘ --address ‘172.16.5.74‘ --auth ‘‘ --datadir ‘/var/lib/mysql/‘ --defaults-file ‘/etc/my.cnf‘ --defaults-group-suffix ‘‘ --parent ‘30117‘ ‘‘ : 2 (No such file or directory)
151020 15:30:01 [ERROR] WSREP: Failed to prepare for ‘rsync‘ SST. Unrecoverable.
151020 15:30:01 [ERROR] Aborting

151020 15:30:03 [Note] WSREP: Closing send monitor...
151020 15:30:03 [Note] WSREP: Closed send monitor.
151020 15:30:03 [Note] WSREP: gcomm: terminating thread
151020 15:30:03 [Note] WSREP: gcomm: joining thread
151020 15:30:03 [Note] WSREP: gcomm: closing backend
151020 15:30:04 [Note] WSREP: (5c8fd4fd, ‘tcp://0.0.0.0:4567‘) turning message relay requesting off
151020 15:30:05 [Note] WSREP: view(view_id(NON_PRIM,5c8fd4fd,26) memb {
5c8fd4fd,0
} joined {
} left {
} partitioned {
9e2b15dd,0
})
151020 15:30:05 [Note] WSREP: view((empty))
151020 15:30:05 [Note] WSREP: gcomm: closed
151020 15:30:05 [Note] WSREP: New COMPONENT: primary = no, bootstrap = no, my_idx = 0, memb_num = 1
151020 15:30:05 [Note] WSREP: Flow-control interval: [16, 16]
151020 15:30:05 [Note] WSREP: Received NON-PRIMARY.
151020 15:30:05 [Note] WSREP: Shifting PRIMARY -> OPEN (TO: 5858)
151020 15:30:05 [Note] WSREP: Received self-leave message.
151020 15:30:05 [Note] WSREP: Flow-control interval: [0, 0]
151020 15:30:05 [Note] WSREP: Received SELF-LEAVE. Closing connection.
151020 15:30:05 [Note] WSREP: Shifting OPEN -> CLOSED (TO: 5858)
151020 15:30:05 [Note] WSREP: RECV thread exiting 0: Success
151020 15:30:05 [Note] WSREP: recv_thread() joined.
151020 15:30:05 [Note] WSREP: Closing replication queue.
151020 15:30:05 [Note] WSREP: Closing slave action queue.
151020 15:30:05 [Note] WSREP: Service disconnected.
151020 15:30:05 [Note] WSREP: rollbacker thread exiting
151020 15:30:06 [Note] WSREP: Some threads may fail to exit.
151020 15:30:06 [Note] /usr/sbin/mysqld: Shutdown complete

Error in my_thread_global_end(): 1 threads didn‘t exit
151020 15:30:11 mysqld_safe mysqld from pid file /var/lib/mysql/mysql4.pid ended

之前以為安裝的過程有問題,所以重裝了幾次,發現該問題仍存在,那麼就不是偶然事件了,搜了N久的Google也沒搜到,後來改了/etc/my.cnf中feedback的配置,重啟後就好了-.-

[mysqld]

feedback=ON

 

配置openstack mysql HA centos7

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.