evertramos / docker-portainer-letsencrypt

Portainer docker container over SSL Certificate using Let's Encrypt automated by our webproxy docker-compose-letsencrypt-nginx-proxy
GNU Lesser General Public License v3.0
189 stars 52 forks source link

502: Bad Gateway | No Live Upstream #11

Closed OliverTempel closed 2 years ago

OliverTempel commented 2 years ago

updated mattermost container to latest version, now i get the error 502: Bad Gateway. Proxy Logfile says: "no live upstreams while connecting to upstream"

Docker Container is running and connected to Proxy network. If i call container direct with port i got a connection.

So any suggestion where to look for this error?

OliverTempel commented 2 years ago

MatterMost docker-compose.yml `version: "2.4"

services: postgres: container_name: postgres_mattermost image: postgres:${POSTGRES_IMAGE_TAG} restart: ${RESTART_POLICY} security_opt:

OliverTempel commented 2 years ago

LogFile: `2022/05/04 09:20:42 [warn] 116#116: no resolver defined to resolve r3.o.lencr.org while requesting certificate status, responder: r3.o.lencr.org, certificate: "/etc/nginx/certs/community.gogrow.network.crt"

2022/05/04 09:20:42 [error] 116#116: *199 no live upstreams while connecting to upstream, client: x.x.x.x, server: community.gogrow.network, request: "GET / HTTP/2.0", upstream: "http://community.gogrow.network/", host: "community.gogrow.network" community.gogrow.network x.x.x.x - - [04/May/2022:09:20:42 +0000] "GET / HTTP/2.0" 502 150 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"

2022/05/04 09:20:42 [error] 116#116: *199 no live upstreams while connecting to upstream, client: 37.24.124.86, server: community.gogrow.network, request: "GET /favicon.ico HTTP/2.0", upstream: "http://community.gogrow.network/favicon.ico", host: "community.gogrow.network", referrer: "https://community.gogrow.network/" community.gogrow.network x.x.x.x - - [04/May/2022:09:20:42 +0000] "GET /favicon.ico HTTP/2.0" 502 150 "https://community.gogrow.network/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0"`

evertramos commented 2 years ago

@OliverTempel there is some sensitive information in your post... please remove.

Please confirm if you are using the latest version of the nginx-pxoxy-automation if so, make sure you are not hosting the dns behind a proxy, such as cloudflare or other.

Check the proxy logs and post here also the letsencrypt log to see if there is an erro with the ssl.

OliverTempel commented 2 years ago

@evertramos thx for removing updated to the latest version of nginx-pxoxy-automation there is no cloudflare or similiar service

LetsEncrypt Log: Creating/renewal sub.domain.de certificates... (sub.domain.de) [Wed May 4 20:00:42 UTC 2022] Domains not changed. [Wed May 4 20:00:42 UTC 2022] Skip, Next renewal time is: Mon May 9 21:04:37 UTC 2022 [Wed May 4 20:00:42 UTC 2022] Add '--force' to force to renew.

ProxyLog 2022/05/04 20:08:00 [error] 69#69: *69 connect() failed (111: Connection refused) while connecting to upstream, client: 0.0.0.0, server: sub.domain: "GET / HTTP/2.0", upstream: "http://172.18.0.7:80/"

First of all, thx 2 update, better log information. As i can see, proxy tries to connect on port 80. But application is running on port 8065 and mapping is correct => 8085:8065 under published ports

OliverTempel commented 2 years ago

After Adding VIRTUAL_PORT everything runs smooth. THX

ticket can be closed

evertramos commented 2 years ago

You could open a gitrepo related with nginx-proxy-automation with this mattermost configuration and publish for other as well. I didn't know this app.