Обсуждение: connection error

Поиск
Список
Период
Сортировка

connection error

От
Sonam Sharma
Дата:
getting below error from application side :
========

Last acquisition attempt exception:

org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.


the port no is set correct :

[postgres@lxsqlptgsdev004 data]$ psql -h localhost -p 5432

psql (9.5.14)

Type "help" for help.

 

postgres=#

 In pg_hba.conf also:


# IPv4 local connections:

host    all             all             127.0.0.1/32            trust

host    all             all             127.0.0.1/23            trust

host    all             all             172.29.161.53/23        trust

host    all             all             172.29.161.52/23        trust


Can someone please help what can be done to resolve this.


Thanks,

Sonam

Re: connection error

От
amul sul
Дата:
Do you have following entry as well?

# IPv6 local connections:
host    all             all             ::1/128                 trust

I hope "listen_addresses " in postgresql.conf is on default setting.

Regards,
Amul Sul
On Fri, Sep 7, 2018 at 4:08 PM Sonam Sharma <sonams1209@gmail.com> wrote:
>
> getting below error from application side :
> ========
>
> Last acquisition attempt exception:
>
> org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the
postmasteris accepting TCP/IP connections.
 
>
>
> the port no is set correct :
>
> [postgres@lxsqlptgsdev004 data]$ psql -h localhost -p 5432
>
> psql (9.5.14)
>
> Type "help" for help.
>
>
>
> postgres=#
>
>  In pg_hba.conf also:
>
>
> # IPv4 local connections:
>
> host    all             all             127.0.0.1/32            trust
>
> host    all             all             127.0.0.1/23            trust
>
> host    all             all             172.29.161.53/23        trust
>
> host    all             all             172.29.161.52/23        trust
>
>
> Can someone please help what can be done to resolve this.
>
>
> Thanks,
>
> Sonam


Re: connection error

От
amul sul
Дата:
On Fri, Sep 7, 2018 at 5:10 PM amul sul <sulamul@gmail.com> wrote:
>
> Do you have following entry as well?
>
> # IPv6 local connections:
> host    all             all             ::1/128                 trust
>
> I hope "listen_addresses " in postgresql.conf is on default setting.
>

Sorry, I misread -- your local psql connection is fine .

Try setting listen_addresses = '*' in postgresql.conf.

For more detail please have a look to
https://www.postgresql.org/docs/9.5/static/runtime-config-connection.html

Regards,
Amul Sul


RE: connection error

От
"Ahmed, Nawaz"
Дата:

Hi,

 

Are you sure it is /23 and not /32 for the CIDR notation ?

 

 

host    all             all             127.0.0.1/32            trust

host    all             all             127.0.0.1/23            trust

host    all             all             172.29.161.53/23        trust

host    all             all             172.29.161.52/23        trust

 

 

 

 

Best Regards,

 

Nawaz Ahmed
Software Development Engineer

Fujitsu Australia Software Technology Pty Ltd

14 Rodborough Road, Frenchs Forest NSW 2086, Australia
T +61 2 9452 9027
Nawaz@fast.au.fujitsu.com
fastware.com.au


 

From: Sonam Sharma [mailto:sonams1209@gmail.com]
Sent: Friday, 7 September 2018 8:38 PM
To: pgsql-general@postgresql.org
Subject: connection error

 

getting below error from application side :

========

Last acquisition attempt exception:

org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.

 

the port no is set correct :

[postgres@lxsqlptgsdev004 data]$ psql -h localhost -p 5432

psql (9.5.14)

Type "help" for help.

 

postgres=#

 In pg_hba.conf also:

 

# IPv4 local connections:

host    all             all             127.0.0.1/32            trust

host    all             all             127.0.0.1/23            trust

host    all             all             172.29.161.53/23        trust

host    all             all             172.29.161.52/23        trust

 

Can someone please help what can be done to resolve this.

 

Thanks,

Sonam

Disclaimer

The information in this e-mail is confidential and may contain content that is subject to copyright and/or is commercial-in-confidence and is intended only for the use of the above named addressee. If you are not the intended recipient, you are hereby notified that dissemination, copying or use of the information is strictly prohibited. If you have received this e-mail in error, please telephone Fujitsu Australia Software Technology Pty Ltd on + 61 2 9452 9000 or by reply e-mail to the sender and delete the document and all copies thereof.

Whereas Fujitsu Australia Software Technology Pty Ltd would not knowingly transmit a virus within an email communication, it is the receiver’s responsibility to scan all communication and any files attached for computer viruses and other defects. Fujitsu Australia Software Technology Pty Ltd does not accept liability for any loss or damage (whether direct, indirect, consequential or economic) however caused, and whether by negligence or otherwise, which may result directly or indirectly from this communication or any files attached.

If you do not wish to receive commercial and/or marketing email messages from Fujitsu Australia Software Technology Pty Ltd, please email unsubscribe@fast.au.fujitsu.com

Вложения