Unable to initialize security context. Ensure the username and password are correct

I am unable to connect to mongodb using kerberos authentication from the client- nosql manager for mongodb while I am able to connect to mongodb using same kerberos authentication from the server where the mongodb is running using mongo shell and all required command line parameters.
Could you please guide me what more i need to configure to get connected from client which is outside of mongodb server…Following is the error that is being raised from client.

Unable to initialize security context. Ensure the username and password are correct

Hi @venkata_reddy,

Since you are able to connect with the mongo shell, it sounds like your issue is specific to NoSQL Manager. The error message suggests a problem with credentials, so one possibility might be a difference in encoding of special characters for your password or user name.

I’d try contacting the vendor for support, or consider using an alternative tool (for example, MongoDB Compass) if you are on the free version of NoSQL Manager.

Regards,
Stennie

If you are venkata_72132 from MongoDB University, is this related to your thread from M310 course? It could help the Experts, which I am not, to help if the whole context is shared.

Hi @Stennie,

Thanks for the update. mongo shell connection is happening within the host where MongoDB is running it is not out side of the host , where as nosqlmanager client is out side of mongodb host.

Hi @venkata_reddy,

Are you able to connect from a remote host using the mongo shell and the same Kerberos credentials that worked when you were connecting to the server locally?

If your question is related to the M310 MongoDB University course, it would be best to discuss in the M310 category on the MongoDB University Course Forums.

Regards,
Stennie

Hi @Stennie,

Sure. Let us discuss it on MongoDB University Course Forums.

https://discourse.university.mongodb.com/t/unable-to-initialize-security-context-ensure-the-username-and-password-are-correct/62381