Mongo DB connection issues

Mongo DB connection is not working

An error has occurred: java.security.AccessControlException: access denied (“java.net.SocketPermission” “accept,resolve”)

How can we solve this

Troubleshoot Mongodb connection

Find the connection string with the older, non-SRV connection string.
Try connecting with the older connection string format.
Ensure accuracy of connection string.
Ensure network connectivity.
Ensure that the version of your MongoDB driver is compatible with at least MongoDB

This may help you,
Rachel Gomez