502 Bad Gateway with LetsEncrypt

I getting a 502 error when trying to access Sonarr’s webpage when connecting through Let’sEncrypt. Made sure to put them on the same container network, forwarded ports on my router (verified I can telnet to the server on both port 80 and 443), used the default proxy.conf file as I am using LIO’s Sonarr container. Below is my Let’sEncrypt config.

I did notice in the Nginx error logs there are some connection refused errors.

are you connecting from inside your network or outside of your network?
share the sonarr.subdomain.conf and your sonarr config; can you access sonarr directly?

8085 isn’t the right port, so that’s likely the issue, we’ll see for sure when you share your subdomain.conf

I have tried connecting from my phone with WiFi off and over VPN with the same results. Here is link to my config file and Sonarr configuration.

Can you access sonarr directly? http://:8989

Yes, I am able to access it directly. I just tried Radarr as well and get the same error. Radarr.subdomain.conf is default settings that come during install.

ok let’s get some more logs from nginx then, just remember to only do external because internally/vpn that won’t work right because of your port choices.

im confused as to why in the original log snip you had port 8085 showing.

for this one, tail the error/access.log and try to access the site via your mobile phone off wifi, then obfuscate and upload.

I would also suggest joining us on discord for MUCH quicker responses :slight_smile:

Just joined your server :slight_smile: biggiesize#5383

User rebuilt the container and the issue was resolved

5:20 PM] biggiesize: @driz It must have been something in one of the configs. I removed the container, cleaned up the appdata folder and re-composed. Now it’s working as expected.