zoukankan      html  css  js  c++  java
  • jQuery火箭图标返回顶部代码

    报错信息

    Spring Boot项目中访问redis cluster报错:
    redis.clients.jedis.exceptions.JedisClusterMaxRedirectionsException: Too many Cluster redirections?(集群重定向过多)

    原因分析

    redis 绑定了多个ip
    eg:

    1. redis.conf 文件中bind 127.0.0.1 192.168.186.1
    2. 在创建集群时host使用127.0.0.1 eg: redis-cli --cluster create 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005 --cluster-replicas 1

    问题修复

    bind配置为主机ip(不要配置多个ip,也不要配置为回环地址127.0.0.1,配置为回环地址只有本机能访问,其他主机无法访问),重建集群 eg:redis-cli --cluster create 192.168.186.1:7000 192.168.186.1:7001 192.168.186.1:7002 192.168.186.1:7003 192.168.186.1:7004 192.168.186.1:7005 --cluster-replicas 1

    1. 所有节点redi.conf文件中bind配置为主机ip
    2. 删除所有节点中的nodes.conf 、rdb文件
    3. kill所有redis进程
    4. 重新启动所有redis实例
    5. 重建集群 redis-cli --cluster create 192.168.186.1:7000 192.168.186.1:7001 192.168.186.1:7002 192.168.186.1:7003 192.168.186.1:7004 192.168.186.1:7005 --cluster-replicas 1
    6. 重启项目即可正常访问

    如果重建集群时报错 :ERR] Node 192.168.186.1:7001 is not empty. Either the node already knows other nodes (check with CLUSTER NODES) or contains some key in database 0.
    可参考edis-cli --cluster create 创建redis集群报错

  • 相关阅读:
    C# DictionaryHelper
    C# Autofac 的 BeanFactory
    正则替换
    java页面表格导出为Excel实现
    CentOS 7 下安装Nginx
    认识Java 虚拟机的架构
    06 查看网卡实时流量
    05 找出占用CPU、内存过高的进程
    04 一键查看服务器资源利用率
    03 批量创建100个用户并设置随机密码
  • 原文地址:https://www.cnblogs.com/xiao-lei/p/12734773.html
Copyright © 2011-2022 走看看