The discussion revolves around an error encountered when trying to bootstrap Discourse, with the error message “postgres already running stop container”.
lolmewn initially reports the issue, and sam suggests rebooting the system to resolve it. Vitach also experiences the issue and reboots, which resolves the problem.
Dwalus later reports the same issue, and sam suggests checking the output of docker ps. After running the command, Dwalus finds that the app is running, and sam advises against bootstrapping a running app. Instead, sam recommends running ./launcher rebuild app, which will both bootstrap and restart the app.
sam emphasizes that ./launcher rebuild is the recommended approach, as it eliminates the need to bootstrap again. codinghorror suggests adding protection to prevent bootstrapping a running app, which sam agrees to implement.
I’m attempting to install Discourse, but am failing so far. It appears that bootstrapping doesn’t want to… bootstrap?
Anyhow, I read a couple of other threads about it and tried “./launcher rebuild app”, which gave the following output:
WARNING: No memory limit support
WARNING: No swap limit support
Updating discourse docker
Already up-to-date.
Calculated ENV: -e LANG=en_US.UTF-8 -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=/var/run/postgresql -e DISCOURSE_DB_HOST= -e DISCOURSE_DB_PORT= -e HOME=/root -e DISCOURSE_DEVELOPER_EMAILS=myEmail -e DISCOURSE_HOSTNAME=myWebsite -e DISCOURSE_SMTP_ADDRESS=smtp.mandrillapp.com
cd /pups && git pull && /pups/bin/pups --stdin
From https://github.com/SamSaffron/pups
f7a125b..ac9bdf8 master -> origin/master
Updating f7a125b..ac9bdf8
Fast-forward
README.md | 2 +-
lib/pups/config.rb | 14 +++++++++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
I, [2014-09-13T20:18:17.839357 #47] INFO -- : Loading --stdin
I, [2014-09-13T20:18:17.846012 #47] INFO -- : > mkdir -p /shared/postgres_run
I, [2014-09-13T20:18:17.851117 #47] INFO -- :
I, [2014-09-13T20:18:17.852106 #47] INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2014-09-13T20:18:17.856033 #47] INFO -- :
I, [2014-09-13T20:18:17.857172 #47] INFO -- : > chmod 775 /shared/postgres_run
I, [2014-09-13T20:18:17.861779 #47] INFO -- :
I, [2014-09-13T20:18:17.862868 #47] INFO -- : > rm -fr /var/run/postgresql
I, [2014-09-13T20:18:17.867169 #47] INFO -- :
I, [2014-09-13T20:18:17.868189 #47] INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2014-09-13T20:18:17.872311 #47] INFO -- :
I, [2014-09-13T20:18:17.873194 #47] INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
I, [2014-09-13T20:18:17.880853 #47] INFO -- : postgres already running stop container
FAILED
--------------------
RuntimeError: socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1 failed with return #<Process::Status: pid 54 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:85:in `spawn'
exec failed with the params "socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1"
fe396f76ce0ba379260b0a625c3007cf1d2f13343b7de29f3376ffd5fbb02e2b
FAILED TO BOOTSTRAP
Hi.
I have the same issue. Tried to run “./launcher start app” command from https://github.com/discourse/discourse/blob/master/docs/INSTALL-digital-ocean.md instructions on Amazon EC2 linux ami last version. Everything was fine but during running the command the connection was lost and after reconnecting I getting the same error when trying to run that command again.
root@maps:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
29a0fb6df815 local_discourse/app:latest "/sbin/boot" 24 minutes ago Up 7 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:2222->22/tcp app
If this is the case bootstrap should complain if stuff is running and you’re bootstrapping again. Any rudimentary protection we can add here to reduce support requests?