Cloudflare 521-fout na upgrade naar 3.5.0.beta8-dev

Hi everyone,

After updating my Discourse site to 3.5.0.beta8-dev, I’m suddenly getting a 521 “Web server is down” error when accessing the site through Cloudflare. This is unexpected since I had previously configured it according to this guide, and it had been working perfectly until now.

Then I tried changing the SSL/TLS encryption mode in Cloudflare from Full (Strict) to Flexible, and the site loaded again.

Does anyone know why this might be happening after the update?
Is there something new in 3.5.0.beta8-dev that could affect Cloudflare compatibility or HTTPS handling?

Any help or suggestions would be greatly appreciated!

Thanks in advance!

Ik draai 3.5.0.beta8-dev met Full (strict) SSL met Cloudflare en heb geen problemen.

Een paar dingen om te controleren:

  • Controleer uw Let’s Encrypt - Bekijk uw upgrade logboek en valideer dat alles correct is herbouwd.
  • Controleer op wijzigingen in externe firewalls (DigitalOcean biedt externe firewalls)

De 521 en de overgang naar Flexible geven aan dat uw server niet is ingesteld met HTTPS.

Thanks for the suggestions! @LotusJeff

I’ve checked my SSL setup, and I’m not using Let’s Encrypt, I generated an Origin Certificate from Cloudflare, and placed the key and cert here:

I did a full rebuild after checking. But I’m still getting a 521 error when Cloudflare is set to Full (Strict).

Here’s the template section from my app.yml for reference:

templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
  ## Uncomment these two lines if you wish to add Lets Encrypt (https)
  - "templates/web.ssl.template.yml"
  # - "templates/web.letsencrypt.ssl.template.yml"
  - "templates/cloudflare.template.yml"

expose:
  - "80:80"   # http
  - "443:443" # https

Thanks again for taking the time to help!

Werkend vanuit het geheugen, hebben Cloudflare-certificaten een duur van 90 dagen. Dit vereist dat u elke 3 maanden nieuwe certificaten aanmaakt. Weet u nog hoe oud uw certificaten zijn?

De standaardinstelling is om Let’s Encrypt te gebruiken. Het systeem zal uw certificaten automatisch vernieuwen. Eén zorg minder om handmatig te beheren.

Cloudflare now privide Certificates that valid for up to 15 years, mine is still within the valid period.

That said, just to be sure, I also tried generating a new certificate and replaced the existing one, but I still got the same problem.

If I want to switch back to the default setup using Let’s Encrypt,
is it enough to simply:

  1. Uncomment this line in app.yml:
- "templates/web.letsencrypt.ssl.template.yml"
  1. And set Cloudflare’s SSL mode to Full?

Ik heb de overstap van privécertificaten naar Let’s Encrypt met Discourse nog nooit gemaakt, en met dat gezegd hebbende…

Binnen de app.yml moet je op twee locaties de commentaar verwijderen:

  1. Template regel voor - "templates/web.letsencrypt.ssl.template.yml"
  2. Het e-mailadres van het Let’s Encrypt-account:
## Als je de Let's Encrypt-template hebt toegevoegd, verwijder dan de commentaar hieronder om een gratis SSL-certificaat te krijgen
  LETSENCRYPT_ACCOUNT_EMAIL: <voeg hier je e-mailadres toe>

Als je andere handmatige wijzigingen hebt aangebracht in templates voor aangepaste SSL-certificaten, moeten deze worden teruggezet naar de standaardinstellingen.

De Let’s Encrypt-component bevindt zich aan het einde wanneer je de app opnieuw opbouwt. Houd deze in de gaten en kijk of je foutcodes ontvangt.

1 like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.