The codis master node suddenly hangs up and restarts
an abnormal shutdown. You need to enter zookeeper to delete the content created under /codis
[zk: localhost:2181(CONNECTED) 0] ls /
[jodis, cluster, registry, controller, brokers, storm, zookeeper, infra-solr, hbase-unsecure, hadoop-ha, recognition, admin, isr_change_notification, dubbo, codis3, harpc, templeton-hadoop, controller_epoch, hiveserver2, rmstore, consumers, ambari-metrics-cluster, config]
[zk: localhost:2181(CONNECTED) 1] ls /codis3
[codis-ls]
[zk: localhost:2181(CONNECTED) 2] rmr /codis3/codis-ls
Both master and slave (the slave node is not hanging, you can afford it)
nohup ./bin/codis-dashboard --ncpu=4 --config=config/dashboard.toml --log=logs/dashboard.log --log-level=WARN &
nohup ./bin/codis-proxy --ncpu=4 --config=config/proxy6900.toml --log=logs/proxy6900.log --log-level=WARN &
nohup ./bin/codis-proxy --ncpu=4 --config=config/proxy6901.toml --log=logs/proxy6901.log --log-level=WARN &
nohup ./bin/codis-server config/redis6900.conf &
nohup ./bin/codis-server config/redis6901.conf &
Lord from fe
nohup /opt/codis/bin/codis-fe --ncpu=4 --log=logs/fe.log --log-level=WARN --zookeeper=192.168.x.a:2181,192.168.x.b:2181,192.168.x.c:2181 --listen=172.16.x.y:8080 &
The main create proxy
./bin/codis-admin --dashboard=172.16.x.y:18080 --create-proxy -x 172.16.x.y:11080
./bin/codis-admin --dashboard=172.16.x.y:18080 --create-proxy -x 172.16.x.y:11081
./bin/codis-admin --dashboard=172.16.x.y:18080 --create-proxy -x 172.16.3.184:11080
./bin/codis-admin --dashboard=172.16.x.y:18080 --create-proxy -x 172.16.3.184:11081
main plus group
Be sure to add a password first
/opt/codis/bin/redis-cli -h 172.16.x.y -p 6900
172.16.x.y:6900> CONFIG SET requirepass "udptest-2017"
172.16.x.y:6900> AUTH udptest-2017
172.16.x.y:6900> exit
/opt/codis/bin/redis-cli -h 172.16.x.y -p 6901
172.16.x.y:6901> CONFIG SET requirepass "udptest-2017"
172.16.x.y:6901> AUTH udptest-2017
172.16.x.y:6901> exit
/opt/codis/bin/redis-cli -h 172.16.3.184 -p 6900
172.16.3.184:6900> CONFIG SET requirepass "udptest-2017"
172.16.x.y:6900> AUTH udptest-2017
172.16.3.184:6900> exit
/opt/codis/bin/redis-cli -h 172.16.3.184 -p 6901
172.16.3.184:6901> CONFIG SET requirepass "udptest-2017"
172.16.3.184:6901> AUTH udptest-2017
172.16.3.184:6901> exit
create group
/opt/codis/bin/codis-admin --dashboard=172.16.x.y:18080 --create-group --gid=1
/opt/codis/bin/codis-admin --dashboard=172.16.x.y:18080 --create-group --gid=2
join group
./bin/codis-admin --dashboard=172.16.x.y:18080 --group-add --gid=1 --addr=172.16.x.y:6901
./bin/codis-admin --dashboard=172.16.x.y:18080 --group-add --gid=1 --addr=172.16.3.184:6900
./bin/codis-admin --dashboard=172.16.x.y:18080 --group-add --gid=2 --addr=172.16.x.y:6900
./bin/codis-admin --dashboard=172.16.x.y:18080 --group-add --gid=2 --addr=172.16.3.184:6901
Then do the codis distribution
closure
./codis-admin --dashboard=192.168.x.y:18080 --shutdown
./bin/codis-admin --proxy=172.16.x.y:11080 --auth=udptest-2017 --shutdown