[Azure] 502 - Web server received an invalid response

Olá pessoal, desde ontem ao tentar configurar o Let’s Encrypt no Azure, só dá essa mensagem de erro no último passo:

Server errror.
## 502 - Web server received an invalid response while acting as a gateway or proxy server.

### There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.

O app já foi criado, o client secret também, extensão instalada, tudo.

Alguém poderia ajudar?

1 Like

Oi @diegofmotta,

Bem-vindo ao fórum da comunidade!

Você pode postar seu domínio para que possamos ajudar na solução de problemas?

Eu estou usando o Google Tradutor.

1 Like

Oi Phil, obrigado!

icollect.com.br

Seu certificado expirou e precisa ser renovado.

$ echo | openssl s_client -connect "icollect.com.br":443 -servername "icollect.com.br" -verify_hostname "icollect.com.br" 2>/dev/null | openssl x509 -noout -startdate -enddate
notBefore=Jul  7 22:37:52 2019 GMT
notAfter=Oct  5 22:37:52 2019 GMT

$ curl -IL icollect.com.br
HTTP/1.1 301 Moved Permanently
Content-Length: 0
Content-Type: text/html; charset=UTF-8
Location: https://icollect.com.br/
Server: Microsoft-IIS/10.0
Date: Mon, 07 Oct 2019 15:15:14 GMT

curl: (60) SSL certificate problem: certificate has expired
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

Você pode postar sua configuração do servidor web IIS?

2 Likes

@Phil_LE, I got the exact same error yesterday on Azure with the Let’s Encrypt Extension. However, this was my very first time attempting to set up a SSL on my App Service Site or Even connecting to Let’s Encrypt.

Question: Do you have to first set up an account on Let’s Encrypt before using the Azure Let’s Encrypt Extension?

I believe the error is related to this client bug assuming you’re both using sjkp/letsencrypt-siteextension.

2 Likes

Welcome to the community @VicSmith!

1 Like

Hi guys, that’s not the first time I configure Let’s Encrypt. I’ve already done it at least 4 times the same way I’m doing now.

I do it by the Azure Portal, I don’t execute commands with power shell or other ways. I always followed this article below and it worked pretty well until today.

The problem happens on the last step, when I click Next on this screen: “yoursite.scm.azurewebsites.net/letsencrypt/

Does anyone know how to solve it?

1 Like

Same happened for me this morning - I too followed Scott Hanselman’s instructions (it worked a couple of weeks ago when I set up different site)

Would be interested to hear about a solution :slight_smile:

1 Like

I can not configure new Azure Web Apps to use SSL since two days and it is becoming critical for us.
Is there any solution for this problem or a workaround. The extension currently available for Azure Web Application seem not to work anymore.

@stevet26 and @Rossi1972 Can you please post the domain(s) you’re attempting to issue for?

Hi guys,
I am facing the same problem.
https://docs.idynamics.es
Any idea?

Thanks

@CarlosAndreuLlaneras
Can you post a screenshot of the error or anything? I see that your service has a certificate issued today. I don’t use Azure so I’m not sure what this client looks like.

$ echo | openssl s_client -connect "docs.idynamics.es":443 -servername "docs.idynamics.es" -verify_hostname "docs.idynamics.es" 2>/dev/null | openssl x509 -noout -startdate -enddate
notBefore=Oct  9 15:25:54 2019 GMT
notAfter=Jan  7 15:25:54 2020 GMT

I have the same problem for the site www.doo.com.br

502 - Web server received an invalid response while acting as a gateway or proxy server.

There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server.

Hi @Phil_LE,
I’ve been deeping on this issue and a lot of people has the same problem.
In this discussion thread you will find detailled information on the issue:

Anyway I’ve solved my problem creating and installing a new Let’s Encrypt certificate as explained in this post:
https://www.annytab.com/setup-lets-encrypt-for-azure-web-apps/
Fortunately, right now, my website is ssl secured again…

Thanks

Hey

A work around has been found here: https://github.com/sjkp/letsencrypt-siteextension/issues/331#event-2694765113

You need to log on to Kudo using basic auth and this allows you to submit the request to install the cert.