PostgreSQL datasource problem with Railo

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.

/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
Lucee.org http://lucee.org/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+unsubscribe@googlegroups.com
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com
mailto:lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/23e12a48-001e-4aa9-a67b-f18fa08a45b5%40googlegroups.com
https://groups.google.com/d/msgid/lucee/23e12a48-001e-4aa9-a67b-f18fa08a45b5%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

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
Lucee.org http://lucee.org/
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 <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/23e12a48-001e-4aa9-a67b-f18fa08a45b5%40googlegroups.com
https://groups.google.com/d/msgid/lucee/23e12a48-001e-4aa9-a67b-f18fa08a45b5%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

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 (@Lauren_Paul) 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
Lucee.org

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/1c3a3ab0-d9dc-47d8-a6cb-cc024cbd3c81%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

you don’t have spaces in your actual connection strings before the ? and
& characters, right?

your sample has spaces…

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/On 4/3/2015 7:18 AM, Lauren Paul 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: http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails )
<http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails>

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 <javascript:>) 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
        Lucee.org <http://lucee.org/>

        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
        <https://groups.google.com/d/msgid/lucee/23e12a48-001e-4aa9-a67b-f18fa08a45b5%40googlegroups.com?utm_medium=email&utm_source=footer>.
        For more options, visit
        https://groups.google.com/d/optout
        <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+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/1c3a3ab0-d9dc-47d8-a6cb-cc024cbd3c81%40googlegroups.com
    <https://groups.google.com/d/msgid/lucee/1c3a3ab0-d9dc-47d8-a6cb-cc024cbd3c81%40googlegroups.com?utm_medium=email&utm_source=footer>.
    For more options, visit https://groups.google.com/d/optout
    <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+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com
<javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/378578ff-ff6a-4ad1-b469-e2bbd6637204%40googlegroups.com
<https://groups.google.com/d/msgid/lucee/378578ff-ff6a-4ad1-b469-e2bbd6637204%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<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
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com
mailto:lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/8057c79f-3add-4c33-b155-d7a925d6287c%40googlegroups.com
https://groups.google.com/d/msgid/lucee/8057c79f-3add-4c33-b155-d7a925d6287c%40googlegroups.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

you should definitely not have spaces there.

also, make sure that there is no firewall blocking your connection.

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/On 4/3/2015 7:58 AM, 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):

  1. Enter your username and password in datasource fields
  2. Enter the class as |org.postgresql.Driver|
  3. 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 (@Lauren_Paul mailto:Lauren_Paul) 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: http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails )
<http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails>

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 <javascript:>) 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
        Lucee.org <http://lucee.org/>

        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
        <https://groups.google.com/d/msgid/lucee/23e12a48-001e-4aa9-a67b-f18fa08a45b5%40googlegroups.com?utm_medium=email&utm_source=footer>.
        For more options, visit
        https://groups.google.com/d/optout
        <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+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/1c3a3ab0-d9dc-47d8-a6cb-cc024cbd3c81%40googlegroups.com
    <https://groups.google.com/d/msgid/lucee/1c3a3ab0-d9dc-47d8-a6cb-cc024cbd3c81%40googlegroups.com?utm_medium=email&utm_source=footer>.
    For more options, visit https://groups.google.com/d/optout
    <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+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com
<javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/378578ff-ff6a-4ad1-b469-e2bbd6637204%40googlegroups.com
<https://groups.google.com/d/msgid/lucee/378578ff-ff6a-4ad1-b469-e2bbd6637204%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<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
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com
mailto:lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/8057c79f-3add-4c33-b155-d7a925d6287c%40googlegroups.com
https://groups.google.com/d/msgid/lucee/8057c79f-3add-4c33-b155-d7a925d6287c%40googlegroups.com?utm_medium=email&utm_source=footer.
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
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com
mailto:lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/etPan.551eaa85.30861fde.7515%40jonclausen-mbp.local
https://groups.google.com/d/msgid/lucee/etPan.551eaa85.30861fde.7515%40jonclausen-mbp.local?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

might be easier for you to install the GUI client:
http://www.pgadmin.org/
and see if you are able to connect.

but you really should check the connection from your AWS server to the
Postgres server, and not from your workstation (though that might be
easier to test and will still be telling if you run into problems).

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/On 4/3/2015 8:56 AM, Jon Clausen wrote:

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 mailto: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 <http://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 <javascript:>) 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
    <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):

     1. Enter your username and password in datasource fields
     2. Enter the class as |org.postgresql.Driver|
     3. Use this connection string:
        |jdbc:postgresql://ec2-184-73-254-144.compute-1.amazonaws.com/d200shbvfilcsq?ssl=true
        <http://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
    <http://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
    <http://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
    <http://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: http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails )
        <http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails>

        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
                Lucee.org <http://lucee.org/>

                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
                <https://groups.google.com/d/msgid/lucee/23e12a48-001e-4aa9-a67b-f18fa08a45b5%40googlegroups.com?utm_medium=email&utm_source=footer>.
                For more options, visit
                https://groups.google.com/d/optout
                <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+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/1c3a3ab0-d9dc-47d8-a6cb-cc024cbd3c81%40googlegroups.com
            <https://groups.google.com/d/msgid/lucee/1c3a3ab0-d9dc-47d8-a6cb-cc024cbd3c81%40googlegroups.com?utm_medium=email&utm_source=footer>.
            For more options, visit
            https://groups.google.com/d/optout
            <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+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/378578ff-ff6a-4ad1-b469-e2bbd6637204%40googlegroups.com
        <https://groups.google.com/d/msgid/lucee/378578ff-ff6a-4ad1-b469-e2bbd6637204%40googlegroups.com?utm_medium=email&utm_source=footer>.
        For more options, visit
        https://groups.google.com/d/optout
        <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+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/8057c79f-3add-4c33-b155-d7a925d6287c%40googlegroups.com
    <https://groups.google.com/d/msgid/lucee/8057c79f-3add-4c33-b155-d7a925d6287c%40googlegroups.com?utm_medium=email&utm_source=footer>.
    For more options, visit https://groups.google.com/d/optout
    <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+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com
<javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/af40b5ff-4907-4f89-8945-0d1b39f09af1%40googlegroups.com
<https://groups.google.com/d/msgid/lucee/af40b5ff-4907-4f89-8945-0d1b39f09af1%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<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
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com
mailto: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
https://groups.google.com/d/msgid/lucee/68ce4cdb-acbd-45c6-b16c-01905cac1610%40googlegroups.com?utm_medium=email&utm_source=footer.
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
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com
mailto:lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/etPan.551eb815.2685cf6c.7515%40jonclausen-mbp.local
https://groups.google.com/d/msgid/lucee/etPan.551eb815.2685cf6c.7515%40jonclausen-mbp.local?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

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):

  1. Enter your username and password in datasource fields
  2. Enter the class as org.postgresql.Driver
  3. 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 <javascript:>) 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
http://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
http://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:
http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails )

http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails

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
Lucee.org http://lucee.org/
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
https://groups.google.com/d/msgid/lucee/23e12a48-001e-4aa9-a67b-f18fa08a45b5%40googlegroups.com?utm_medium=email&utm_source=footer
.
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+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/1c3a3ab0-d9dc-47d8-a6cb-cc024cbd3c81%40googlegroups.com
https://groups.google.com/d/msgid/lucee/1c3a3ab0-d9dc-47d8-a6cb-cc024cbd3c81%40googlegroups.com?utm_medium=email&utm_source=footer
.
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+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/378578ff-ff6a-4ad1-b469-e2bbd6637204%40googlegroups.com
https://groups.google.com/d/msgid/lucee/378578ff-ff6a-4ad1-b469-e2bbd6637204%40googlegroups.com?utm_medium=email&utm_source=footer
.
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+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/8057c79f-3add-4c33-b155-d7a925d6287c%40googlegroups.com
https://groups.google.com/d/msgid/lucee/8057c79f-3add-4c33-b155-d7a925d6287c%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

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 (@Lauren_Paul) 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: http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails )

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
Lucee.org

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+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/1c3a3ab0-d9dc-47d8-a6cb-cc024cbd3c81%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+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/378578ff-ff6a-4ad1-b469-e2bbd6637204%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/8057c79f-3add-4c33-b155-d7a925d6287c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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 <javascript:>) 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):

  1. Enter your username and password in datasource fields
  2. Enter the class as org.postgresql.Driver
  3. 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
http://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
http://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:
http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails )

http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails

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
Lucee.org http://lucee.org/
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
https://groups.google.com/d/msgid/lucee/23e12a48-001e-4aa9-a67b-f18fa08a45b5%40googlegroups.com?utm_medium=email&utm_source=footer
.
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+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/1c3a3ab0-d9dc-47d8-a6cb-cc024cbd3c81%40googlegroups.com
https://groups.google.com/d/msgid/lucee/1c3a3ab0-d9dc-47d8-a6cb-cc024cbd3c81%40googlegroups.com?utm_medium=email&utm_source=footer
.
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+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/378578ff-ff6a-4ad1-b469-e2bbd6637204%40googlegroups.com
https://groups.google.com/d/msgid/lucee/378578ff-ff6a-4ad1-b469-e2bbd6637204%40googlegroups.com?utm_medium=email&utm_source=footer
.
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+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/8057c79f-3add-4c33-b155-d7a925d6287c%40googlegroups.com
https://groups.google.com/d/msgid/lucee/8057c79f-3add-4c33-b155-d7a925d6287c%40googlegroups.com?utm_medium=email&utm_source=footer
.
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+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/af40b5ff-4907-4f89-8945-0d1b39f09af1%40googlegroups.com
https://groups.google.com/d/msgid/lucee/af40b5ff-4907-4f89-8945-0d1b39f09af1%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

With or without spaces I get "Connection attempt failed."On Friday, April 3, 2015 at 9:35:50 AM UTC-5, Igal wrote:

you don’t have spaces in your actual connection strings before the ? and
& characters, right?

your sample has spaces…

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/
On 4/3/2015 7:18 AM, Lauren Paul 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:
http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails )

http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails

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
Lucee.org http://lucee.org/
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
https://groups.google.com/d/msgid/lucee/23e12a48-001e-4aa9-a67b-f18fa08a45b5%40googlegroups.com?utm_medium=email&utm_source=footer
.
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+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/1c3a3ab0-d9dc-47d8-a6cb-cc024cbd3c81%40googlegroups.com
https://groups.google.com/d/msgid/lucee/1c3a3ab0-d9dc-47d8-a6cb-cc024cbd3c81%40googlegroups.com?utm_medium=email&utm_source=footer
.
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+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/378578ff-ff6a-4ad1-b469-e2bbd6637204%40googlegroups.com
https://groups.google.com/d/msgid/lucee/378578ff-ff6a-4ad1-b469-e2bbd6637204%40googlegroups.com?utm_medium=email&utm_source=footer
.
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+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/8057c79f-3add-4c33-b155-d7a925d6287c%40googlegroups.com
https://groups.google.com/d/msgid/lucee/8057c79f-3add-4c33-b155-d7a925d6287c%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

I’ve never used Windows’ certificate store before so, honestly, I’m not sure. The keytool utility in your [JRE Home]/bin directory works well for this. You will need to restart Lucee/Railo.

keytool -import -alias awsRDS -trustcacerts -keystore cacerts -file rds-combined-ca-bundle.pemOn April 3, 2015 at 1:47:38 PM, Lauren Paul (@Lauren_Paul) wrote:

Should I just import the cert into the Third-Party Root Certification Authorities folder? Also, does IIS need to be restarted or Railo need to be restarted once I import the cert?

On Friday, April 3, 2015 at 12:05:49 PM UTC-5, Jon Clausen wrote:
Excellent. Then it may be a keystore issue with the SSL cert on the AWS host. Import the public key referenced here:

http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.SSL

In to your Java keystore and test the connection again.

[Note: Typo assistance courtesy of iPhone]

On Apr 3, 2015, at 12:54 PM, Lauren Paul lpau...@gmail.com wrote:

So basically I can connect via command prompt but not via Railo. What do we think I need to try next?

On Friday, April 3, 2015 at 11:24:59 AM UTC-5, Lauren Paul 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 <javascript:>) 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
Lucee.org http://lucee.org/
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
https://groups.google.com/d/msgid/lucee/23e12a48-001e-4aa9-a67b-f18fa08a45b5%40googlegroups.com?utm_medium=email&utm_source=footer
.
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+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/1c3a3ab0-d9dc-47d8-a6cb-cc024cbd3c81%40googlegroups.com
https://groups.google.com/d/msgid/lucee/1c3a3ab0-d9dc-47d8-a6cb-cc024cbd3c81%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

So basically I can connect via command prompt but not via Railo. What do
we think I need to try next?On Friday, April 3, 2015 at 11:24:59 AM UTC-5, Lauren Paul wrote:

From my web server, when running the psql command, I do get connected.
I’m staring at the prompt stating this:

WARNING: Console code page (437) differs from Windows code page (1252)
8-bit characters might not work correctly. See psql reference
page “Notes for Windows users” for details.
SSL connection (protocol: TLSv1.2, cipher: DHE-RSA-AES256-GCM-SHA384,
bits: 256,
compression: off)
Type “help” for help.
d200shbvfilcsq=>

On Friday, April 3, 2015 at 11:08:48 AM UTC-5, Igal wrote:

might be easier for you to install the GUI client:
http://www.pgadmin.org/
and see if you are able to connect.

but you really should check the connection from your AWS server to the
Postgres server, and not from your workstation (though that might be easier
to test and will still be telling if you run into problems).

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/
On 4/3/2015 8:56 AM, Jon Clausen wrote:

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 (lpau...@gmail.com) 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):

  1. Enter your username and password in datasource fields
  2. Enter the class as org.postgresql.Driver
  3. 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
http://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
http://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:
http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails )

http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails

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,

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:
http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails )

http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails

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 <javascript:>) 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
Lucee.org http://lucee.org/
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
https://groups.google.com/d/msgid/lucee/23e12a48-001e-4aa9-a67b-f18fa08a45b5%40googlegroups.com?utm_medium=email&utm_source=footer
.
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+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/1c3a3ab0-d9dc-47d8-a6cb-cc024cbd3c81%40googlegroups.com
https://groups.google.com/d/msgid/lucee/1c3a3ab0-d9dc-47d8-a6cb-cc024cbd3c81%40googlegroups.com?utm_medium=email&utm_source=footer
.
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+un...@googlegroups.com <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/378578ff-ff6a-4ad1-b469-e2bbd6637204%40googlegroups.com
https://groups.google.com/d/msgid/lucee/378578ff-ff6a-4ad1-b469-e2bbd6637204%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

Excellent. Then it may be a keystore issue with the SSL cert on the AWS host. Import the public key referenced here:

http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.SSL

In to your Java keystore and test the connection again.

[Note: Typo assistance courtesy of iPhone]> On Apr 3, 2015, at 12:54 PM, Lauren Paul <@Lauren_Paul> wrote:

So basically I can connect via command prompt but not via Railo. What do we think I need to try next?

On Friday, April 3, 2015 at 11:24:59 AM UTC-5, Lauren Paul wrote:
From my web server, when running the psql command, I do get connected. I’m staring at the prompt stating this:

WARNING: Console code page (437) differs from Windows code page (1252)
8-bit characters might not work correctly. See psql reference
page “Notes for Windows users” for details.
SSL connection (protocol: TLSv1.2, cipher: DHE-RSA-AES256-GCM-SHA384, bits: 256,
compression: off)
Type “help” for help.
d200shbvfilcsq=>

On Friday, April 3, 2015 at 11:08:48 AM UTC-5, Igal wrote:
might be easier for you to install the GUI client:
http://www.pgadmin.org/
and see if you are able to connect.

but you really should check the connection from your AWS server to the Postgres server, and not from your workstation (though that might be easier to test and will still be telling if you run into problems).

Igal Sapir
Lucee Core Developer
Lucee.org

On 4/3/2015 8:56 AM, Jon Clausen wrote:
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 (lpau...@gmail.com) 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: http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails )

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,


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/13e9cf06-5f6e-4df6-95ac-c01d4bd152b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Should I just import the cert into the Third-Party Root Certification
Authorities folder? Also, does IIS need to be restarted or Railo need to
be restarted once I import the cert?On Friday, April 3, 2015 at 12:05:49 PM UTC-5, Jon Clausen wrote:

Excellent. Then it may be a keystore issue with the SSL cert on the AWS
host. Import the public key referenced here:

http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.SSL

In to your Java keystore and test the connection again.

[Note: Typo assistance courtesy of iPhone]

On Apr 3, 2015, at 12:54 PM, Lauren Paul <lpau...@gmail.com <javascript:>> wrote:

So basically I can connect via command prompt but not via Railo. What do
we think I need to try next?

On Friday, April 3, 2015 at 11:24:59 AM UTC-5, Lauren Paul wrote:

From my web server, when running the psql command, I do get connected.
I’m staring at the prompt stating this:

WARNING: Console code page (437) differs from Windows code page (1252)
8-bit characters might not work correctly. See psql reference
page “Notes for Windows users” for details.
SSL connection (protocol: TLSv1.2, cipher: DHE-RSA-AES256-GCM-SHA384,
bits: 256,
compression: off)
Type “help” for help.
d200shbvfilcsq=>

On Friday, April 3, 2015 at 11:08:48 AM UTC-5, Igal wrote:

might be easier for you to install the GUI client:
http://www.pgadmin.org/
and see if you are able to connect.

but you really should check the connection from your AWS server to the
Postgres server, and not from your workstation (though that might be easier
to test and will still be telling if you run into problems).

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/
On 4/3/2015 8:56 AM, Jon Clausen wrote:

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 (lpau...@gmail.com) 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):

  1. Enter your username and password in datasource fields
  2. Enter the class as org.postgresql.Driver
  3. 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
http://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
http://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:
http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails )

http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails

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,


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 <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/13e9cf06-5f6e-4df6-95ac-c01d4bd152b6%40googlegroups.com
https://groups.google.com/d/msgid/lucee/13e9cf06-5f6e-4df6-95ac-c01d4bd152b6%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

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 (@Lauren_Paul) 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: http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails )

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
Lucee.org

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+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/1c3a3ab0-d9dc-47d8-a6cb-cc024cbd3c81%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+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/378578ff-ff6a-4ad1-b469-e2bbd6637204%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+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/8057c79f-3add-4c33-b155-d7a925d6287c%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/af40b5ff-4907-4f89-8945-0d1b39f09af1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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: http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails )

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 (@Lauren_Paul) 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
Lucee.org

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+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/1c3a3ab0-d9dc-47d8-a6cb-cc024cbd3c81%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/378578ff-ff6a-4ad1-b469-e2bbd6637204%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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: http://stackoverflow.com/questions/5395158/cf8-ssl-connection-to-postgres-fails )

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
Lucee.org

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+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/1c3a3ab0-d9dc-47d8-a6cb-cc024cbd3c81%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+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/378578ff-ff6a-4ad1-b469-e2bbd6637204%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+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/8057c79f-3add-4c33-b155-d7a925d6287c%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+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/af40b5ff-4907-4f89-8945-0d1b39f09af1%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.