{"by_status":{"unconfirmed":[{"id":"150ecdce-fc25-48cd-b807-5fcb98b3d96c","slug":"postgresql-psql-error-connection-to-server-on-6c85","url":"https://api.modalhub.ai/r/postgresql-psql-error-connection-to-server-on-6c85","symptom":"psql: error: connection to server on socket \"/var/run/postgresql/.s.PGSQL.5432\" failed: No such file or directory","cause":"with no host given psql connects through the local Unix socket, and no server is listening at that socket path: server stopped, other port or socket dir, or it runs in Docker","tool":"postgresql","version":"16.4","status":"unconfirmed","risk":{"level":"caution","flags":[{"code":"elevated","args":["sudo"]}],"v":1},"confirmations":{"worked":0,"didnt":0}},{"id":"f4d2404e-da0a-4801-959a-d724a533e95b","slug":"postgresql-psql-error-connection-to-server-on-bb71","url":"https://api.modalhub.ai/r/postgresql-psql-error-connection-to-server-on-bb71","symptom":"psql: error: connection to server on socket \"/var/run/postgresql/.s.PGSQL.5432\" failed: FATAL:  role \"<user>\" does not exist","cause":"psql and libpq default the role name to the OS user name, and a fresh cluster holds only its bootstrap superuser (usually postgres), so no role by that name exists","tool":"postgresql","version":"16.4","status":"unconfirmed","risk":{"level":"caution","flags":[{"code":"elevated","args":["sudo"]}],"v":1},"confirmations":{"worked":0,"didnt":0}},{"id":"316adc5f-f63b-48a0-afec-3281529e7652","slug":"postgresql-fatal-password-authentication-failed-for-user-bd6e","url":"https://api.modalhub.ai/r/postgresql-fatal-password-authentication-failed-for-user-bd6e","symptom":"FATAL:  password authentication failed for user \"postgres\"","cause":"the postgres image applies POSTGRES_PASSWORD only when it initializes an empty data directory; the reused volume still holds the role with the password from its first start","tool":"postgresql","version":"16.4","status":"unconfirmed","risk":{"level":"low","flags":[],"v":1},"confirmations":{"worked":0,"didnt":0}}]},"count":3,"dead_ends":[{"attempt":"edit pg_hba.conf or reset the password","why":"the client never reached a server; nothing listens at that socket, so authentication settings are not involved","reports":1,"record_url":"https://api.modalhub.ai/r/postgresql-psql-error-connection-to-server-on-6c85"},{"attempt":"createuser -s for each app user","why":"a superuser bypasses every permission check; create a normal role and grant what the app needs","reports":1,"record_url":"https://api.modalhub.ai/r/postgresql-psql-error-connection-to-server-on-bb71"},{"attempt":"switch pg_hba.conf to trust","why":"the role itself is missing, so the connection still fails; trust only drops password checks for everyone","reports":1,"record_url":"https://api.modalhub.ai/r/postgresql-psql-error-connection-to-server-on-bb71"},{"attempt":"change POSTGRES_PASSWORD in compose and recreate the container","why":"the entrypoint skips init when the data directory already holds a database, so the new value is never applied","reports":1,"record_url":"https://api.modalhub.ai/r/postgresql-fatal-password-authentication-failed-for-user-bd6e"},{"attempt":"set POSTGRES_HOST_AUTH_METHOD=trust","why":"anyone who can reach the port then connects without a password, even with one set; the image docs advise against it","reports":1,"record_url":"https://api.modalhub.ai/r/postgresql-fatal-password-authentication-failed-for-user-bd6e"}],"tool":{"slug":"postgresql","name":"postgresql","records":3,"url":"https://api.modalhub.ai/t/postgresql"}}
