V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
Coser
V2EX  ›  程序员

Apinto API 开源网关导入 Swagger 报错问题记录

  •  
  •   Coser · Mar 23, 2023 · 1321 views
    This topic created in 1136 days ago, the information mentioned may be changed or developed.

    问题描述

    Apinto Dashboard 已经部署完成,想通过导入 Swagger 文件的方式快速把接口同步到 Apinto Dashboard ,但此时导入报错:CLUSTERDOWN Hash slot not served,如下

    image.png

    问题原因

    Redis 容器的HOST变量配置错误,导致 Redis 集群分槽失败。

    image.png

    解决方案

    1 、删除挂载的 redis 文件目录

    我配置的挂载目录为./apinto/redis-cluster/data

    rm -fr ./apinto/redis-cluster/data
    

    2 、修改 HOST 为局域网 IP/本地 IP

    image.png

    3 、重新运行程序

    # 停止容器
    docker-compose down
    
    # 启动容器
    docker-compose up -d
    

    4 、检验 Swagger 导入功能

    image.png

    image.png

    顺利导入文件,这样就可以打通 API 管理和 API 网关产品了。

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2680 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 14:46 · PVG 22:46 · LAX 07:46 · JFK 10:46
    ♥ Do have faith in what you're doing.