Page 1 of 1

Authentication failed when trying to connect to Postgres from version 2023.2.3 onwards

Posted: Tue Jul 04, 2023 2:19 am
by evmcl
Using a connection string like:

Code: Select all

Server=localhost; Port=5432; Database=mydb; UserId=postgres; Password=redacted;
Which works with older versions of Stimulsoft, but from version 2023.2.3 onwards we get an exception as follows.

Code: Select all

java.lang.RuntimeException: FATAL: password authentication failed for user "postgres"
StiJDBCDatabase [promptUserNameAndPassword=false, url=jdbc:postgresql://localhost:5432mydb, user=postgres, password=****, driver=org.postgresql.Driver, other={}]] with root cause

org.postgresql.util.PSQLException: FATAL: password authentication failed for user "postgres"
at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:646) ~[postgresql-42.3.8.jar:42.3.8]
at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:180) ~[postgresql-42.3.8.jar:42.3.8]
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:235) ~[postgresql-42.3.8.jar:42.3.8]
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49) ~[postgresql-42.3.8.jar:42.3.8]
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:223) ~[postgresql-42.3.8.jar:42.3.8]
at org.postgresql.Driver.makeConnection(Driver.java:402) ~[postgresql-42.3.8.jar:42.3.8]
at org.postgresql.Driver.connect(Driver.java:261) ~[postgresql-42.3.8.jar:42.3.8]
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:681) ~[java.sql:na]
at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:190) ~[java.sql:na]
at com.stimulsoft.report.dictionary.databases.StiJDBCDatabase.connect(StiJDBCDatabase.java:311) ~[stimulsoft-reports-report-2023.2.3.jar:na]
at com.stimulsoft.report.dictionary.dataSources.StiDataStoreSource.connect(StiDataStoreSource.java:114) ~[stimulsoft-reports-report-2023.2.3.jar:na]
at com.stimulsoft.report.dictionary.dataSources.StiDataSourcesCollection.connect(StiDataSourcesCollection.java:159) ~[stimulsoft-reports-report-2023.2.3.jar:na]
...
Using the Postgresql JDBC driver version 42.6.0 (not that I expect that is a factor).

Re: Authentication failed when trying to connect to Postgres from version 2023.2.3 onwards

Posted: Tue Jul 04, 2023 8:02 am
by Max Shamanov
Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.

Re: Authentication failed when trying to connect to Postgres from version 2023.2.3 onwards

Posted: Tue Jul 04, 2023 11:29 am
by Vadim
Hello.

This bug will be fixed in next version, for workaround please remove last semicolon in connection string.