Failed bootstrapping web container (data successfully done)

After a bit of fiddling around with the data container i finally got it running. Unfortunately i’m stuck with the web container in my multisite installation.

Here’s the error i get:

FAILED
--------------------
RuntimeError: cd /var/www/discourse && sudo -E -u discourse bundle exec rake multisite:migrate failed with return #<Process::Status: pid 164 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:105:in `spawn'
exec failed with the params "cd /var/www/discourse && sudo -E -u discourse bundle exec rake multisite:migrate"
$longnumber
FAILED TO BOOTSTRAP

and here’s my cleaned up web.yml

templates:
  - "templates/sshd.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"

expose:
  - "80:80"
  - "2222:22"

params:
  version: tests-passed

env:
  LANG: en_US.UTF-8
  UNICORN_WORKERS: 4

  DISCOURSE_DB_SOCKET: ''
  DISCOURSE_DB_USER: discourse
  DISCOURSE_DB_PASSWORD: 'mypw'
  DISCOURSE_DB_HOST: 172.17.0.74
  DISCOURSE_REDIS_HOST: 172.17.0.74
  DISCOURSE_DEVELOPER_EMAILS: 'my@adminemail.com'
  DISCOURSE_HOSTNAME: 'first.discourse.org'
  DISCOURSE_SMTP_ADDRESS: smtp.mandrillapp.com            # (mandatory)
  DISCOURSE_SMTP_PORT: 587                                # (optional)
  DISCOURSE_SMTP_USER_NAME: mandrill@adminemail.com             # (optional)
  DISCOURSE_SMTP_PASSWORD: mandrillkey         # (optional)
  #DISCOURSE_CDN_URL: //discourse-cdn.example.com

volumes:
  - volume:
      host: /var/discourse/shared/webonly
      guest: /shared
  - volume:
      host: /var/discourse/shared/web/log/var-log
      guest: /var/log

hooks:
  after_code:
    - file:
        path: /var/www/discourse/config/multisite.yml
        contents: |
          secondsite:
            adapter: postgresql
            database: second_db
            username: discourse
            password: mypw
            pool: 25
            timeout: 5000
            host: 172.17.0.74
            db_id: 2
            host_names:
              - second.discourse.org

  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - mkdir -p plugins
          - git clone https://github.com/discourse/docker_manager.git

  after_web:
    - exec: cd /var/www/discourse && sudo -E -u discourse bundle exec rake multisite:migrate

## Remember, this is YAML syntax - you can only have one block with a name
run:
  - exec: echo "Beginning of custom commands"

  - exec: echo "End of custom commands"
  - exec: awk -F\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Authorized SSH keys for this container:"; } NF>=2 {print $NF;}'

Probably i’m just overseeing anything easy but i’m just stuck and hope someone can help here.

Thanks,
Frank

What happens if you do:

link:
  - data:
    name: data
    alias: data

# ...

  DISCOURSE_DB_HOST: data
  DISCOURSE_REDIS_HOST: data

Also, including the actual error would be nice. It’ll be farther up.

The error stays and here’s what i think you mean by “the actual error”:

I, [2014-11-22T06:58:14.892268 #38]  INFO -- : > cd /var/www/discourse && sudo -E -u discourse bundle exec rake multisite:migrate
/usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/lib/bundler/spec_set.rb:92:in `block in materialize': Could not find minitest-5.4.2 in any of the sources (Bundler::GemNotFound)
        from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/lib/bundler/spec_set.rb:85:in `map!'
        from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/lib/bundler/spec_set.rb:85:in `materialize'
        from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/lib/bundler/definition.rb:132:in `specs'
        from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/lib/bundler/definition.rb:177:in `specs_for'
        from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/lib/bundler/definition.rb:166:in `requested_specs'
        from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/lib/bundler/environment.rb:18:in `requested_specs'
        from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/lib/bundler/runtime.rb:13:in `setup'
        from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/lib/bundler.rb:121:in `setup'
        from /usr/local/lib/ruby/gems/2.0.0/gems/bundler-1.7.7/lib/bundler/setup.rb:17:in `<top (required)>'
        from /usr/local/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /usr/local/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in `require'
I, [2014-11-22T06:58:18.519868 #38]  INFO -- :

did some search in the forums for the missing minitest and found this. Looks like Multisite installation is currently broken as this seems to relate to migrate:multisite.

Hopefully this will help

Gemfile

group :test do
  gem 'fakeweb', '~> 1.3.0', require: false
  gem 'minitest', require: false
end

Gemfile.lock

minitest (5.4.2)

Gemfile_master.lock

minitest (5.4.3)
1 Like

first of all thanks so much for your help. Unfortunately i’m a complete noob when it comes to ruby and also quite new to discourse. What do i do with these 3 files? I didn’t find them within the repo so i guess i have to create them? Can you explain a bit further, please?

EDIT: found out that these files exist in the Discourse Repo. On my system they’re somwhere hidden in /var/lib/docker. I wonder if it’s good idea to search and edit there.

I suggest you do not edit them unless you want to risk breaking things.

I was merely highlighting the fact that there looks to be conflicting versioning and that it might be the cause of the “minitest” error message.

Version conflicts is something @riking or others should look into and fix if need be.