Forum Discussion

Cesylyaa's avatar
Cesylyaa
Helper I
1 year ago

Unable to connect to Postgres, throws error

Hello,

I have these credentials: (slightly altered to maintain confidentiality) 

 

POSTGRES
PGHOST = cbdh854d5.cluster-czrsj4isg7.us-east-1.rds.amazonaws.com
DB_NAME = dc1tl5hf97aqf
PGPORT=5432

PGUSER= u2bdltau97u

PGPASSWORD = pd087f050acae6f6bf09801895f68e1687b74a83e6abe2d8b01b

 

To connect: 
i. I input the Server name as cbdh854d5.cluster-czrsj4isg7.us-east-1.rds.amazonaws.com:5432
ii. I fill in the Database name

 
 

 

iii.  I input the username.
iv. I fill in the password.

 

 


When i try to connect, i am being thrown this error: "No such hist is known"


Please help

4 Replies

    • Cesylyaa's avatar
      Cesylyaa
      Helper I

      I don't think this is the issue, as i connect to another Postgres database just fine.
      While this Host name is a string of letters/numbers, the other one i connect to without any issues has its host name as an iP address.

      Could that be it? Must my host name come as an iP address?

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thanks for MFelix's concern about this issue.

     

    Hi, Cesylyaa 

    I am glad to help you.

     

    The error message “No such host is known” usually means that the host name cannot be resolved.


    The first thing you can do is to check the spelling of the hostname to make sure that it is not misspelled.

     

    You can also check to see if your machine can resolve the hostname. You can use the ping command in your terminal:

    ping cbdh854d5.cluster-czrsj4isg7.us-east-1.rds.amazonaws.com

     

    You also need to make sure that port 5432 is open and not blocked by a firewall.

     

     

    I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
    Best Regards,
    Fen Ling,
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

    • Cesylyaa's avatar
      Cesylyaa
      Helper I

      I first verified the hostname. It is correct.

      When i try to ping, this is what i get:
      (It keeps saying request timed out)