Page 1 of 1

Connecting to AmazonAWS fails

Posted: Tue 02 May 2017 08:41
by upscene
Hi,

Recently, I connected to a PostgreSQL webhosting service to which I didn't have full access, I was using no specific database or 'postgres', but this failed with a 'no access' error. By entering a database name, it succeeded.

Now I want to connect to AmazonAWS, but it fails with a similar message:
no pg_hba.conf entry for host "xx", user "xx", database "x(removed)x", SSL off.
I have entered host, database, user and password, the connection fails.

However, when I use the PostgreSQL Maestro tool using the same credentials, it works!

Do you have any idea how and why?

With regards,

Martijn Tonies

Re: Connecting to AmazonAWS fails

Posted: Wed 03 May 2017 15:36
by upscene
Update: when SSL setting is 'allow' or 'preferred', the connection works. No need to fill in anything else wrt SSL.


With regards.

Martijn Tonies

Re: Connecting to AmazonAWS fails

Posted: Thu 04 May 2017 10:53
by azyk
The specified error message is generated not by PgDAC, but by PostgreSQL server. It may occur due to different authentication settings located in the pg_hba.conf file. To solve the problem configure authentication in this file. You can read more details about this in PostgreSQL documentation:
https://www.postgresql.org/docs/current ... -conf.html

Re: Connecting to AmazonAWS fails

Posted: Thu 04 May 2017 10:58
by upscene
azyk wrote:The specified error message is generated not by PgDAC, but by PostgreSQL server.
I know.
azyk wrote:It may occur due to different authentication settings located in the pg_hba.conf file. To solve the problem configure authentication in this file. You can read more details about this in PostgreSQL documentation:
https://www.postgresql.org/docs/current ... -conf.html
You do understand that AmazonAWS isn't exactly a service where you can edit that file, right?

That being said, it was solved using a different SSL setting, see my 2nd message.


With regards,

Martijn Tonies

Re: Connecting to AmazonAWS fails

Posted: Fri 05 May 2017 11:27
by azyk
The TPgConnection.SSLOptions.Mode property is set to smDisable by default, therefore PgDAC will create non-SSL connection. Probably, only SSL connection is allowed in the pg_hba.conf file for a user with such credentials. So you get the specified error when using smDisable and do not get when using smAllow or smPrefer. Learn more about TPgConnection.SSLOptions.Mode in our online documentation: https://www.devart.com/pgdac/docs/?deva ... slmode.htm