cant connect to localhost:5432 (but unix socket ok) - Mailing list pgsql-general

From Joao Miguel Ferreira
Subject cant connect to localhost:5432 (but unix socket ok)
Date
Msg-id CALyyT7TQMb2K-9+ydKaRUc-7gBWSvGgzaoTFeE0M7Qq1QmdWog@mail.gmail.com
Whole thread Raw
Responses Re: cant connect to localhost:5432 (but unix socket ok)
List pgsql-general
Hello all,

My database is not listening on TCP/localhost, desptite it is listening on the unix socket. How can I investigate this?

I could have done something that is out of my understanding because I have been loading some big pg_dumpall files that might contain administrative changes that I am not fully aware of.

Here are some details about the connection issue:

root@deb10tp:~# id
uid=0(root) gid=0(root) groups=0(root)
root@deb10tp:~# su postgres
postgres@deb10tp:/root$ id
uid=116(postgres) gid=126(postgres) groups=126(postgres),125(ssl-cert)
postgres@deb10tp:/root$ cd /
postgres@deb10tp:/$ psql -h localhost
psql: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
postgres@deb10tp:/$ psql
psql (11.9 (Debian 11.9-0+deb10u1))
Type "help" for help.
postgres=#

Thank you
Joao

pgsql-general by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: when is useful min_wal_size?
Next
From: hubert depesz lubaczewski
Date:
Subject: Re: cant connect to localhost:5432 (but unix socket ok)