This is more likely to be a problem with Fixie SOCKS but I have not found any help about this topic elsewhere. Hence I’m hoping someone here might have an answer.
My NodeJS application is hosted on Heroku and I am using Fixie SOCKS add-on on Heroku that provides a static IP address in order to connect to the Atlas cluster. The static IP address provided by Fixie SOCKS is whitelisted in the Atlas cluster network settings.
My NodeJS application fails to connect to Atlas from Heroku with authentication failure.
The exact same application connects just fine when NodeJS is running on my laptop (yes, I have temporarily whitelisted my outbound IP address).
The only difference between these two methods is that app hosted on Heroku uses Fixie SOCKS and the instance running on my laptop directly opens a connection to Atlas.
In both cases, I am passing following URI to mongoose client.
mongodb+srv://dbuser:dbpassword@clusterX.btxy0.mongodb.net/postel?retryWrites=true&w=majority