Unable To Connect/Connection Refused due to https certificates

We successfully installed Discourse through DigitalOcean using the following guide:

discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub

Our DNS is fully propagated, and we also installed our SSL CERTS per the following guide:

When browsing to our Discourse installation via IP or domain name, we get the following message:

This site can’t be reached

XX.XX.XX.XX refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED

What could be the problem?

Almost certainly a SSL problem. Try rebuilding with plain HTTP first to make sure everything is working before adding on the complexity of HTTPS.

Using let’s encrypt is an easy way to get ssl.

… thanks for your help.

I am running into this same issue, To rebuild with plain HTTP, does that require just commenting out the SSL template line in app.yml?

Yes, but browsers that have visited your site will refuse to connect. You really should use https.

For anyone that face it in the future, make sure to not exceed the rate limit of LetsEncrypt:

You can see if it was exceeded in the logs:

./launcher logs app

Ho ricevuto esattamente lo stesso messaggio da Chrome.

Nel mio caso, diverse configurazioni erano state impostate in modo errato: alcune erano impostazioni di Discourse, altre riguardavano la configurazione del server di hosting. Publico qui la mia checklist come riferimento per voi:

  1. Controlla /var/discourse/containers/app.yml

(Segui questo post: Allow SSL / HTTPS for your Discourse Docker setup )

Assicurati di permettere sia https che http (apri la porta 443, decommenta la configurazione del template relativa a SSL e le configurazioni correlate a Let’s Encrypt), oppure consenti solo richieste http (blocca la porta 443, commenta la configurazione del template relativa a SSL e le configurazioni correlate a Let’s Encrypt).

Se sono state apportate modifiche a app.yml, esegui ./launcher rebuild app per attivare le configurazioni aggiornate.

  1. Esegui ./launcher logs app.

Se hai fallito frequentemente nel ricostruire un server Discourse funzionante, come è successo a me, potresti aver richiesto troppe credenziali Let’s Encrypt nello stesso momento, superando il loro limite.

In tal caso, l’esecuzione di ./launcher logs app stamperà un json. che include un errore 429.

  1. Controlla le impostazioni del tuo Security group per l’istanza del server ECS

Nel mio caso, il Security group è semplicemente un insieme di porte autorizzate (ad esempio, 80 HTTP, 443 HTTPS), che ti consentono di controllare il traffico del tuo server verso l’esterno.

Assicurati di permettere le porte necessarie per ospitare Discourse.

  1. Controlla le impostazioni del firewall

Nel mio caso, il passaggio 3 non ha aperto le porte richieste. Si è verificato un problema con le impostazioni del mio firewall.

È strano che non avessi mai configurato il firewall per il mio server, ma quelle porte sono state effettivamente aperte dopo aver eseguito:
apt install firewall-cmd
firewall-cmd --permanent --add-port=20-21/tcp (… e le altre porte)
firewall-cmd --reload

Puoi verificare lo stato delle porte aperte per il tuo dominio utilizzando alcuni servizi online.

Ho avuto lo stesso problema: limite di frequenza superato per i certificati.

Risolto seguendo il tuo passaggio n. 1 (commentando i 2 modelli SSL in app.yml) e aprendo il sito in un altro browser dopo la ricostruzione.

Presumo che potrò riattivare SSL dopo che sarà passata una settimana.

Sei riuscito a collegarti dopo una settimana?