Connecting to an encrypted mongod from an unencrypted mongo shell generates this clear server log:
2013-10-21T14:34:47.034-0400 [conn3] AssertionException handling request, closing client connection: 17189 The server is configured to only allow SSL connections
however, from the mongo shell, the user sees:
MongoDB shell version: 2.5.4-pre- connecting to: test 2013-10-21T14:34:47.034-0400 DBClientCursor::init call() failed 2013-10-21T14:34:47.034-0400 Error: DBClientBase::findN: transport error: 127.0.0.1:27017 ns: admin.$cmd query: { whatsmyuri: 1 } at src/mongo/shell/mongo.js:146 exception: connect failed
which leaves no helpful clue about how to fix the issue. In a perfect world we would print something helpful like "ERROR: Cannot connect to encrypted server with unencrypted mongo shell. Try running mongo with --ssl." This could prove to be too complicated and hackish to implement properly, but would be nice for usability.
- is duplicated by
-
SERVER-8669 When shell fails to connect due to not having ssl, message is not informative
- Closed
-
SERVER-12966 SSL connection error from client does not mention SSL
- Closed
- is related to
-
SERVER-8731 ssl config server, non-ssl mongos - misleading message from mongos
- Backlog
- related to
-
SERVER-11489 Fail gracefully when more than 2 distinct sslMode settings are interacting
- Backlog