0

I've got a failure by bootstrapping a Discourse: RuntimeError: cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile' failed with return #.

   171:signal-handler (1464162030) Received SIGTERM scheduling shutdown...
        2016-05-25 07:40:30 UTC [42-2] LOG:  received fast shutdown request
        2016-05-25 07:40:30 UTC [42-3] LOG:  aborting any active transactions
        2016-05-25 07:40:30 UTC [49-2] LOG:  autovacuum launcher shutting down
        2016-05-25 07:40:30 UTC [46-1] LOG:  shutting down
        2016-05-25 07:40:30 UTC [46-2] LOG:  database system is shut down
        171:M 25 May 07:40:30.426 # User requested shutdown...
        171:M 25 May 07:40:30.427 * Saving the final RDB snapshot before exiting.
        171:M 25 May 07:40:30.444 * DB saved on disk
        171:M 25 May 07:40:30.445 # Redis is now ready to exit, bye bye...


        FAILED
        --------------------
        RuntimeError: cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile' failed with return #<Process::Status: pid 289 exit 137>
        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'"]}
        b61c02fe6e3dbd6ab382d23592fab25bdcba02fc7666f20cd9874c521bf2e537
        ** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one
        root@ubuntu-512mb-nyc2-01:/var/discourse#

Also I've tried rebuilt and destroy that, but it isn't helping unfortunately.

root@ubuntu-512mb-nyc2-01:~# sudo ./launcher rebuild app
sudo: ./launcher: command not found
root@ubuntu-512mb-nyc2-01:~# cd /var/discourse
root@ubuntu-512mb-nyc2-01:/var/discourse# sudo ./launcher rebuild app
Ensuring launcher is up to date
Fetching origin
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 4 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (4/4), done.
From https://github.com/discourse/discourse_docker
   5819e89..8c92508  master     -> origin/master
Updating Launcher
Updating 5819e89..8c92508
Fast-forward
 templates/postgres.template.yml | 1 -
 1 file changed, 1 deletion(-)
Usage: launcher COMMAND CONFIG [--skip-prereqs] [--docker-args STRING]
Commands:
    start:      Start/initialize a container
    stop:       Stop a running container
    restart:    Restart a container
    destroy:    Stop and remove a container
    enter:      Use nsenter to get a shell into a container
    logs:       View the Docker logs for a container
    bootstrap:  Bootstrap a container for the config based on a template
    rebuild:    Rebuild a container (destroy old, bootstrap, start new)
    cleanup:    Remove all containers that have stopped for > 24 hours

Options:
    --skip-prereqs             Don't check launcher prerequisites
    --docker-args              Extra arguments to pass when running docker

    root@ubuntu-512mb-nyc2-01:/var/discourse# sudo ./launcher start app

    + /usr/bin/docker run -d --restart=always -e LANG=en_US.UTF-8 -e RAILS_ENV=production -e UNICORN_WORKERS=3 -e UNICORN_SIDEKIQS=1 -e RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 -e DISCOURSE_DB_SOCKET=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e DISCOURSE_HOSTNAME=cleaneone.com -e DISCOURSE_DEVELOPER_EMAILS=tamerlanium@gmail.com -e DISCOURSE_SMTP_ADDRESS=smtp.gmail.com -h ubuntu-512mb-nyc2-01-app -e DOCKER_HOST_IP=172.17.0.1 --name app -t -p 80:80 -p 443:443 -v /var/discourse/shared/standalone:/shared -v /var/discourse/shared/standalone/log/var-log:/var/log --mac-address 02:0f:a9:e5:74:fb local_discourse/app /sbin/boot
    Unable to find image 'local_discourse/app:latest' locally
    Pulling repository docker.io/local_discourse/app
    /usr/bin/docker: Error: image local_discourse/app not found.
    See '/usr/bin/docker run --help'.

root@ubuntu-512mb-nyc2-01:/var/discourse# sudo ./launcher destroy app
+ /usr/bin/docker stop -t 10 app
Error response from daemon: No such container: app
app was not found

1 Answer 1

0

I write down some tips, because i can't know if you're updating discourse or installing it for the first time:

Before launching rebuild, be sure that launcher and everything is updated:

cd /var/discourse
git pull
./launcher rebuild app

When you have a "Failed to bootstrap" error you can try to start the container yourself:

./launcher start app

If this doesn't take your forum back online, check that docker is updated:

docker --version

If it's not:

apt-get update; apt-get upgrade
1
  • 1
    Thanks dude, I fixed it by the using SWAP for a $5 Droplet on the DigitalOcean :)
    – organicnz
    Aug 3, 2016 at 3:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.