Port issue - Please help

Hi;

I’ve purchased a VPS from digital ocean and used there one click install for discourse droplet.

After entering the domain name etc. and doing the standard set up. Every time I go to my vps ip address (discourse has been installed on the main domain which I’ve pointed to the vps ip). Every time I go to the vps ip. It keeps saying:

This site can’t be reached

(MY-VPS-IP) refused to connect.

Try:

  • Checking the connection
  • [Checking the proxy and the firewall]

ERR_CONNECTION_REFUSED

I’ve opened the http and https ports as well and thats showing as open when I run the sudo ufw status command.

I’ve tried clearing my cache in case its a browser local issue; but still no luck.

Any suggestions/help? If anyone has any ideas or needs additional information; feel free to post below.

You should use the Discourse official Standard Installation.

Discourse requires a hostname. It cannot run with a bare ip number.

Make sure that you don’t have some reverse proxy like cloudflare.

1 Like

I set it up using a domain name and pointed it towards the ip correctly. It still gives me a refused to connect. Even after waiting for over 24hrs.

Update:

We installed apache2 to see if the ports are working etc and we’ve opened the ports.

Apache2 showed up fine on the ip address but as soon as we removed apache2; we got the original issue again.

We believe it to be an issue with docker and the ports. We just dont know how to fix it.

Any ideas to help?

For reference; we’ve also contact digitalocean as we used the discourse install from there marketplace.

Destroy that droplet and reinstall following Discourse official Standard Installation

1 Like

I’ve just tried that and the issue is still the same.

Refused to connect.

What is your droplet IP and domain name?

What is the output of docker ps ?

Droplet ip: 104.248.170.134 (it’s got the domain robloxfrance.com pointing towards it. But i’ve only recently updated the dns records to point the domain to the ip.)

Docker ps output:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
0296e70dba0b local_discourse/app “/sbin/boot” 6 minutes ago Up 6 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp app

If you pointed the DNS after running the setup, you will fail the certificate emission step and may end up with nginx failing to start.

Can you try a ./launcher rebuild app.

1 Like

I’ve just tried the ./launcher rebuild app

Still no luck.

What is the output of curl -v localhost ?

*   Trying 127.0.0.1:80...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 80 (#0)
> GET / HTTP/1.1
> Host: localhost
> User-Agent: curl/7.68.0
> Accept: */*
>
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer

Update:

We tried this command: sudo systemctl restart docker.service

Which worked for a split second when we refreshed the web page (brought up ngix web server) but when we refreshed again; it went back to refused to connect.

We also ran: docker run -it --rm hello-world

which was executed fine and without error.

At the moment we’re thinking it could be a discourse issue and not a docker issue.

Any help is appreciated.

We just ran the docker log command: ./launcher logs app

Which gave us this:

If anyone can help; it’d be appreciated.

Looks like you ordered way too many certificates for this domain this week. You now will need to wait a week, as you can only get 5 per week.

We’re currently commenting out the SSL and rebuilding to see if that works better.

We’re currently re-configuring the discourse installation on the vps, so we dont use the lets encrypt email.

update:

Update:

We re-configured the installation and ran the normal installation and didnt ass the lets encrypt email. And now we’re back to the first situation of it refusing to connect.

It sounds like you’ve hit the let’s encrypt rate limits. It’s hard to figure out how not to use let’s encrypt, so you’re probably still requesting the certificate (but now if the certificate is going to expire, you won’t get a warning via email). If I’m right, then you can

  • wait until next week (easy unless you’re impatient)
  • use a different domain name (easy, unless you really love your name or are bad at DNS)
  • follow the Setting up Let’s Encrypt with Multiple Domains (fairly tricky for a novice)
  • pay someone to get help with the multiple domain thing and/or find that it is some other problem
1 Like