First command I used was ss -nltp | grep postgres
Returned nothing.
Then:
systemctl status
postgresql@13-main.service
● postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
Active: active (exited) since Sun 2022-08-07 17:30:09 EDT; 1min 35s ago
Process: 147613 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 147613 (code=exited, status=0/SUCCESS)
CPU: 810us
Aug 07 17:30:09 FusionPBX systemd[1]: Starting PostgreSQL RDBMS...
Aug 07 17:30:09 FusionPBX systemd[1]: Finished PostgreSQL RDBMS.
root@FusionPBX:/home/pbx2# ● postgresql.service - PostgreSQL RDBMS
bash: ●: command not found
root@FusionPBX:/home/pbx2# Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
bash: syntax error near unexpected token `('
root@FusionPBX:/home/pbx2# Active: active (exited) since Sun 2022-08-07 17:30:09 EDT; 1min 35s ago
bash: syntax error near unexpected token `('
root@FusionPBX:/home/pbx2# Process: 147613 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
bash: syntax error near unexpected token `('
root@FusionPBX:/home/pbx2# Main PID: 147613 (code=exited, status=0/SUCCESS)
bash: syntax error near unexpected token `('
root@FusionPBX:/home/pbx2# CPU: 810us
bash: CPU:: command not found
root@FusionPBX:/home/pbx2# psql -h 127.0.0.1 -U fusionpbx -W -d fusionpbx
Password:
psql: error: connection to server at "127.0.0.1", port 5432 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?
root@FusionPBX:/home/pbx2# ss -nltp | grep postgres
root@FusionPBX:/home/pbx2# systemctl status
postgresql@13-main.service
●
postgresql@13-main.service - PostgreSQL Cluster 13-main
Loaded: loaded (/lib/systemd/system/postgresql@.service; enabled-runtime; vendor preset: enabl>
Active: failed (Result: protocol) since Sun 2022-08-07 17:30:09 EDT; 14h ago
Process: 147607 ExecStart=/usr/bin/pg_ctlcluster --skip-systemctl-redirect 13-main start (code=>
CPU: 54ms
Warning: journal has been rotated since unit was started, output may be incomplete.
Verified the pg_hba.conf. Looks the same as your example.
# 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 md5
# IPv6 local connections:
host all all ::1/128 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 md5
host replication all ::1/128 md5