Then you need the libraries installed (or you need to run them as the postgres user). If you’re on a Mac or Linux try:
which psql to see if it can be found. If not, then install them via homebrew or your Linux package management system (yum, apt, zypper,etc)
If you’re on Windows, then you’ll need to download the installer from PostgreSQL http://www.postgresql.org/download/windows/On April 3, 2015 at 11:50:28 AM, Lauren Paul (@Lauren_Paul) wrote:
What directory would I find the psql? If I just open a command prompt and type that in, it doesn’t work.
On Friday, April 3, 2015 at 10:37:11 AM UTC-5, Jon Clausen wrote:
Can you connect directly from the command line with psql?
psql --host=ec2-184-73-254-144.compute-1.amazonaws.com --port=5432 --username=[your username] --password “dbname=d200shbvfilcsq”
If not, then it’s not a JDBC issue, but a configuration or port issue with the AWS server instance. If so, then it may be a keystore issue.
On April 3, 2015 at 11:13:12 AM, Lauren Paul (lpau...@gmail.com) wrote:
I still get a connection failed message. According to the documentation we have about connection information. The port is 5432 which is the default TCP port for Postgresql connections.
On Friday, April 3, 2015 at 9:58:21 AM UTC-5, Jon Clausen wrote:
Your connection string (the first example) looks valid. Assuming it’s PG 9.3+ running on Amazon, here are the JDBC connection string docs:
https://jdbc.postgresql.org/documentation/head/connect.html
the &ssl doesn’t need a boolean with it anymore, though.
Does that AWS instance use a non-standard port? You may need to specify the port. I just tried using a connection connection string in Lucee against a PGSQL server running on 9.3 w/ SSL and it connected up right away (though Lucee required me to also enter user/pass information in the datasource config fields.
Try this (using the Lucee user/pass info and omitting it from the connections string):
Enter your username and password in datasource fields
Enter the class as org.postgresql.Driver
Use this connection string:
jdbc:postgresql://ec2-184-73-254-144.compute-1.amazonaws.com/d200shbvfilcsq?ssl=true
I’m wondering if SSL is using a different port, as when I run psql:
psql -h ec2-184-73-254-144.compute-1.amazonaws.com
it gives me the FATAL: no pg_hba.conf entry for host “[my ip address]”, user “test”, database “test”, SSL off error, which says that it’s not listening on 5432 with SSL (psql would negotiate encryption automatically if that port was using SSL).
If it’s a different port, then you would need to add that to your connection string.
On April 3, 2015 at 10:19:00 AM, Lauren Paul (lpau...@gmail.com) wrote:
Thanks for the suggestion. I think I need some help with the syntax. Here is what I have tried:
jdbc:postgresql://ec2-184-73-254-144.compute-1.amazonaws.com/d200shbvfilcsq ?user=xxxxx &password=xxxx &ssl=true
jdbc:postgresql://ec2-184-73-254-144.compute-1.amazonaws.com/d200shbvfilcsq ?user=xxxxx &password=xxxx &sslmode=require
I tried it with brackets between the hostname, database, user, and password and that doesn’t work either.
On Friday, April 3, 2015 at 9:06:52 AM UTC-5, Jon Clausen wrote:
With the JDBC datasource option, is the SSL cert authority used by Heroku in your keystore? The connection attempt failure, which is different than the previous error, might be an SSL cert issue (example: java - CF8 SSL Connection to Postgres fails - Stack Overflow )
You could try adding
&sslfactory=org.postgresql.ssl.NonValidatingFactory to the JDBC URL to see if the cert is at issue.
On April 3, 2015 at 9:50:46 AM, Lauren Paul (lpau...@gmail.com) wrote:
I’ve tried it every way I can (Postgresql datasource or Other-JDBC Driver option), and this still does not work for me. I either get the same error or “Connection attempt failed.” I’ve confirmed I’m using the right credentials provided by Heroku. I’m just spinning my wheels at this point. Any other suggestions appreciated.
On Thursday, April 2, 2015 at 12:05:27 PM UTC-5, Jon Clausen wrote:
You’ll probably need to create your own connection string for the datasource which specifies SSL, like so:
jdbc:postgresql://[heroku IP address]/[database]?user=[username]&password=[password]&ssl=true
When you create the datasource in the Lucee admin, select Other - JDBC Driver, then enter your connection string in the box provided.
On April 2, 2015 at 12:40:20 PM, Lauren Paul (lpau...@gmail.com) wrote:
This is the reply I get from Heroku support:
Hi there,
We don’t permit editing of the pg_hba.conf - however we do permit access to your Postgres DB from all IP addresses. If you’re using the credentials outside of Heroku check that you are using SSL for the connection
Regards,
John.
I’m not sure how to “check that we are using SSL for the connection”.
On Thursday, April 2, 2015 at 11:34:05 AM UTC-5, Igal wrote:
FATAL: no pg_hba.conf entry for host
this error is coming from Postgres so you should check the docs for that and see where the pg_hba.conf is expected to be found, then figure out why it is not found (not there/permissions/etc).
Igal Sapir
Lucee Core Developer
On 4/2/2015 9:31 AM, Lauren Paul wrote:
Hi Lucee folks,
We are currently running Railo 4.1.2.005 final.
We want to create a datasource in Railo that will execute a database query on a Heroku Postgres database.
When we try to create the datasource we get this message:
FATAL: no pg_hba.conf entry for host “131.204.97.7”, user “kgdxxwchqhfwto”, database “d200shbvfilcsq”, SSL off
How can we correctly create this datasource? And if SSL is required, where in Railo do we tell it to require SSL? I’ve tried entering in the Host field “sslmode=require” after the hostname and it still errors out.
–
You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/23e12a48-001e-4aa9-a67b-f18fa08a45b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/68ce4cdb-acbd-45c6-b16c-01905cac1610%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.