Page 1 of 1

Problem with 7.0.2 version

Posted: Mon 15 May 2017 14:06
by badmood
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

Re: Problem with 7.0.2 version

Posted: Mon 15 May 2017 14:33
by MaximG
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

Re: Problem with 7.0.2 version

Posted: Mon 15 May 2017 14:51
by ertank
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.

Re: Problem with 7.0.2 version

Posted: Mon 15 May 2017 15:07
by badmood
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

Re: Problem with 7.0.2 version

Posted: Mon 15 May 2017 17:55
by ertank
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.

Re: Problem with 7.0.2 version

Posted: Tue 16 May 2017 13:24
by MaximG
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.

Re: Problem with 7.0.2 version

Posted: Tue 16 May 2017 14:26
by ertank
As to my own tests login problem is fixed with this version.

Thank you.

Re: Problem with 7.0.2 version

Posted: Tue 16 May 2017 15:49
by MaximG
We are happy to help each of our clients. Please contact us with any questions about using our products

Re: Problem with 7.0.2 version

Posted: Fri 26 May 2017 10:42
by badmood
Dears,

updated and tried, the new 7.0.2 seems to work.

Thanks.

Sergio

Re: Problem with 7.0.2 version

Posted: Mon 29 May 2017 12:46
by MaximG
We are glad that the problem was rectified. Contact us with any questions related to our products work