Codis-ha server marked as offline after master-slave switchover

Source: Internet
Author: User

Codis Codis-ha after the master-slave switch server marked as offline, mainly based on data security considerations, this time requires manual operation to restore master-slave relations
After the offline node executes the Add to group command, the offline host is re-established with the same group as the master host.


[Email protected]_168_171_137 sample]$. /bin/codis-config-c config.ini-l./log/cconfig.log server add 4 192.168.171.140:6381 slave
{
"MSG": "OK",
"ret": 0
}


Start

Nohup. /bin/codis-server./redis_conf/6381.conf &>./log/redis_6381.log &
Nohup. /bin/codis-server./redis_conf/6382.conf &>./log/redis_6382.log &


Delete a group

.. /bin/codis-config-c config.ini-l./log/config.log Server Remove-group 4

A single host

.. /bin/codis-config-c config.ini-l./log/cconfig.log Server Promote 1 192.168.174.135:6381
.. /bin/codis-config-c config.ini-l./log/cconfig.log Server Promote 2 192.168.174.136:6381
.. /bin/codis-config-c config.ini-l./log/cconfig.log Server Remove 1 192.168.174.135:6381
.. /bin/codis-config-c config.ini-l./log/cconfig.log Server Remove 2 192.168.174.136:6381


./codis-ha--codis-config=192.168.171.135:18087--productname=redis_cluster1 &




This article is from the "years, the Allure" blog, please be sure to keep this source http://alca0126.blog.51cto.com/7826974/1769647

Codis-ha server marked as offline after master-slave switchover

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.