Good afternoon,
I’ve been following the Fedora PostgreSQL guide and had successfully setup a test database where I’d connected and made changes to some test tables using python and beekeeper studio.
I restarted my computer, but now the service refuses to start and I can’t figure out why.
I’d only just started configuring it, so if it’s simpler to start again that’s not too much of a hassle.
When I attempt to start the service:
sudo systemctl start postgresql
Job for postgresql.service failed because the control process exited with error code.
See "systemctl status postgresql.service" and "journalctl -xeu postgresql.service" for details.
“systemctl status postgresql.service”
systemctl status postgresql.service
× postgresql.service - PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; preset: disabled)
Drop-In: /usr/lib/systemd/system/service.d
└─10-timeout-abort.conf
Active: failed (Result: exit-code) since Wed 2024-06-26 13:28:13 CDT; 8min ago
Process: 9414 ExecStartPre=/usr/libexec/postgresql-check-db-dir postgresql (code=exited, status=0/SUCCESS)
Process: 9417 ExecStart=/usr/bin/postgres -D ${PGDATA} (code=exited, status=1/FAILURE)
Main PID: 9417 (code=exited, status=1/FAILURE)
CPU: 40ms
Jun 26 13:28:13 padd systemd[1]: Starting postgresql.service - PostgreSQL database server...
Jun 26 13:28:13 padd postgres[9417]: 2024-06-26 13:28:13.259 CDT [9417] LOG: redirecting log output to logging collector proce>
Jun 26 13:28:13 padd postgres[9417]: 2024-06-26 13:28:13.259 CDT [9417] HINT: Future log output will appear in directory "log".
Jun 26 13:28:13 padd systemd[1]: postgresql.service: Main process exited, code=exited, status=1/FAILURE
Jun 26 13:28:13 padd systemd[1]: postgresql.service: Killing process 9418 (postgres) with signal SIGKILL.
Jun 26 13:28:13 padd systemd[1]: postgresql.service: Failed with result 'exit-code'.
Jun 26 13:28:13 padd systemd[1]: Failed to start postgresql.service - PostgreSQL database server.
“journalctl -xeu postgresql.service”
journalctl -xeu postgresql.service
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit postgresql.service has finished with a failure.
░░
░░ The job identifier is 5772 and the job result is failed.
Jun 26 13:37:38 padd systemd[1]: Starting postgresql.service - PostgreSQL database server...
░░ Subject: A start job for unit postgresql.service has begun execution
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit postgresql.service has begun execution.
░░
░░ The job identifier is 6160.
Jun 26 13:37:38 padd postgres[10413]: 2024-06-26 13:37:38.328 CDT [10413] LOG: redirecting log output to logging collector pro>
Jun 26 13:37:38 padd postgres[10413]: 2024-06-26 13:37:38.328 CDT [10413] HINT: Future log output will appear in directory "lo>
Jun 26 13:37:38 padd systemd[1]: postgresql.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ An ExecStart= process belonging to unit postgresql.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Jun 26 13:37:38 padd systemd[1]: postgresql.service: Killing process 10414 (postgres) with signal SIGKILL.
Jun 26 13:37:38 padd systemd[1]: postgresql.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ The unit postgresql.service has entered the 'failed' state with result 'exit-code'.
Jun 26 13:37:38 padd systemd[1]: Failed to start postgresql.service - PostgreSQL database server.
░░ Subject: A start job for unit postgresql.service has failed
░░ Defined-By: systemd
░░ Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
░░
░░ A start job for unit postgresql.service has finished with a failure.
░░
░░ The job identifier is 6160 and the job result is failed.
For reference, my pg_hba.conf file is using these configurations:
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 peer
# IPv6 local connections:
host all all fe80::7a31:c1ff:0000:0000/96 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all peer
host replication all 127.0.0.1/32 ident
host replication all ::1/128 ident