• Redis集群 搭建过程报错


    集群配置: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)
    这样就行了

  • 相关阅读:
    小作业5
    小作业4
    Matplotlib基础
    Numpy学习笔记(下篇)
    Numpy学习笔记(上篇)
    机器学习的经典算法与应用
    opencv学习笔记D01
    Markdown新手入门
    python之生成器yeild
    pyinstaller打包.py程序为.exe操作指南
  • 原文地址:https://www.cnblogs.com/TomJay/p/8087603.html
Copyright © 2020-2023  润新知