Kloadut / dokku-pg-plugin

PostgreSQL plugin for Dokku
201 stars 75 forks source link

jdbc connection attempt failed #48

Closed allenanie closed 10 years ago

allenanie commented 10 years ago

I'm deploying a Play Scala application....and I basically tried almost everything, still it keeps feeding me this error:

[ERROR] [08/05/2014 05:10:43.599] [mturk-survey-akka.actor.default-dispatcher-2] [akka://mturk-survey/user/SECCompany] The connection attempt failed.
org.postgresql.util.PSQLException: The connection attempt failed.
    at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:233)
    at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:64)

This is the error that I keep getting. I'm using the correct driver (incorrect at first but I fixed that)

I needed to modify the original connection string into something like this according to JDBC format:

jdbc:postgresql://root:xxxxxx@mindandlanguage.com:49155/db

However it's still connection attempt failed. I'm running out of solutions, and any tip of what might have gone wrong?

I got the original string from TypeSafe Config file like this: connect = "jdbc:"${?DATABASE_URL}

I also put the username, password, url (IP address doesn't work) into PGCommander (a Mac app), and it can successfully connect to the database! So what's going on!?

allenanie commented 10 years ago

Eventually I got it working, but only by regex, I had to extract out user name, password, url, and create a Java DataSource. The URL link is just not working.