Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server requires auth switch, but no auth switch handler provided #504

Open
DJ-DJL opened this issue Feb 1, 2017 · 4 comments
Open

Server requires auth switch, but no auth switch handler provided #504

DJ-DJL opened this issue Feb 1, 2017 · 4 comments

Comments

@DJ-DJL
Copy link

DJ-DJL commented Feb 1, 2017

As per http://stackoverflow.com/questions/41941663/server-requires-auth-switch-but-no-auth-switch-handler-provided and mysqljs/mysql#1396

This error did not occur on our test mysql server, but it does occur on the production one.

When adding the authSwitchHandler as suggested the only thing that gets printed is { pluginName: '', pluginData: <Buffer > }
Doesn't seem very helpful.
debug: true added a whole load of stuff, some of which follows (redacted in case hex strings contains credentials:

Add command: Connection
Add command: Connection
 raw: <redacted>
2 undefined ==> Connection#handshakeInit(0,,60)
Server hello packet: capability flags:41516=(long flag, connect with db, compress, protocol 41, transactions, secure connection)
Sending handshake packet: flags:8582095=(long password, found rows, long flag, connect with db, odbc, local files, ignore space, protocol 41, ignore sigpipe, transactions, reserved, secure connection, multi results, session track)
2 59003828 <== Connection#handshakeInit(1,,79)
2 59003828 <== <redacted>
 raw: <redacted>
1 undefined ==> Connection#handshakeInit(0,,60)
Server hello packet: capability flags:41516=(long flag, connect with db, compress, protocol 41, transactions, secure connection)
Sending handshake packet: flags:8582095=(long password, found rows, long flag, connect with db, odbc, local files, ignore space, protocol 41, ignore sigpipe, transactions, reserved, secure connection, multi results, session track)
1 59003827 <== Connection#handshakeInit(1,,79)
1 59003827 <== <redacted>
Add command: Connection
 raw: fe
2 59003828 ==> Connection#handshakeResult(2,EOF,5)
Request ended
 raw: fe
1 59003827 ==> Connection#handshakeResult(2,EOF,5)
 raw: <redacted>
3 undefined ==> Connection#handshakeInit(0,,60)
Server hello packet: capability flags:41516=(long flag, connect with db, compress, protocol 41, transactions, secure connection)
Sending handshake packet: flags:8582095=(long password, found rows, long flag, connect with db, odbc, local files, ignore space, protocol 41, ignore sigpipe, transactions, reserved, secure connection, multi results, session track)
3 59003829 <== Connection#handshakeInit(1,,79)
3 59003829 <== <redacted>
 raw: fe
3 59003829 ==> Connection#handshakeResult(2,EOF,5)

@sidorares
Copy link
Owner

What's the server version you are using?

@DJ-DJL
Copy link
Author

DJ-DJL commented Feb 2, 2017

protocol_version	10
version	5.0.95-log
version_bdb	Sleepycat Software: Berkeley DB 4.1.24: (December 16, 2011)
version_comment	Source distribution
version_compile_machine	x86_64
version_compile_os	redhat-linux-gnu

@DJ-DJL
Copy link
Author

DJ-DJL commented Feb 2, 2017

I have tried connecting via a different method and get this message instead:
Authentication with old password no longer supported, use 4.1 style passwords.
I'm not sure if this relates to the same underlying problem or not?
I am already exploring avenues to address this alternative error.

@DJ-DJL
Copy link
Author

DJ-DJL commented Feb 13, 2017

Turns out this was indeed the problem.
Solution here: https://forums.mysql.com/read.php?38,593423,593423

Perhaps the error message could be improved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants