I am trying to setup a mongo connection in NODE.js with autoEncrypt
option and it of course tries to connect with the driver at port 27020
. I don't have libmongocrypt
service running so the connection generates the following error.
ECONNREFUSED 127.0.0.1:27020
I am trying to implement manual encryption with bypassAutoEncryption
flag.
I am aware we have to use this library but it appears to be a C library and I am still clueless how I can setup libmongocrypt on my local environment.
OS: Windows 10 MONGO VERSION: 5.0
Any help would be appreciated! Thank you
I'm not familiar with Node
itself, but these are common details about this workflow (writing it as answer since it's quite big):
libmongocrypt
is a C library that is used by the driver, usually it's embedded in the driver (unless Node doesn't support it for some reason).ECONNREFUSED 127.0.0.1:27020
this error says that a process required for encryption called mongocryptd
is not launched, it's not the same as libmongocrypt
library (it's completely different things), you can launch this process by:
SERVER_PATH\bin\mongocryptd.exe
. Use it only as quick check.mongocryptd.exe
, you can find some details hereit's worth mention that auto encryption (along with mongocryptd) is available only in enterprise server.