Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.

Join them; it only takes a minute:

Sign up
Join the Stack Overflow community to:
  1. Ask programming questions
  2. Answer and help your peers
  3. Get recognized for your expertise

I have a postgres database that I created through heroku. I am trying to access it through psql with the command:

cse-190-fortune matanvardi$ psql "dbname=dccemfsa6camml host=ec2-54-235-152-226.compute-1.amazonaws.com \
user=tfmfbqxqjznsbl password=********* port=5432 sslmode=require"

I get this error:

psql: could not connect to server: Operation timed out
    Is the server running on host "ec2-54-235-152-226.compute-1.amazonaws.com" and accepting
    TCP/IP connections on port 5432?

I've cloned the repository and I'm logged in, I simply cannot figure out what is wrong here. Any help would be greatly appreciated.

share|improve this question
    
Is there any outbound-filtering firewall in place? – Craig Ringer May 2 '13 at 1:00

To access your Heroku database from the command line use the command:

heroku pg:psql


Edit:

I ran your command from my machine. If course I don't have your password but I got:

$  psql "dbname=dccemfsa6camml host=ec2-54-235-152-226.compute-1.amazonaws.com user=tfmfbqxqjznsbl port=5432 sslmode=require"
Password:
psql: FATAL:  password authentication failed for user "tfmfbqxqjznsbl"

Which means I was able to connect, which is farther than you got. It must be a problem with your network setup.

share|improve this answer
    
that gives me the same result as i mentioned above – Matan Vardi May 2 '13 at 0:59
    
@MatanVardi Then you have a problem with your network, probably a too-strict firewall or a misconfigured router somewhere. – Craig Ringer May 2 '13 at 5:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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