23

While opening query tool via pgadmin, i am getting this error on popup.

could not send data to server: Socket is not connected could not send SSL negotiation packet: Socket is not connected

Does any one know why this is happening.

2 Answers 2

53

try changing your host connection to "127.0.0.1" instead of "localhost" it worked for me

9
  • 1
    If your local resolution makes localhost not resolve to 127.0.0.1, you have a big problem on your hand as almost everything running out there is excepting this name resolution. Feb 20, 2020 at 18:45
  • 5
    @PatrickMevzek, localhost also resolves to the IPv6 loopback address ::1, while postgres might be configured to listen on 127.0.0.1 only. Feb 20, 2020 at 20:42
  • Thanks @Aya Hayder, this worked for me too!
    – Mark
    Mar 13, 2020 at 10:53
  • @ Mark 2 you're welcome ^^
    – Aya Hayder
    Mar 15, 2020 at 21:06
  • 2
    Thanks! This bug is ridiculous. I could see everything about my db but not the rows of tables. May 19, 2020 at 14:52
0

You might consider that another app is using the socket. Or the postgres pg_hba.conf needs to be modified to allow non-local access.

2

Not the answer you're looking for? Browse other questions tagged or ask your own question.