[CONJ-783] Could not connect to HostAddress{host='10.x.x.x', port=3306, type='master'}. PAM authentication request multiple passwords, but 'password2' is not set Created: 2020-04-20  Updated: 2021-04-19  Resolved: 2020-09-28

Status: Closed
Project: MariaDB Connector/J
Component/s: authentication
Affects Version/s: 2.5.2, 2.6.0, 2.6.2
Fix Version/s: 2.7.0

Type: Bug Priority: Minor
Reporter: Chan Kar Heng Assignee: Diego Dupin
Resolution: Fixed Votes: 1
Labels: None
Environment:

MariaDB-server-10.3.21-1.el7.centos.x86_64
mariadb-java-client-2.5.2.jar until mariadb-java-client-2.6.0.jar


Issue Links:
Relates
relates to R2DBC-7 authentication error when using multi... Closed

 Description   

Reconnect to a PAM_LDAP account in mysqld will cause below error:
java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.sql.SQLNonTransientConnectionException: Could not connect to HostAddress

{host='10.x.x.x', port=3306, type='master'}

. PAM authentication request multiple passwords, but 'password2' is not set

First connect is okay, and queries can run, etc.
If a reconnect fails, things will work if restart the DB client used so that DB client connects to mysqld first time again after restart.

The JDBC driver has been tested using multiple DB client apps (ie: Squirrel SQL, SQL Workbench/J) & effect is the same.

JDBC drivers that can reproduce this problem are of below versions:
mariadb-java-client-2.5.2.jar
until
mariadb-java-client-2.6.0.jar

Drivers of below version are okay (initial connect & multiple subsequent reconnects are all ok):
mariadb-java-client-2.4.3.jar
mariadb-java-client-2.4.4.jar
mariadb-java-client-2.5.0.jar
mariadb-java-client-2.5.1.jar



 Comments   
Comment by Joseph Nahmias [ 2020-05-26 ]

I see the same issue using client SquirrelSQL 4.1.0 with mariadb-java-client-2.5.2.jar, trying to connect to MariaDB Server 10.4.13.

Comment by Diego Dupin [ 2020-09-28 ]

Even if not directly related to this error, this is corrected in 2.7.0 (with https://jira.mariadb.org/browse/CONJ-807).

Generated at Thu Feb 08 03:18:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.