Re: BUG #18033: org.postgresql.util.PSQLException:

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: shashanthreddy7(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18033: org.postgresql.util.PSQLException:
Date: 2023-07-20 08:47:57
Message-ID: C73660CD-7F3A-4634-B546-41FF75476A39@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

> On 20 Jul 2023, at 05:11, PG Bug reporting form <noreply(at)postgresql(dot)org> wrote:

> org.postgresql.util.PSQLException: Connection to localhost:5436 refused.
> Check that the hostname and port are correct and that the postmaster is
> accepting TCP/IP connections. AM facing this issue while trying to connect
> to Postgres from my java code. Can you please suggest me the way to get the
> list of ports that ara avialble for me to use?

You need to connect to the port which PostgreSQL was configured to listen to,
which in the default case is 5432. If you are unable to connect, make sure
that the database is configured for that port, that the database is running,
that you are connecting to the right host and that there are no firewall rules
or similar which may block access to that port.

This is unlikely to be a bug in postgres, so you should take this question to a
more appropriate mailinglist like pgsql-general. See the mailinglist page for
more info:

https://www.postgresql.org/list/

--
Daniel Gustafsson

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Daniel Gustafsson 2023-07-20 10:36:52 Re: pg_basebackup: errors on macOS on directories with ".DS_Store" files
Previous Message Kyotaro Horiguchi 2023-07-20 08:29:24 Re: BUG #18014: Releasing catcache entries makes schema_to_xmlschema() fail when parallel workers are used