zoukankan      html  css  js  c++  java
  • 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)
    这样就行了

  • 相关阅读:
    tomcat集群安装
    jdk
    docker容器间互联
    part1-vulkan开发环境搭建
    宝塔面板mysql表误操作导致原数据表被删恢复过程(附php代码正则插入id)
    php Redis定时执行或延迟(异步)
    Tp5 微信公众号 获取用户信息 EasyWeChat使用
    Fastadmin Area模型返回没值 没对象georadius 源码里面没有$redis->geoadd 解决办法
    [CF Contest] 1059 A~C
    [多校练习] 成都七中数据结构 Challenge 系列解题报告
  • 原文地址:https://www.cnblogs.com/TomJay/p/8087603.html
Copyright © 2011-2022 走看看