Failed to Bootstrap with "postgres already running"

AI-generated summary

A discussion titled “Failed to Bootstrap with ‘postgres already running’” revolves around an error encountered by davidkingham while rebuilding an app. The error indicates that Postgres is already running, preventing the app from bootstrapping. merefield suggests a reboot using the command sudo shutdown -r now, which resolves the issue for davidkingham. A side conversation between TheBestPessimist and merefield explores the similarity between the sudo reboot and sudo shutdown -r now commands, with merefield speculating that they may have the same effect under the hood.

This morning I tried to turn a plugin back on (moderator plugin) and got the following error when rebuilding the app. I then disabled the plugin and rebuilt again to only get the same error. I also tried disabling all the plugins. Any other ideas? This is on my sandbox so it’s not critical. It was working fine prior to this and I didn’t make any other changes besides a git pull.

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 44 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112: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"
740f79002f403805b363a73f114aef7a2075556ac205778eb27e2d63f2c0fe74
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one

Looks like it’s trying to spawn a new process when there is already one running?

Try a reboot?:

sudo shutdown -r now

Silly me. Thanks merefield!

Curiosity: does sudo reboot command do the same thing as sudo shutdown -r now? ( i always used reboot on linux, only used shutdown -r -t 0 in windows :D)

Suspect they do the same thing under the hood (switching run levels) but don’t quote me on it!