Thought i’d give anyone a possible fix after I just encountered this problem of refused connection on ports 443 and 80 after a Discourse install on Digital Ocean.
My schoolboy error was closing the console when redis says “bye bye” which hangs for a minute or 2 making me close the console thinking it had finished.
You need to wait. Try doing an app rebuild and waiting with
cd /var/discourse
./launcher rebuild app
Hope this helps someone as i read all the posts saying DNS errors etc and then realised my mistake
Another thing you can do is use tmux so that those processes keep running if you close the connection. (And tmux attach to reconnect the next time you log in)
In that screen you upgrade your Discourse normally.
If you now close that windows, or leave it behind, it still runs there. If you open your shell, you find it using tmux attach -t 0 (because you propably hasn’t severeral sessions open).
And if you do something like I do with iPad, where I start upgraiding and change to watch a movie or doomscroll social media because working is a boring option, I can return to shell finding finished upgraiding and close that tmux window using exit and that’s it.
I never used tmux, but screen does the same. The basics are fairly simple, especially if your only goal is running a process for a while and nothing fancier.
It doesn’t require more than a command and one or two keyboard shortcuts.
Very much an edge case, but because I mostly work on iPad, I have two reasons to use tmux instead of screen
with screen I’m totally lost very fast where I am
I’ve never find way to scroll; now I got an un-familiar message when upgraiding, and because I used screen, all my scrolling is doing is browsing bash history
I also recommend tmux. It takes minutes to learn the basics and is a life saver for long running tasks.
In a previous role I had export processes that would run for over 24 hours and an disruption to internet access or the macbook going to sleep would mean a restart. tmux saved the day many times.