`./launcher` hangs constantly on Amazon EC2


(Dan Chao) #1

I’ve been doing quite a bit of setting up/tearing down discourse via ./launcher, and I’ve noticed that various stages of either bootstrap or start hang, for no apparent and without any logs. I would then just quit the process and try again until it works.

Does anybody else have this issue? Just this morning, ./launcher bootstrap app was hanging after the first line:

Calculated ENV: -e HOME=/root -e RAILS_ENV=production -e UNICORN_WORKERS=3 -e UNICORN_SIDEKIQS=1 -e RUBY_GC_MALLOC_LIMIT=40000000 -e RUBY_HEAP_MIN_SLOTS=800000 -e DISCOURSE_DB_SOCKET= -e DISCOURSE_DB_HOST=####### -e DISCOURSE_DB_PORT= -e DISCOURSE_DEVELOPER_EMAILS=####### -e DISCOURSE_DB_PASSWORD=####### -e DISCOURSE_DB_POOL=15 -e DISCOURSE_HOSTNAME=###### -e DISCOURSE_DB_USERNAME=###### -e DISCOURSE_DB_NAME=Discourse -e DISCOURSE_REDIS_HOST=###### -e DISCOURSE_SMTP_ADDRESS=####### -e DISCOURSE_SMTP_PORT=587 -e DISCOUSRE_SMTP_DOMAIN=###### -e DISCOURSE_SMTP_USER_NAME=###### -e DISCOURSE_SMTP_PASSWORD=######

I subbed out all the identifying information in my configs, but I’d see that in my shell and it would just hang, until I stopped the process.

This is just one of many times that my setup hangs.

I’m setting this up via Docker on an EC2 box, and run these commands as root. I can also verify that all my configs are correct.


(Sam Saffron) #2

What does docker info return?


(Dan Chao) #3
Containers: 3
Images: 8
Storage Driver: aufs
 Root Dir: /var/lib/docker/aufs
 Dirs: 14
Execution Driver: native-0.2
Kernel Version: 3.2.0-64-virtual

There’s 3 containers because I ran bootstrap 3 times before it succeeded


(Sam Saffron) #4

and … what is docker version


(Dan Chao) #5
sudo docker version

Client version: 1.0.0
Client API version: 1.12
Go version (client): go1.2.1
Git commit (client): 63fe64c
Server version: 1.0.0
Server API version: 1.12
Go version (server): go1.2.1
Git commit (server): 63fe64c

(Jeff Atwood) #6

Not sure if it matters but I noticed my Kernel Version on my Digital Ocean droplet Discourse instance is

Kernel Version: 3.8.0-29-generic

versus what you show which is

Kernel Version: 3.2.0-64-virtual

(Dan Chao) #7

Interesting. I can give this a shot and see if this fixes my issues.


(Jeff Atwood) #8

Linux 3.2 kernel was released 4 Jan 2012
Linux 3.8 kernel was released 18 Feb 2013

So 3.2 is somewhat older. And looks like “known issues” with 3.0 and 3.2 Kernels in Docker?

https://groups.google.com/forum/#!topic/docker-user/mSyIgmP5JQg


(Dan Chao) #9

Seems like that did it! Thanks @codinghorror & @sam

Just to wrap this up, I’m using OpsWorks just to pull down discourse into /var/docker, and create app.yml with the proper configs. The box is Ubuntu 12.04. The way I’m starting docker is sshing into the box and doing this

# install the backported kernel
$ sudo apt-get update
$ sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring

# reboot
$ sudo reboot

Then I do the usual ./launcher business like usual after reboot.