"postgres already running " on

I have a working Discourse installation which I have rebuilt multiple times already (Ubuntu Xenial own server).

When I tried to rebuild, I got the message below which is similar to an old one on [Solved]Bootstrap fails, Postgres already running.

For testing, I have rebooted the server multiple times, the old site comes up ok, but rebuild gives an error. I have also removed all plugins/hooks with the exception of docker_manager, so the the configuration is essentially the vanilla app with edited SMTP/Hostname

/var/discourse> ./launcher rebuild app
Ensuring launcher is up to date
Fordere an von origin
Launcher is up-to-date
cd /pups && git pull && /pups/bin/pups --stdin
Already up-to-date.
I, [2018-06-18T08:47:49.810104 #15]  INFO -- : Loading --stdin
I, [2018-06-18T08:47:49.816411 #15]  INFO -- : > locale-gen $LANG && update-locale
I, [2018-06-18T08:47:50.781237 #15]  INFO -- : Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.

I, [2018-06-18T08:47:50.781546 #15]  INFO -- : > mkdir -p /shared/postgres_run
I, [2018-06-18T08:47:50.784517 #15]  INFO -- :
I, [2018-06-18T08:47:50.784814 #15]  INFO -- : > chown postgres:postgres /shared/postgres_run
I, [2018-06-18T08:47:50.788055 #15]  INFO -- :
I, [2018-06-18T08:47:50.788307 #15]  INFO -- : > chmod 775 /shared/postgres_run
I, [2018-06-18T08:47:50.790687 #15]  INFO -- :
I, [2018-06-18T08:47:50.790944 #15]  INFO -- : > rm -fr /var/run/postgresql
I, [2018-06-18T08:47:50.794644 #15]  INFO -- :
I, [2018-06-18T08:47:50.794990 #15]  INFO -- : > ln -s /shared/postgres_run /var/run/postgresql
I, [2018-06-18T08:47:50.798345 #15]  INFO -- :
I, [2018-06-18T08:47:50.798586 #15]  INFO -- : > socat /dev/null UNIX-CONNECT:/shared/postgres_run/.s.PGSQL.5432 || exit 0 && echo postgres already running stop container ; exit 1
I, [2018-06-18T08:47:50.806563 #15]  INFO -- : postgres already running stop container



FAILED
--------------------
Pups::ExecError: 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 46 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:108: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"
4e76a883566b279a03ae2ec4acb5b88e54de3b9fbe163a2314c2b8eaf579fc3f
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one
/var/discourse>

Rebuild was possible after manually stopping the running docker container.

Yes, I had always done a rebuild, not a bootstrap!

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.