Skip to content

MONGO Connection over SSH Tunnel #419

Open
@khatri789

Description

@khatri789

Hi !
Wonderful MUP. Works great!
I have two droplets on DO.
Srv1> running MONGO on 27017 &
Other Srv2> is where I am planning to Run Meteor.

I want to be able to connect to Mongo on Srv2> over SSH and have set up SSH Tunnel between Srv1> and Srv2> & have made necessary changes to firewall and mongo conf on Srv2>

For SSH tunnel did on Srv1> -- ssh -L 4321:localhost:27017 [email protected] -f -N on

When I do mongo --port 4321 on Srv1> - am able to connect, query and see the DB on Srv2>

Now in Mup
a> Tried to start and connect to MONGO on Srv1> itself - it works great.
Also
b> Removed "mongo" section and in MONGO_URL if I set <IP_OF_2:27017>\meteor - I am able to connect to it and it works good. (So this is connecting thro firewall to MongodB on Srv 2 but not through SSH)

Now to be able to connect the Meteor on Srv1> and Mongo Srv2> over SSH - I tried various options
but not able to connect. While Deployment Verification the deployment fails.

I have tried removing "mongo" section and setting MONGO_URL as
mongodb://127.0.0.1:4321/, mongodb://localhost:4321/,

Also tried

keeping "mongo" section with port as "4321" and removing port # from MONGO_URL but no luck.

Anyone tried this? Am I missing this.. or MUP assumes that Localhost only as Docker container?
Any other option I am missing, don't know ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions