public inbox for [email protected]  
help / color / mirror / Atom feed
From: Alexander Farber <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20
Date: Sun, 1 Dec 2024 21:36:28 +0100
Message-ID: <CAADeyWiWpQmcBPKtpSrmh0ZkyE3tpX-JTSr2UcBX-gO53ZM4TQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAADeyWiW+Uz5z_RJrB=dhWoZAOngQ2dHQt+2UOGJiEv6pbcDCA@mail.gmail.com>
	<[email protected]>

Thank you, Tom -

On Sun, Dec 1, 2024 at 8:58 PM Tom Lane <[email protected]> wrote:

> Alexander Farber <[email protected]> writes:
> > TLDR "psql words_de" works, but "psql -h localhost words_de" does not
>
> I'd try connecting the first way and seeing what "show
> listen_addresses" gives.  Per your report it should be "*",
> but maybe something is overriding that.
>
> If it is "*", then it seems like something is interfering with
> expanding that.  Maybe try explicitly setting it to "localhost"?
>

it is empty in my docker container (but "localhost" on my prod server),
so I probably need to investigate that...

$ psql words_de
psql (17.2)
Type "help" for help.

words_de=> show listen_addresses;
 listen_addresses
------------------

(1 row)

words_de=> set listen_addresses='localhost';
ERROR:  parameter "listen_addresses" cannot be changed without restarting
the server

# grep listen_addresses $PGDATA/postgresql.conf
listen_addresses = '*'


view thread (12+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: Connection to 127.0.0.1 refused in a Dockerfile based on postgres:17-alpine3.20
  In-Reply-To: <CAADeyWiWpQmcBPKtpSrmh0ZkyE3tpX-JTSr2UcBX-gO53ZM4TQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox