You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu环境下Kong API Gateway配置gRPC服务第一步失败求助

排查Kong gRPC服务创建失败(第一步)的方案

常见问题及修复步骤

  • 检查Kong Admin API的访问状态
    确认Kong服务在Ubuntu上正常运行,默认Admin API端口为8001:

    sudo systemctl status kong
    sudo ufw allow 8001/tcp
    
  • 验证gRPC后端的可达性
    确保Kong所在服务器能连接到后端gRPC服务的IP和端口(默认50051):

    telnet <grpc-backend-ip> 50051
    grpcurl -plaintext <grpc-backend-ip>:50051 list
    
  • 核对Admin API请求参数
    创建gRPC服务必须指定protocol=grpc,示例正确请求:

    curl -X POST http://localhost:8001/services \
      -d name=grpc-service \
      -d protocol=grpc \
      -d host=<grpc-backend-host> \
      -d port=50051
    

    避免错误:不要将protocol设为http,不要给host加http://前缀。

  • 查看Kong错误日志定位原因
    Ubuntu下Kong日志默认路径为/var/log/kong/,实时查看错误信息:

    sudo tail -f /var/log/kong/error.log
    
  • 确认Kong版本兼容性
    Kong 1.3及以上版本才支持原生gRPC转发,检查当前版本:

    kong version
    

    版本过低建议升级至最新稳定版。


内容的提问来源于stack exchange,提问作者Mithulram.G

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.19 01:40:44