简体   繁体   English

使用Kubernates集群在nGinx服务器中获取错误的网关502错误

[英]Getting bad gateway 502 error in nGinx server using Kubernates cluster

I am getting a error while loading my one of microservices in node nGnix server using Kubernates cluster. 使用Kubernates集群在节点nGnix服务器中加载我的微服务之一时出现错误。

Here is the error: 这是错误:

110#110: *20 connect() failed (111: Connection refused) while connecting to upstream, client: 61.xxx.221.179, server: dev.XXXXX.in, request: "GET /api/ticket/getTicketDetails HTTP/1.1", upstream: "http://100.96.x.xxx:3001/api/ticket/getTicketDetails", host: "dev.XXXX.in"

Can someone please help me on this? 有人可以帮我吗?

Please do, 请做

kubectl exec -it meta_data_name -- /bin/bash kubectl exec -it meta_data_name-/ bin / bash

curl http://100.96.x.xxx:3001/api/ticket/getTicketDetails 卷曲http://100.96.x.xxx:3001/api/ticket/getTicketDetails

Mostly, this will fail as the upstream might not be running or there is no connectivity to it. 通常,这将失败,因为上游可能没有运行或没有连接。

Check for logs inside the nodeJs micro-service to find if it is termination on incoming requests due to some error. 检查nodeJs微服务内的日志,以查找由于某种错误它是否终止了传入请求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM