Connection Refused after DigitalOcean Droplet Upgrade?


(Leo B) #1

When I try to access my Discourse forum, I get this message in Google Chrome:

ERR_CONNECTION_REFUSED

I have Discourse installed on a DigitalOcean droplet.

I know that DigitalOcean have upgraded my droplet today. However, that upgrade apparently happend 3 hours ago. The outage during the upgrade should have lasted only a couple of minutes.

In their email, DigitalOcean say…

If you have any issues please check your configuration as specific services you are running may need to be restarted.

I know how to connect using SSH, and I have a basic understanding of how to execute commands over Terminal.

Is there anything I can do to get Discourse running again?

I had been assuming that Discourse would restart automatically after a machine reset. But apparently it isn’t.

Thanks for help, guys!


After initial setup of DigitalOcean droplet, get Refused to Connect error
#2

This is interesting, and sounds like it could be quite a few things. First, have you tried accessing the site from a different browser or computer? I’d also want to do a quick reboot, and:

ifconfig

To see that my IP address hadn’t changed. The fact that you’re saying it tooks hours to upgrade where it should have taken minutes makes me wonder if there was a problem with a host and you were for some reason issued a new IP address at some point.

So I’d first try it from a different browser and computer to confirm the issue is not local, then try to pinpoint where the issue may be on your droplet. Look at the IP address you have pointing to the domain for discourse, and compare that to the results of ifconfig. Do they differ?


(Leo B) #3

Thank you, @pl3bs.

I tried from a different computer with a different IP, and the issue is the same.

The upgrade itself did not take hours. I only see this in my “Droplet History” on DigitalOcean:

Power On about 6 hours ago 5 seconds

I did not do anything to my droplet – so assume that this “power on” event must have been related to DigitalOcean upgrading my droplet. It’s now six hours past, so I assume that somehow, when the server restarted, Discourse wasn’t restarted.

The domain name I use to call my Discourse installation is pointing to an IP address that matches the IP address shown under “Public Network IP” in DigitalOcean. Also, when I log in using SSH, I use that same address.

When I run “ifconfig” on the server (using SSH), it spits out a lot of information. The server’s IP address is not among that data though.


#4

It’ll be listed in that information. Try again.

eth0      Link encap:Ethernet  HWaddr 00:xx:90:xx:b5:xx
      inet addr:xx.35.xx.143  Bcast:xx.35.x.159  Mask:255.255.255.224
      inet6 addr: fe80::xxx:90ff:xxxx:b5b6/64 Scope:Link

You can see the IP address here is listed after inet addr

So the easy things to try from here are these commands:

docker stats app

does this return values of your memory and cpu usage? if so, the container is running. that’s good. if not, try these commands:

cd /var/discourse
./launcher restart app

if that causes issues, try:

./launcher rebuild app

and look for any errors in the process and report them back here.


(Leo B) #5

Thank you, @pl3bs.

output of $ docker stats app

FATA[0000] app: Get http:///var/run/docker.sock/v1.17/containers/app/stats: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS? 

Should I go ahead with ./launcher restart app anyway?


#6

you need sudo access to enter that command. if you don’t have access to the root acct, try:

sudo docker stats app

restarting is not an issue, go for it.


(Leo B) #7

I am logged in as “root”.


#8

You need to be in the /var/discourse directory (assuming this is where you installed discourse) to run launcher. You are running a docker based discourse instance, correct?

Try again after

cd /var/discourse

(Leo B) #9

Sorry. Stupid mistake.

Here’s what I get:

I can’t say. @AdamCapriola installed it for me. Is there any way I can make sure what kind of an install it was?


(Adam Capriola) #10

Yes it’s a docker-based install.


#11

Yea, if he’s got a launcher it’s a docker install. It appears that docker is not working correctly.

Try:

service docker restart

then see if you can run the launcher-restart command


(Leo B) #12

This did the trick.

After that, my website first showed this for a few seconds:

And afterwards the forum was back online.

Big thanks to @pl3bs, and also to @AdamCapriola for chiming in.


(Jeff Atwood) #13

Is your Docker out of date? When did you perform this install? What does

docker --version 

report? Current version is 1.6.2 so I recommend updating your Docker:

apt-get update
apt-get install lxc-docker

then I’d reboot


(Leo B) #14

Thank you, @codinghorror!

It was indeed outdated (1.5). I ran the update according to your instructions.

How do I reboot?

Just this?:

> service docker restart

Or what other command, or sequence of commands?

I’d wanna be sure that Discourse will run after the reboot.

Thanks.


(Jeff Atwood) #15

Discourse will always run after reboot. I recommend rebooting the server after upgrading Docker though.


"This site can’t be reached"