Failed to bootstrap on AWS

docker

(Dnhynh) #1

I’m trying to launch discourse on AWS but it’s failing to bootstrap every time. I’m following this guide:

https://blog.nahtnam.com/how-to-setup-discourse-on-amazon-aws/

this is my app.yml configuration:

params:
  ## Which Git revision should this container use? (default: tests-passed)
  version: tests-passed

env:
  LANG: en_US.UTF-8
  ## TODO: How many concurrent web requests are supported?
  ## With 2GB we recommend 3-4 workers, with 1GB only 2
  UNICORN_WORKERS: 2

  ## TODO: configure connectivity to the databases
  DISCOURSE_DB_SOCKET: ''
  DISCOURSE_DB_USERNAME: [aws-username]
  DISCOURSE_DB_PASSWORD: [aws-db-password]
  DISCOURSE_DB_HOST: [aws-db-endpoint]
  ##
  ## TODO: List of comma delimited emails that will be made admin and developer
  ## on initial signup example 'user1@example.com,user2@example.com'
  DISCOURSE_DEVELOPER_EMAILS: [my-email]
  ##
  ## TODO: The domain name this Discourse instance will respond to
  DISCOURSE_DB_POOL: 15
  DISCOURSE_DB_NAME: discourse
  DISCOURSE_HOSTNAME: '54.148.48.60'  ##using ip address
  DISCOURSE_REDIS_HOST: [aws-elasticache-endpoint]
  ##
  ## TODO: The mailserver this Discourse instance will use
  DISCOURSE_SMTP_ADDRESS: smtp.mandrillapp.com         # (mandatory)
  DISCOURSE_SMTP_PORT: 587                        # (optional)
  DISCOURSE_SMTP_USER_NAME: [my-mandrill-username]      # (optional)
  DISCOURSE_SMTP_PASSWORD: [mandrill-password]               # (optional)
  ##
  ## The CDN address for this Discourse instance (configured to pull)
  #DISCOURSE_CDN_URL: //discourse-cdn.example.com

When I bootstrap I get this error

RuntimeError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 333 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:105:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}

I also get this error earlier on but I did some research and it seems that it is merely cosmetic and unrelated to the issue I’m having:

Failed to report error: Name or service not known 3 PG::UndefinedTable: ERROR:  relation "users" does not exist
LINE 5:                WHERE a.attrelid = '"users"'::regclass

(Chad J Carter) #2

For what it’s worth, I just started building the same configuration and I’m at the same point of failure.
Have you made any progress?

Above the Line 5 error, I receive:

Bundle complete! 92 Gemfile dependencies, 173 gems now installed.
Gems in the group development were not installed.
Bundled gems are installed into ./vendor/bundle.

I, [2015-08-28T12:48:53.085264 #38]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
Failed to report error: Name or service not known 2 Name or service not known subscribe failed, reconnecting in 1 second.

and a little later:

URGENT: Name or service not known Failed to initialize site default
Failed to report error: Name or service not known 2 Name or service not known subscribe failed, reconnecting in 1 second.

(Dnhynh) #3

I did figure out my problem. Send me more of the log where the error starts.


(Sylvain Kalache) #4

Getting the same issue, how did you solve it?