redis3.0安装错误总结
配置完所有主节点后,报" ERR Invalid node address specified"
由于redis-trib.rb 对域名或主机名支持不好,故在创建集群的时候要使用ip:port的方式
redis-trib.rb create ip1:port1 ip2:port2 ip3:port3
创建集群时报某个err slot 0 is already busy (redis::commanderror)
这是由于之间创建集群没有成功,需要将nodes.conf和dir里面的文件全部删除(注意不要删除了redis.conf)
创建集群时一直处于"Waiting for the cluster to join...................................."的状态
这个问题原因不知,但解决方法是在redis.conf文件中把bind 127.0.0.1本地环回口改为物理接口.
安装ruby redis时长时间没响应
这是由于天朝网络,解决办法是改ruby源(请自行baidu)或手动安装
- moguang@ubsvr13:/opt/redis-unstable/src$ ./redis-trib.rb create 192.168.1.13:6379 192.168.1.15:6380 192.168.1.40:6381 Creating cluster
Connecting to node 192.168.1.13:6379: OK
Connecting to node 192.168.1.15:6380: OK
Connecting to node 192.168.1.40:6381: OK
Performing hash slots allocation on 3 nodes…
Using 3 masters:
192.168.1.40:6381
192.168.1.15:6380
192.168.1.13:6379
M: 225b7f54c67483f71955db78312a90c67941fff0 192.168.1.13:6379
slots:10922-16383 (5462 slots) master
M: bca62c53e7f50d7c83dd418ed23e08fb8a4e9bb5 192.168.1.15:6380
slots:5461-10921 (5461 slots) master
M: 47483c65a705025aab28ee74da210a2dce41bc41 192.168.1.40:6381
slots:0-5460 (5461 slots) master
Can I set the above configuration? (type ‘yes’ to accept): yes
/usr/lib/ruby/gems/1.8/gems/redis-3.0.7/lib/redis/client.rb:97:in call': ERR Slot 16011 is already busy (Redis::CommandError)
from /usr/lib/ruby/gems/1.8/gems/redis-3.0.7/lib/redis.rb:2432:inmethod_missing’
from /usr/lib/ruby/gems/1.8/gems/redis-3.0.7/lib/redis.rb:37:in synchronize'
from /usr/lib/ruby/1.8/monitor.rb:242:inmon_synchronize’
from /usr/lib/ruby/gems/1.8/gems/redis-3.0.7/lib/redis.rb:37:in synchronize'
from /usr/lib/ruby/gems/1.8/gems/redis-3.0.7/lib/redis.rb:2431:inmethod_missing’
from ./redis-trib.rb:203:in flush_node_config'
from ./redis-trib.rb:571:inflush_nodes_config’
from ./redis-trib.rb:570:in each'
from ./redis-trib.rb:570:inflush_nodes_config’
from ./redis-trib.rb:820:in create_cluster_cmd'
from ./redis-trib.rb:1026:insend’
from ./redis-trib.rb:1026
经检查,这是由于上一次配置集群失败时留下的配置信息导致的。 只要把redis.conf中定义的 cluster-config-file 所在的文件删除,重新启动redis-server及运行redis-trib即可。