Discourse Installation Fudged

I’ve installed Discourse successfully and have set it up. I attempted to add the Steam login plugin to app.yml, then ran ./launcher rebuild app and it gets stuck at

cd /var/www/discourse && su discourse -c 'bundle install --deployment --verbose --without test --without development

until the network connection is lost. When running ./launcher logs app I see nothing that indicates any sort of error. What should I do to troubleshoot this issue?

(Mmm… fudge…)

The first thing to check is whether there’s a firewall or other network middlebox between wherever you’re installing Discourse and the Internet, that could be getting in the way. If bundle install is hanging, it almost certainly means that the container can’t contact rubygems.org to download the packages it needs.

Also, when you say “the network connection is lost”, which connection do you mean? The complete log of the rebuild session, containing everything between the command start and termination, may show something that you don’t realise is important, but has meaning to someone more experienced with diagnosing these problems. Finally, a complete description of the environment you’re trying to run Discourse in (OS, hosting provider, etc) may be helpful.

1 Like

I’ll go more in depth :slight_smile:

  • DigitalOcean, the $10/mo 1GB RAM/30GB SSD Server, Ubuntu 16.04 (forgot to add)
  • Using PuTTY for SSH, and when rebuilding it takes about 15 minutes or so (while changing other settings before, SMTP settings in particular, it took roughly 5 minutes or less) but never actually completes afaik. The connection is lost and I’m forced to restart the connection. Not sure if it’s still working in the background and I need to give it more time, or if something is going wrong.

When I rebuild the container/app, should I wait for it to drop connection to then run ./launcher logs app?

So I rebuilt yet again after doing ./launcher stop app and it worked after a few minutes. I have no idea what happened, but it’s fixed. :stuck_out_tongue:

If the rebuild isn’t completing, then ./launcher logs app won’t help (that’s for logs generated while the app is running, not while it’s building). It’s a bit troubling that (it sounds like) your SSH connection is dropping; that sounds like a networking problem between you and the droplet, but DO networking is usually pretty solid. Couple that with apparent networking troubles to rubygems.org, and I’m inclined to think it was transient networking problems at DO that are now fixed, since everything is working again.

The Internet is a Mystery.

When SSH to a remote server to run some long running task, you’d better start tmux or screen tool, and run your command inside it. In case your lost SSH connection due to some reason, you can always connect again and reattach to the same tmux or screen session, your long running task won’t be interrupted.

If I remember correctly, the command you saw that launcher stuck at, is about installing and building some gems, that would take a couple minutes on your type of DO instance. You can either open another SSH connection or open another terminal window if you are using tmux/screen, and use top command to see what the system is busy doing. If there are busy processes(from CPU utilization perspective) then it probably is fine, just keep waiting. If no process is busy running, you may run into problem such as get blocked on network side.

3 Likes