MongoDB.live, free & fully virtual. Register Now MongoDB.live, free & fully virtual. Register Now

Client side field level encryption (CSFLE) not working with AWS server linux ubuntu

Hello Team,

In AWS server mongodb enterprise 4.4.1 FLE is not working, but same is working on windows machine. I am trying out with the same master key but no luck.

Can someone help me with this please.

Further logs,

{“t”:{"$date":“2020-11-01T17:15:13.113+05:30”},“s”:“E”, “c”:“CONTROL”, “id”:24231, “ctx”:“initandlisten”,“msg”:“Failed to open pid file, exiting”,“attr”:{“error”:{“code”:98,“codeName”:“DBPathInUse”,“errmsg”:“Unable to create/open the lock file: D:/Projects/onesingleview\mongocryptd.pid (The process cannot access the file because it is being used by another process.). Ensure the user executing mongod is the owner of the lock file and has the appropriate permissions. Also make sure that another mongod instance is not already running on the D:/Projects/onesingleview directory”}}}

Hi @khasim_ali, and welcome to the forums!

Thanks for providing the error log.
Based on the error message itself, it looks like either:

  • There is an active mongocryptd running. If this is the case please make sure to end the other process.
  • A previous execution of mongocryptd didn’t remove/clean the lock file. After ensuring that there is no active mongocryptd running, you could just remove the lock file.

Regards,
Wan.

1 Like

I got this working, thanks

Another question is that csfle encryption works only on port 27017?

MongoError: Unable to connect to mongocryptd, please make sure it is running or in your PATH for auto-spawn

I am getting this issue, it was working fine some time back. Suddenly stoped workings without any change

Hi @khasim_ali,

Not exactly sure which part of CSFLE you’re referring to here. If you’re referring to mongocryptd, the default port is running on 27020. Depending on your use case, you can modify this by specifying the --port <value> option of mongocryptd.

It is likely that the mongocryptd is no longer running. Please make sure you have an active mongocryptd running.

Regards,
Wan.

1 Like