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
相关产品推荐
相关产品推荐

