No primary server available

no primary server available
I connect my mongoDB with nodejs api but get some error with this No primary server available in digitalocan server please help me for any suggestion for this
I user the url for this

And I Use my monogdb compass database connection
and this working and i connect the server database

but not working with nodejs

Are you sure the IP address of the source context is on the Atlas IP Access List?

You are using a certificate file in Compass but you don’t seem to use the same file in your node.js connection. Check your driver’s manuals on how to do that.