Skip Navigation

Federation Upstream Error of my Lemmy Instance

Hello again,

thanks to your great feedback last time, I set up SSL with letsencrypt and got HTTPS working.

However, federation is still not working.

When troubleshooting as described in the docs I get the following Bad-Gateway error:

"~# curl -H "Accept: application/activity+json" https://<domain>/u/blueberry <html> <head><title>502 Bad Gateway</title></head> <body> <center><h1>502 Bad Gateway</h1></center> <hr><center>nginx</center> </body> </html>"

So apparently, its again the reverse-proxy, but this time, its not able to speak to the backend.

My nginx-error-file shows the following error: "2024/02/08 12:37:46 [error]: connect() failed (111: Connection refused) while connecting to upstream, client: <domain-ip>, server: <domain>, request: "GET /u/blueberry HTTP/2.0", upstream: "http://0.0.0.0:8536/u/blueberry", host: <domain>"

But using "docker ps" I find port 8536 open, so it should work.

Do you have any idea whats the problem here?

3
3 comments
  • When you get a 502 it usually means that your reverse proxy is unable to connect to your backend server. I'm not sure if you've obfuscated the URL in your post but 0.0.0.0 is not a valid IP (it just means ALL IPs). If you are attempting to connect on the same machine that is hosting use 127.0.0.1. if you are on the same network then use the local IP.

    • Thanks. It was due to me using a wrong port. Its working now.

      Sorry for the inconvinience