Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: MongoDB - The authentication mechanism "SCRAM-SHA-1" is not supported


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 7 - Last Post: Apr 13, 2017 5:34 AM Last Post By: Nickolas Deluca
Gaetano Mantovani

Posts: 19
Registered: 8/30/14
MongoDB - The authentication mechanism "SCRAM-SHA-1" is not supported  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 9, 2016 5:11 AM
Hi all,
during my testing with the FD components and MongoDB now all seems work as I wont.
Now I have installed a new instance of the DB in an Ubuntu Server and I have enabled the authentication.
I'm sure that all work properly in the server because I can access in the Mongo Shell and I have a remote GUI with a commercial software and it can access using the user credential.
If I try to connect a FDMongoConnection with the linux server I receive this execption:

[FireDAC][Phys][Mongo]The authentication mechanism "SCRAM-SHA-1" is not supported.

What's wrong with what I am doing?

Thanks
Dmitry Arefiev

Posts: 1,406
Registered: 12/7/03
Re: MongoDB - The authentication mechanism "SCRAM-SHA-1" is not supported  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 9, 2016 9:21 PM   in response to: Gaetano Mantovani in response to: Gaetano Mantovani
[FireDAC][Phys][Mongo]The authentication mechanism "SCRAM-SHA-1" is not supported.

This is probably because libmongoc.dll was built without OpenSSL enabled.

--
With best regards,
Dmitry
Gaetano Mantovani

Posts: 19
Registered: 8/30/14
Re: MongoDB - The authentication mechanism "SCRAM-SHA-1" is not supported  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 12, 2016 12:23 AM   in response to: Dmitry Arefiev in response to: Dmitry Arefiev
Ok,
sorry for the the dummy question but how I have to proceed to have the libmongoc.dll built with OpenSSL enabled?
Thanks again for the support

Dmitry Arefiev wrote:
[FireDAC][Phys][Mongo]The authentication mechanism "SCRAM-SHA-1" is not supported.

This is probably because libmongoc.dll was built without OpenSSL enabled.

--
With best regards,
Dmitry
Gaetano Mantovani

Posts: 19
Registered: 8/30/14
Re: MongoDB - The authentication mechanism "SCRAM-SHA-1" is not supported  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 12, 2016 7:09 AM   in response to: Gaetano Mantovani in response to: Gaetano Mantovani
Dmitry
I was able to compile libmongoc.dll following this page https://github.com/mongodb/mongo-c-driver "Building from Git on using Visual Studio 2015"
if I use exactly the instructions I got an error when I link the dll with FDConnection components that says that the library is compiled for w64 platform (my sources uses the win32 platform as default).
I tried to remove the convension Win64 in the cmake command but in this case the FDConnection says that it cannot load the dll.
Can you help me?
Thanks

Gaetano Mantovani wrote:
Ok,
sorry for the the dummy question but how I have to proceed to have the libmongoc.dll built with OpenSSL enabled?
Thanks again for the support

Dmitry Arefiev wrote:
[FireDAC][Phys][Mongo]The authentication mechanism "SCRAM-SHA-1" is not supported.

This is probably because libmongoc.dll was built without OpenSSL enabled.

--
With best regards,
Dmitry
Gaetano Mantovani

Posts: 19
Registered: 8/30/14
Re: MongoDB - The authentication mechanism "SCRAM-SHA-1" is not supported  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 13, 2016 8:30 AM   in response to: Gaetano Mantovani in response to: Gaetano Mantovani
Right now I was able to compile the mongoc drivers release 1.4.0 and if I put the dll in the folder \embarcadero\Studio\18\bin FDConnections seems work properly.

But if I enable SSL and try to connect to the server with the auth enabled I receive this error: " [FireDAC][Phys][Mongo]No suitable servers found (`serverSelectionTryOnce` set):.."
Loorking on web maybe is a problem with the configuration of the server, strange thing is that my external gui can access in the server without problem.
any suggestion?

Other thing,
I'm not able to use the ini file to configure firedac (http://docwiki.embarcadero.com/RADStudio/Seattle/en/Mongodb) I wrote in the file this lines:

[Mongo]
VendorLib=C:\libmongocrad\libmongoc-1.0.dll
don't know what I wrong :/

Thanks
Gaetano Mantovani

Posts: 19
Registered: 8/30/14
Re: MongoDB - The authentication mechanism "SCRAM-SHA-1" is not supported  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 15, 2016 3:21 AM   in response to: Gaetano Mantovani in response to: Gaetano Mantovani
I close the 3d here because the main argument is solved for me. But I have to open another one for the SSL authentication with MongoDB.

To solve the problem with the authentication as Dmitry wrote is necessary to rebuild the mongoc drivers using CMake and Visual Studio with the SSL enabled.
After this, I renamed the old libbson-1.0.dll and libmongoc-1.0.dll and save the new in the radstudio folder, and now when I put a username and a password without check USEssl option, the FDConnection can access to the MongoDb Server using the right credentials. This work if you enable the authentication in the server but not the SSL mode.
If you enable the SSL mode in the Server with the .pem file using FDConnection I cannot access but I believe that the reason is something about the parameter of the SSL mongoc driver, I don't know how to setup FDConnection.

That's all thanks for the support
Paulo Herbert B...

Posts: 1
Registered: 2/13/14
Re: MongoDB - The authentication mechanism "SCRAM-SHA-1" is not supported  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 19, 2017 8:09 PM   in response to: Gaetano Mantovani in response to: Gaetano Mantovani
Olá Gaetano, você poderia diponibilizar a DLL 32 bits, pois não consigo compilar o DLL pelo CMAKER 32bits. Agradeço muito se puder diponibilizar para mim (herbert dot lins at outlook dot com)

Muito Obrigado!

Gaetano Mantovani wrote:
Right now I was able to compile the mongoc drivers release 1.4.0 and if I put the dll in the folder \embarcadero\Studio\18\bin FDConnections seems work properly.

But if I enable SSL and try to connect to the server with the auth enabled I receive this error: " [FireDAC][Phys][Mongo]No suitable servers found (`serverSelectionTryOnce` set):.."
Loorking on web maybe is a problem with the configuration of the server, strange thing is that my external gui can access in the server without problem.
any suggestion?

Other thing,
I'm not able to use the ini file to configure firedac (http://docwiki.embarcadero.com/RADStudio/Seattle/en/Mongodb) I wrote in the file this lines:

[Mongo]
VendorLib=C:\libmongocrad\libmongoc-1.0.dll
don't know what I wrong :/

Thanks
Nickolas Deluca

Posts: 1
Registered: 6/9/14
Re: MongoDB - The authentication mechanism "SCRAM-SHA-1" is not supported  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 13, 2017 5:34 AM   in response to: Paulo Herbert B... in response to: Paulo Herbert B...
Paulo Herbert Barbosa Lins wrote:
Olá Gaetano, você poderia diponibilizar a DLL 32 bits, pois não consigo compilar o DLL pelo CMAKER 32bits. Agradeço muito se puder diponibilizar para mim (herbert dot lins at outlook dot com)

Muito Obrigado!

Gaetano Mantovani wrote:
Right now I was able to compile the mongoc drivers release 1.4.0 and if I put the dll in the folder \embarcadero\Studio\18\bin FDConnections seems work properly.

But if I enable SSL and try to connect to the server with the auth enabled I receive this error: " [FireDAC][Phys][Mongo]No suitable servers found (`serverSelectionTryOnce` set):.."
Loorking on web maybe is a problem with the configuration of the server, strange thing is that my external gui can access in the server without problem.
any suggestion?

Other thing,
I'm not able to use the ini file to configure firedac (http://docwiki.embarcadero.com/RADStudio/Seattle/en/Mongodb) I wrote in the file this lines:

[Mongo]
VendorLib=C:\libmongocrad\libmongoc-1.0.dll
don't know what I wrong :/

Thanks

I would also like the 32bit DLL... If anyone has this dll can you please upload it?

Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02