Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

699
Views
epoll_wait() reported that client prematurely closed connection, so upstream connection is closed too while connecting to upstream, client:

I am using nginx as a reverse proxy to prometheus UI to add authentication to prometheus UI. Both Prometheus and Nginx are deployed as separate kubernetes pods and communicate with each other via kubernetes services.

Sometimes I see error messages like this when I receive 502 gateway error displayed when tried to launch Prometheus UI proxied via Nginx.

2021/08/09 15:17:20 [error] 22#22: *15 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.105.0, server: nginx-prometheus-proxy, request: "GET / HTTP/1.1", upstream: "http://192.168.43.215:8080/", host: "k8s-master01.example.com:30856"
192.168.105.0 - nanda [09/Aug/2021:15:17:20 +0000] "GET / HTTP/1.1" 502 157 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0" "-" 
2021/08/09 15:17:22 [error] 22#22: *15 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.105.0, server: nginx-prometheus-proxy, request: "GET / HTTP/1.1", upstream: "http://192.168.43.215:8080/", host: "k8s-master01.example.com:30856" 192.168.105.0 - nanda [09/Aug/2021:15:17:22 +0000] "GET / HTTP/1.1" 502 157 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0" "-"

But more often it fails with below error messages in Nginx logs.

2021/08/09 15:42:56 [error] 22#22: *22 connect() failed (111: Connection refused) while connecting to upstream, client: 192.168.105.0, server: nginx-prometheus-proxy, request: "GET / HTTP/1.1", upstream: "http://192.168.43.215:8080/", host: "k8s-master01.example.com:30856"

Tried many solutions suggested but still the 502 bad gateway issue persists. Any solutions are appreciated

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!