On success server sends a packet with length=1 and content=3. In case the password was not cached, server requires same authentication mechanism as in sha256_password with a little difference, the padding algorithm is PKCS1 v1.5 padding instead of OAEP.
ok, reproduced.
Issue https://jira.mariadb.org/browse/CONJ-737 created. Driver doesn't return the server message when fast authentication return an error, but this "Expect login success or RSA login request message"
Diego Dupin
added a comment - ok, reproduced.
Issue https://jira.mariadb.org/browse/CONJ-737 created. Driver doesn't return the server message when fast authentication return an error, but this "Expect login success or RSA login request message"
Oracle JDK 1.8.0_221, macOS Mojave, mysql 8.0.17 run with docker, works fine with mysql-connector-java.
Upgrade to 2.5.1-snapshot, same error message.
Yanming Zhou
added a comment - - edited
public class Main {
public static void main(String[] args) throws Exception {
try (Connection conn = DriverManager.getConnection( "jdbc:mysql://localhost:3307/test?useSSL=false" , "root" , "" )) {
System.out.println(conn.getMetaData().getDatabaseProductName());
}
}
}
Oracle JDK 1.8.0_221, macOS Mojave, mysql 8.0.17 run with docker, works fine with mysql-connector-java.
Upgrade to 2.5.1-snapshot, same error message.
The error will now log the packet in case of unexpected protocol. That would help a lot
Diego Dupin
added a comment - - edited And if you can retry with SNAPSHOT repository :
<repositories>
<repository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https: //oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version> 2.5 . 1 -SNAPSHOT</version>
</dependency>
</dependencies>
The error will now log the packet in case of unexpected protocol. That would help a lot
at org.mariadb.jdbc.internal.com.send.authentication.CachingSha2PasswordPlugin.process(CachingSha2PasswordPlugin.java:207)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.authenticationHandler(AbstractConnectProtocol.java:703)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.createConnection(AbstractConnectProtocol.java:507)
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java:1236)
... 6 more
buffer.getByteAt(1) return unexpected 25
Yanming Zhou
added a comment - mariadb-java-client-2.5.0 and 8.0.17 MySQL Community Server
Caused by: java.sql.SQLException: Protocol exchange error. Expect login success or RSA login request message
at org.mariadb.jdbc.internal.com.send.authentication.CachingSha2PasswordPlugin.process(CachingSha2PasswordPlugin.java: 207 )
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.authenticationHandler(AbstractConnectProtocol.java: 703 )
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.createConnection(AbstractConnectProtocol.java: 507 )
at org.mariadb.jdbc.internal.protocol.AbstractConnectProtocol.connectWithoutProxy(AbstractConnectProtocol.java: 1236 )
... 6 more
buffer.getByteAt(1) return unexpected 25
ok, reproduced.
Issue https://jira.mariadb.org/browse/CONJ-737 created. Driver doesn't return the server message when fast authentication return an error, but this "Expect login success or RSA login request message"