I don't think anyone is going to be able to help you unless you share some details like:
- where are you trying to connect from? - browser, Node.js, etc.
- how are you trying to connect? - source code would be helpful
- what error messages or unexpected behaviour are you seeing?
- what are the versions of the various software components (mongodb, mongoose library, node.js, etc.)
If you are trying to connect directly to a database from a web client. you're effectively re-creating the sort of webapps that cause the SQL Slammer worm to trash major Internet applications years ago. Don't connect directly to a database from an Internet client
So we'd need to know what you are trying before we can give any advice.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Your mother was a hamster and your father was a tiny ad:
a bit of art, as a gift, that will fit in a stocking