Unable to connect to server

Started by Javali, Pramodalmost 2 years ago4 messagesbugs
Jump to latest
#1Javali, Pramod
Pramod.Javali1@t-mobile.com

Hi Team,

While connecting to the server the connection is getting failed, tried restarting the system but no luck. Can you please help/suggest here.

[cid:image001.png@01DA9A1C.7644E7C0]

Regards,
Pramod

Attachments:

image001.pngimage/png; name=image001.pngDownload
#2Kashif Zeeshan
kashi.zeeshan@gmail.com
In reply to: Javali, Pramod (#1)
Re: Unable to connect to server

Hi

Please do the following to find out exactly what is the error and you can
then .

1. Check the Server Logs to see the error you are facing.
2. Check the status of the postgres service which will also provide details
of the error, use systemctl status .. command.
3. If the service is running then check on which port the server is running.

Regards
Kashif Zeeshan
Bitnine Global

On Mon, Apr 29, 2024 at 6:30 PM Javali, Pramod <Pramod.Javali1@t-mobile.com>
wrote:

Show quoted text

Hi Team,

While connecting to the server the connection is getting failed, tried
restarting the system but no luck. Can you please help/suggest here.

Regards,

Pramod

Attachments:

image001.pngimage/png; name=image001.pngDownload
#3Jeff Janes
jeff.janes@gmail.com
In reply to: Javali, Pramod (#1)
Re: Unable to connect to server

This is unlikely to be a bug, it seems like an admin issue.

When I've seen this "server closed the connection unexpectedly" immediately
upon connection, it is usually because a port forwarder has accepted the
connection and tried to pass it on to the real server, but the forwarder
got a connection refused error. As it already accepted the connection, it
can't pass the "refused" back to the client so instead just closes it
without comment, which is unexpected.

If that is what is happening, you will not find any direct log messages in
the PostgreSQL log about it, as no connection was ever established and so
there is nothing to log. But if something else is going on, you might get
log messages so check for them.

Make sure that the PostgreSQL server is actually running, is listening on
the right port and the right network interface, and that any port
forwarder or firewall is configured correctly.

Cheers,

Jeff

#4Javali, Pramod
Pramod.Javali1@t-mobile.com
In reply to: Jeff Janes (#3)
RE: Unable to connect to server

Hi Team,

I’m able to connect now. Thankyou

Regards
Pramod

From: Jeff Janes <jeff.janes@gmail.com>
Sent: Monday, April 29, 2024 8:56 PM
To: Javali, Pramod <Pramod.Javali1@t-mobile.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Unable to connect to server

[External]

This is unlikely to be a bug, it seems like an admin issue.

When I've seen this "server closed the connection unexpectedly" immediately upon connection, it is usually because a port forwarder has accepted the connection and tried to pass it on to the real server, but the forwarder got a connection refused error. As it already accepted the connection, it can't pass the "refused" back to the client so instead just closes it without comment, which is unexpected.

If that is what is happening, you will not find any direct log messages in the PostgreSQL log about it, as no connection was ever established and so there is nothing to log. But if something else is going on, you might get log messages so check for them.

Make sure that the PostgreSQL server is actually running, is listening on the right port and the right network interface, and that any port forwarder or firewall is configured correctly.

Cheers,

Jeff