Error receiving request from client: ProtocolError: Client sent an HTTP request over a native MongoDB connectionops

Error receiving request from client: ProtocolError: Client sent an HTTP request over a native MongoDB connection

I’m getting this log recursively, what’s causing it?
Is there any way to prevent this log from happening?
Is there any problem even if the log continues to occur?

I can see 2 possibilities.

  1. Your server is not well protected and someone somewhere was able to connect and tries to run some HTTP exploit.
  2. You have a bug in your client code where you use your MongoDB connection rather than another connection you have establish for some web API calls. So your MongoDB is receiving the web API calls that are meant for your other service.