Here are the logs when I use ./launcher rebuild app. I see something about “failed listening on port 6379 (TCP) aborting” but I have nothing running on that port!
I stopped all other services on my server and updated to the latest Ubuntu LTS and it still shows this:
PG::ConnectionBad: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: Connection refused (PG::ConnectionBad)
Is the server running locally and accepting connections on that socket?
Swapping templates with 13 and even 15 did not solve the issue, which is what was shown in the referenced post.
Caused by:
PG::ConnectionBad: connection to server on socket “/var/run/postgresql/.s.PGSQL.5432” failed: No such file or directory (PG::ConnectionBad)
Is the server running locally and accepting connections on that socket?
Seems like the database isn’t starting up correctly. The logs show it appears to occasionally start up properly, but only for a short time, so that could be a red herring.
ok: run: postgres: (pid 315501) 0s
The postgres logs could have some hint of the problem, especially when trying to start the app container.
I too think it’s about an unclean shutdown. If you’ve got a backup, what I would do is spin up a new vm and restore it. You can follow Move a Discourse site to another VPS with rsync and exclude postgres_*.
The alternative, which is your only option if you don’t have a backup, will be to figure out a bunch of stuff about postgres that you don’t want to learn about.
2025-03-22 00:30:44.110 UTC [4922] FATAL: lock file “postmaster.pid” is empty
2025-03-22 00:30:44.110 UTC [4922] HINT: Either another server is starting, or the lock file is the remnant of a previous server startup crash.
2025-03-22 00:30:45.127 UTC [4964] FATAL: lock file “postmaster.pid” is empty
2025-03-22 00:30:45.127 UTC [4964] HINT: Either another server is starting, or the lock file is the remnant of a previous server startup crash.
2025-03-22 00:30:46.151 UTC [4966] FATAL: lock file “postmaster.pid” is empty
2025-03-22 00:30:46.151 UTC [4966] HINT: Either another server is starting, or the lock file is the remnant of a previous server startup crash.
2025-03-22 00:30:47.168 UTC [4970] FATAL: lock file “postmaster.pid” is empty
2025-03-22 00:30:47.168 UTC [4970] HINT: Either another server is starting, or the lock file is the remnant of a previous server startup crash.
2025-03-22 00:30:48.192 UTC [4977] FATAL: lock file “postmaster.pid” is empty
2025-03-22 00:30:48.192 UTC [4977] HINT: Either another server is starting, or the lock file is the remnant of a previous server startup crash.