码迷,mamicode.com
首页 > 其他好文 > 详细

Redis集群 搭建过程报错

时间:2017-12-22 21:47:55      阅读:185      评论:0      收藏:0      [点我收藏+]

标签:selinux   主从   post   data   nod   logging   main   inux   out   

集群配置:2台机器,每台3个Slave,redis版本3.3.2,ruby版本2.3.1,gem版本2.5.1
在执行./redis-trib.rb  create --replicas 3语句时,已显示配置好的主从节点,当我输入yes之后就会报以下错误:
Can I set the above configuration? (type ‘yes‘ to accept): yes
/usr/local/lib/ruby/gems/2.3.0/gems/redis-3.3.2/lib/redis/connection/ruby.rb:111:in `rescue in _write_to_socket‘: Connection timed out (Redis::TimeoutError)
        from /usr/local/lib/ruby/gems/2.3.0/gems/redis-3.3.2/lib/redis/connection/ruby.rb:104:in `_write_to_socket‘
        from /usr/local/lib/ruby/gems/2.3.0/gems/redis-3.3.2/lib/redis/connection/ruby.rb:131:in `block in write‘
        from /usr/local/lib/ruby/gems/2.3.0/gems/redis-3.3.2/lib/redis/connection/ruby.rb:130:in `loop‘
        from /usr/local/lib/ruby/gems/2.3.0/gems/redis-3.3.2/lib/redis/connection/ruby.rb:130:in `write‘
        from /usr/local/lib/ruby/gems/2.3.0/gems/redis-3.3.2/lib/redis/connection/ruby.rb:374:in `write‘
        from /usr/local/lib/ruby/gems/2.3.0/gems/redis-3.3.2/lib/redis/client.rb:271:in `block in write‘
        from /usr/local/lib/ruby/gems/2.3.0/gems/redis-3.3.2/lib/redis/client.rb:250:in `io‘
        from /usr/local/lib/ruby/gems/2.3.0/gems/redis-3.3.2/lib/redis/client.rb:269:in `write‘
        from /usr/local/lib/ruby/gems/2.3.0/gems/redis-3.3.2/lib/redis/client.rb:228:in `block (3 levels) in process‘
        from /usr/local/lib/ruby/gems/2.3.0/gems/redis-3.3.2/lib/redis/client.rb:222:in `each‘
        from /usr/local/lib/ruby/gems/2.3.0/gems/redis-3.3.2/lib/redis/client.rb:222:in `block (2 levels) in process‘
        from /usr/local/lib/ruby/gems/2.3.0/gems/redis-3.3.2/lib/redis/client.rb:367:in `ensure_connected‘
        from /usr/local/lib/ruby/gems/2.3.0/gems/redis-3.3.2/lib/redis/client.rb:221:in `block in process‘
        from /usr/local/lib/ruby/gems/2.3.0/gems/redis-3.3.2/lib/redis/client.rb:306:in `logging‘
        from /usr/local/lib/ruby/gems/2.3.0/gems/redis-3.3.2/lib/redis/client.rb:220:in `process‘
        from /usr/local/lib/ruby/gems/2.3.0/gems/redis-3.3.2/lib/redis/client.rb:120:in `call‘
        from /usr/local/lib/ruby/gems/2.3.0/gems/redis-3.3.2/lib/redis.rb:2705:in `block in method_missing‘
        from /usr/local/lib/ruby/gems/2.3.0/gems/redis-3.3.2/lib/redis.rb:58:in `block in synchronize‘
        from /usr/local/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize‘
        from /usr/local/lib/ruby/gems/2.3.0/gems/redis-3.3.2/lib/redis.rb:58:in `synchronize‘
        from /usr/local/lib/ruby/gems/2.3.0/gems/redis-3.3.2/lib/redis.rb:2704:in `method_missing‘
        from ./redis-trib.rb:212:in `flush_node_config‘
        from ./redis-trib.rb:776:in `block in flush_nodes_config‘
        from ./redis-trib.rb:775:in `each‘
        from ./redis-trib.rb:775:in `flush_nodes_config‘
        from ./redis-trib.rb:1296:in `create_cluster_cmd‘
        from ./redis-trib.rb:1701:in `<main>‘
我的防火墙和开放端口都做了,selinux也关闭了,可还是不行,请大神赐教!

 

分析:版本的问题,把3.3.2的redis-gem换成3.3.0就可以了。

gem list
gem uninstall redis --version 3.3.2
gem install redis --version 3.0.0
gem list
[root@redis2 data]# gem list

*** LOCAL GEMS ***

redis (3.0.0)
这样就行了

 

Redis集群 搭建过程报错

标签:selinux   主从   post   data   nod   logging   main   inux   out   

原文地址:http://www.cnblogs.com/TomJay/p/8087603.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!