-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upstream Prematurely Closed Connection While Reading Response Header from Upstream - 502 Gateway error #12286
Comments
This issue is currently awaiting triage. If Ingress contributors determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
The controller does routing so 502 is a server-side response hence remove all those annotations you have first. Then send a request. Check logs. Then add the annotations on a as needed basis based on the logs. |
Hi @longwuyuan 2024/11/03 06:09:29 [error] 184#184: *94 upstream prematurely closed connection while reading response header from upstream, client: 192.168.58.11, server: opensearch-dashboard.example.com, request: "GET / HTTP/1.1", upstream: "http://10.244.3.84:5601/", host: "opensearch-dashboard.example.com"
192.168.58.11 - - [03/Nov/2024:06:09:29 +0000] "GET / HTTP/1.1" 502 559 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36" "-"
2024/11/03 06:09:30 [error] 184#184: *94 upstream prematurely closed connection while reading response header from upstream, client: 192.168.58.11, server: opensearch-dashboard.example.com, request: "GET /favicon.ico HTTP/1.1", upstream: "http://10.244.3.84:5601/favicon.ico", host: "opensearch-dashboard.example.com", referrer: "https://demo-dashboard.example.com/"
192.168.58.11 - - [03/Nov/2024:06:09:30 +0000] "GET /favicon.ico HTTP/1.1" 502 559 "https://demo-dashboard.example.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36" "-" |
ok. now, please click on new bug report only to look at the template of a new bug report. Then come here and edit the description of this issue. Answer the questions asked in the new bug report template. Ensure that all the content is in markdown format. This way there will some info to analyze. right now, other than a few lines of log, there is nothing to analyze. You may want to add the commands & outputs of other information in addition to what is asked in the template. Like ;
Of particular interest will be the curl command and output with -iv. If your backend pod is slow to respond, it seems that the backend pod is either starved for CPU/Memory/Inodes/Conntrack or it is not designed to work behind another reverseproxy. Mitigation of-course can be timers like you had set before, but this is proof that you do know not the response time needed over reverse-proxy. Generally the default timeouts are enough. If a backend needs extra-long timeouts, you may make it "functional" for a test like here, but when the real-use of tons of traffic comes-in, then the timeouts will not be enough as the work for the backend will increase multi-fold. |
@longwuyuan |
You are using the controller released by the company F5 that owns NGINX. its evident because of this iamge name This project is the Kubernetes Community ingress controller. So I am closing this issue. You can reach out in the NGINX INC. forums /close |
@longwuyuan: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
What happened:
I'm running an OpenSearch cluster and trying to expose it through an NGINX Ingress resource. When I attempt to access the OpenSearch cluster via the NGINX Ingress, I get a 502 Bad Gateway error. However, if I access the service through port-forwarding, it works without any issues. although there is a bit of latency, the login page loads and functions correctly.
I've tried various solutions, but none have worked so far. My NGINX Ingress setup seems fine, as I deployed a simple web server and was able to access it without any problems.
I also checked the Ingress logs and found an error message, but I'm not sure how to resolve this. Any help would be greatly appreciated!
What you expected to happen:
In the browser only 502 error
NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):
ingress pod logs
Any other info
The text was updated successfully, but these errors were encountered: