Unable to connect to Atlas from Heroku using Fixie SOCKS

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.


Is this still happening? Do you know what kind of error you’re getting?
Is there a way to connect from the mongo shell from the Fixie SOCKS context as a separate test?
I wonder if there’s something about the DNS available in the Heroku concept that’s making the SRV connection string not work? maybe try using the legacy connection string which is also available in the Atlas connect UI (I think we frame it as being for earlier driver versions)

Terribly sorry for a late response. I decided not to use Fixie SOCKS and since did not pursue this problem. I really appreciate you checking in.

Any update on this one? I’m in the same boat. Fixie Socks and Fixie did not solve the problem. I’m kind hesitant go all in on Heroku private spaces, that’s kind way beyond the budget I was hoping for.

Well folks, I am also getting a similar problem (with Fixie). However, it does run fine, and then crash. The logs always say the whitelist IP connection is the issue (though I added both outbound IPs). If anyone solves it (or if Atlas solves it), I would love to hear about it.

Yeah, same here, fixie just keep yelling at me about could not connect to any server from atlas cluster, even though I already added outbound IPs to the whitelist…

For folks who are have this problem going forward: Fixie just released a library called fixie-wrench which does port forwarding via Fixie Socks. This allows you to connect to MongoDB Atlas as if it were running on a local port, regardless of driver support. All your requests are tunneled through Fixie Socks so they come from static IP addresses.

For more information: SOCKS Documentation | Fixie

Do you have an example of using fixie wrench to do port forwarding in the context of using Mongoose to connect to Mongo Atlas? I am a little lost on which ports we should be forwarding to, and from, and how.