# 502 error on nginx

**URL:** <https://meta.discourse.org/t/502-error-on-nginx/160592>\
**Category:** Self-hosting\
**Created:** [August 12, 2020, 6:05am UTC](https://meta.discourse.org/t/502-error-on-nginx/160592 "2020-08-12T06:05:04Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![elopio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elopio/32/218413_2.png) [@elopio](https://meta.discourse.org/u/elopio)\
**Post date:** [August 12, 2020, 6:05am UTC](https://meta.discourse.org/t/502-error-on-nginx/160592/1 "2020-08-12T06:05:05Z")

</div>

Hello,

I’ve just run `./launcher rebuild app` with no apparent errors. But when I try to open the site, I get a 502 error.

The nginx error log (`shared/standalone/log/var-log/nginx/error.log`) shows:

```plaintext
2020/08/12 05:47:43 [error] 653#653: *7 connect() failed (111: Connection refused) while connecting to upstream, client: [...], server: _, request: "GET / HTTP/2.0", upstream: "http://127.0.0.1:3000/", host: "[...]"

```

I’ve checked all the topics I found about discourse and nginx 502 errors but couldn’t find or understand anything that makes sense for my case.

This might be relevant, running from the container:

```plaintext
# netstat -plant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name    
tcp 0 0 0.0.0.0:6379 0.0.0.0:* LISTEN -                   
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 644/nginx: master p 
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN -                   
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 644/nginx: master p 
tcp6 0 0 :::6379 :::* LISTEN -                   
tcp6 0 0 :::5432 :::* LISTEN -

```

Is there something that should be running in port 3000?

Could you please guide me on where to look for more information to debug this problem?

pura vida 🙂

---

_[View the full topic](https://meta.discourse.org/t/502-error-on-nginx/160592)._
