Re: cant connect to localhost:5432 (but unix socket ok)

Поиск
Список
Период
Сортировка
От Joao Miguel Ferreira
Тема Re: cant connect to localhost:5432 (but unix socket ok)
Дата
Msg-id CALyyT7TjipKJN_zm4ON_e-3YPMk9TyVG4vg3yA1wMXNVN0dEqw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: cant connect to localhost:5432 (but unix socket ok)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: cant connect to localhost:5432 (but unix socket ok)  (Joao Miguel Ferreira <joao.miguel.c.ferreira@gmail.com>)
Список pgsql-general
Hi Tom

On Thu, Feb 4, 2021 at 2:50 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Joao Miguel Ferreira <joao.miguel.c.ferreira@gmail.com> writes:
> On Thu, Feb 4, 2021 at 2:26 PM hubert depesz lubaczewski <depesz@depesz.com>
> wrote:
>>> My database is not listening on TCP/localhost, desptite it is listening
>>>> on the unix socket. How can I investigate this?

> it's on 5433:

Hmm, something odd there, because a port number mismatch should have
resulted in psql failing to connect via unix socket either.  Maybe
you have more than one active postmaster?

yes, I see your point. makes sense. the unix socket is actually also on 5433

root@deb10tp:~# grep -nr 543 /etc/postgresql
/etc/postgresql/11/main/postgresql.conf:63:port = 5433
root@deb10tp:~# find /var/run/postgresql/ | grep 543
/var/run/postgresql/.s.PGSQL.5433
/var/run/postgresql/.s.PGSQL.5433.lock
root@deb10tp:~#
 

Anyway, given these settings, "psql -p 5433 -h localhost" should
connect.  If you still get "connection refused" then you need to
look at the kernel firewall (packet filter) settings.

yes, with "-p 5433" I can connect
 

                        regards, tom lane

thanks

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: cant connect to localhost:5432 (but unix socket ok)
Следующее
От: Joao Miguel Ferreira
Дата:
Сообщение: Re: cant connect to localhost:5432 (but unix socket ok)