Reputation: 21
For now I am just trying to make the heroku pg:psql
command work but my final purpose is to copy a database that I have on my computer (localhost) to the heroku postgresql database with the pg:push
command.
For now when I simply try to access the database that I created on heroku, the heroku pg:psql
command returns:
psql: could not connect to server: No route to host
Is the server running on host "ec*-**-***-***-**.eu-west-1.compute.amazonaws.com" (**.***.***.**) and accepting
TCP/IP connections on port 5432?
postgresql.conf: (the lines are not commented)
listen_address ='*'
port = 5432
ssl = true
and host all all **.***.***.** trust
in pg_hba.conf
I also tried to add rules to iptables in order to give access to the database from the host IP address provided by heroku.
I am on a Debian computer, how can I solve this?
Upvotes: 2
Views: 2245
Reputation: 465
psql: could not connect to server: No route to host
It means your PostgreSQL server is not starting up or is starting up on a different port.
Solutions you may try:
ps -ef | grep Postgres
.netstat -tupln | grep Postgres
.Upvotes: 2