Database connection refused

Completed

Hi.

I'm trying add db connection (postgres) in Rubymine (Mac OS X), but all time I get error 'Connection refused' after 1 minute waiting. I can connect to db from psql and from my ruby app, but rubymine (and datagrip) error all time. How can i fix it?

 

java.net.ConnectException: Connection refused (Connection refused).
java.lang.RuntimeException: java.rmi.ConnectException: Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused (Connection refused)

 

UPD

I have same problem with datagrip.

Reinstall doesn't help

 

0
2 comments
Avatar
Permanently deleted user

My problem resolved by fix /etc/hosts file

Thanks Olga Kuvardina (JetBrains Support) for help :)

 

3
Avatar
Permanently deleted user

$ vim /etc/hosts

##
# Host Database
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost

1

Please sign in to leave a comment.