Problem with 7.0.2 version

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
badmood
Posts: 37
Joined: Thu 29 Jan 2009 23:28
Location: Italy

Problem with 7.0.2 version

Post by badmood » Mon 15 May 2017 14:06

History repeating...

with 7.0.2 update, I'm unable to log into PostgreSQL 9.6 server. Recompiling with 7.0.1 works.
I'm using Delphi 10.1 update 2 with latest UniDAC.

Sergio

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Problem with 7.0.2 version

Post by MaximG » Mon 15 May 2017 14:33

We tested UniDAC 7.0.2 operability when using PostgreSQL 9.6 and found no problems. Please describe the problem in more detail:

- what error message do you get when attempting to establisha a connection

- for what platform are you developing the application

- provide additionla information about the used connection parameters.

Probably, to identify the problem we will need the contents of the configuration file pg_hba.conf ( https://www.postgresql.org/docs/9.6/sta ... -conf.html ) used in your environment

ertank
Posts: 172
Joined: Wed 13 Jan 2016 16:00

Re: Problem with 7.0.2 version

Post by ertank » Mon 15 May 2017 14:51

My Delphi version is Delphi 10.2 Tokyo, targeting 99% Win32 executables. My version of PostgreSQL is 9.6.2 and using protocol version pv30 for all my connections.

I have applications using regular PostgreSQL connection and SSL PostgreSQL connection. I confirm that using version 7.0.2 of UniDAC I do not have any problem as to PostgreSQL connection or usage so far.

badmood
Posts: 37
Joined: Thu 29 Jan 2009 23:28
Location: Italy

Re: Problem with 7.0.2 version

Post by badmood » Mon 15 May 2017 15:07

Dears,

I'm testing on local PostgreSQL, so no pg_hba configuration or firewall problem, as I say before, no problem compiling and running the program with 7.0.1 on the same machine. I've also checked connecting on the production server obtaining the same result:
just recompiling with 7.0.2, I can't login anymore, connecting with user postgres and my password I have the following error: autenticazione con password fallita per l'utente "postgres"
(failed password authentication for user "postgres")

Returning to 7.0.1 and recompiling, the program is back on track and works as expected.
I'm compiling for win32. The server is a 9.6.2 (64 bit) version. No SSL enabled.

These are the component options I change:

Code: Select all

  dmMain.DBConnection1.Server   := g_SERVER_ADDRESS;
  dmMain.DBConnection1.Database := g_DB_NAME;
  dmMain.DBConnection1.Username := edtUserName.Text;
  dmMain.DBConnection1.Password := edtPassword.Text;
Some other hint?

Regards.

Sergio

ertank
Posts: 172
Joined: Wed 13 Jan 2016 16:00

Re: Problem with 7.0.2 version

Post by ertank » Mon 15 May 2017 17:55

I have reproduced the problem.

There is a connection problem if pg_hba.conf has following line:

Code: Select all

host    all             all             127.0.0.1/32            md5
It was set to "trust" before I changed it to md5 myself.

My log file has following lines when I receive error message:

Code: Select all

2017-05-15 20:41:42 +03DEBUG:  forked new backend, pid=9824 socket=5244
2017-05-15 20:41:43 +03LOG:  connection received: host=127.0.0.1 port=54521
2017-05-15 20:41:43 +03FATAL:  password authentication failed for user "test2"
2017-05-15 20:41:43 +03DETAIL:  Password does not match for user "test2".
	Connection matched pg_hba.conf line 84: "host    all             all             127.0.0.1/32            md5"
If I change pg_hba.conf parameter back to "trust" it simply works.

Very wierd thing is. I can connect with a wrong password if SSL is enabled. My pg_hba.conf file related line regarding SSL is:

Code: Select all

hostssl	all				all				127.0.0.1/32			md5 clientcert=1
When I can connect with a wrong password, my log file contains following lines:

Code: Select all

2017-05-15 20:52:34 +03DEBUG:  forked new backend, pid=8576 socket=5164
2017-05-15 20:52:34 +03LOG:  connection received: host=127.0.0.1 port=54635
2017-05-15 20:52:34 +03DEBUG:  SSL connection from "postgres"
2017-05-15 20:52:34 +03LOG:  connection authorized: user=test2 database=stella2 SSL enabled (protocol=TLSv1, cipher=DHE-RSA-AES256-SHA, compression=off)
Code I use is something like:

Code: Select all

  UniConnection1.Close();
  UniConnection1.Username := Edit1.Text;
  UniConnection1.Password := Edit2.Text;
  UniConnection1.Open();
Hope that helps Devart to reproduce problem on their side.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Problem with 7.0.2 version

Post by MaximG » Tue 16 May 2017 13:24

Thank you for promptly provided information. Thanks to you we have reproduced and fixed this error. We made the necessary changes in UniDAC 7.0.2 and replaced the installation files. Uninstall the installed version of UniDAC, download UniDAC 7.0.2 installer again and install it.

ertank
Posts: 172
Joined: Wed 13 Jan 2016 16:00

Re: Problem with 7.0.2 version

Post by ertank » Tue 16 May 2017 14:26

As to my own tests login problem is fixed with this version.

Thank you.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Problem with 7.0.2 version

Post by MaximG » Tue 16 May 2017 15:49

We are happy to help each of our clients. Please contact us with any questions about using our products

badmood
Posts: 37
Joined: Thu 29 Jan 2009 23:28
Location: Italy

Re: Problem with 7.0.2 version

Post by badmood » Fri 26 May 2017 10:42

Dears,

updated and tried, the new 7.0.2 seems to work.

Thanks.

Sergio

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: Problem with 7.0.2 version

Post by MaximG » Mon 29 May 2017 12:46

We are glad that the problem was rectified. Contact us with any questions related to our products work

Post Reply