[MDEV-2228] LP:904097 - Bad handshake while connecting with jdbc:mysql:thin://<host>:<port>/ Created: 2011-12-14 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Elena Stepanova | Assignee: | Michael Widenius |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
The problem was initially reported in Tungsten replicator backtracking system as http://code.google.com/p/tungsten-replicator/issues/detail?id=256. It says that Tungsten fails while asking for a binlog dump. From what I see after installing Tungsten and running connection tests with it, the problem is not related to binlog dump. Tungsten uses two kinds of url-s to connect to the database: usually it connects as My wild guess is that it's somehow related to client plugin authentication, namely to a corner I've attached a simple Java test case that uses the same classes as Tungsten for database connection, but does not do anything else. The tarball contains everything (apart from java itself) needed to run the test case – the compiled test, libraries and the runner. Extract the archive, cd into the 'test' folder, launch ./run (you need to have your DB server already running). If you are using a port other than 3306, edit the 'run' file to add -Dport=<port> property to run the java class. Test case: import com.continuent.tungsten.replicator.database.DatabaseFactory; public class test String conLine1 = "jdbc:mysql:thin://localhost:"port"/tungsten_logos?createDB=true"; catch (SQLException e) { System.out.println("This is the error we are looking for:"); System.out.println(e + "\n"); } } } |
| Comments |
| Comment by Elena Stepanova [ 2011-12-14 ] |
|
Re: Bad handshake while connecting as connecting with jdbc:mysql:thin://<host>:<port>/ |
| Comment by Elena Stepanova [ 2011-12-14 ] |
|
Test code, class and libraries |
| Comment by Elena Stepanova [ 2011-12-14 ] |
|
Re: Bad handshake while connecting with jdbc:mysql:thin://<host>:<port>/ According to serg's analysis, the old version of drizzle-jdbc was incorrectly setting CLIENT_PLUGIN_AUTH bit in the handshake packet, without actually supporting pluggable auth. It has been fixed in 1.1. If I simply replace the jar by the newer one, the handshake goes normally, both with the simplified test case above and with the actual Tungsten startup. Tungsten proceeds to the next step, where it does fail, not due to a handshake problem, but with UnsupportedEncodingException, apparently due to incompatibility with the new version of drizzle-jdbc. |
| Comment by Elena Stepanova [ 2011-12-14 ] |
|
Re: Bad handshake while connecting with jdbc:mysql:thin://<host>:<port>/ |
| Comment by Rasmus Johansson (Inactive) [ 2011-12-14 ] |
|
Launchpad bug id: 904097 |