Unable to connect with Mongoose to connection setup in 4.6
Answered
Hi!
I have a database which can be accessed using SSH, this part works fine. I right click on the connection to show the URI, and i try to use this to connect with my node.js app on localhost using mongoose, however its not working (ECONNREFUSED 127.0.0.1:27017 error).
I downgraded to 4.5 and this version works(i used it like this before for local development). Any idea whats wrong? Is it an issue with 4.6, or it was an issue with 4.5 that it worked like described? :)
Thanks
n version 4.6, the SSH connection did make some changes. In 4.5, ssh tunnel localport would use the server's remote port by default. To address this issue, in 4.6, we always use a random port (30000-66635), which is why 4.5 can connect to the server via localhost:27017, while 4.6 can't.
n version 4.6, the SSH connection did make some changes. In 4.5, ssh tunnel localport would use the server's remote port by default. To address this issue, in 4.6, we always use a random port (30000-66635), which is why 4.5 can connect to the server via localhost:27017, while 4.6 can't.
Thanks! Is it possible to find that port somehow? Because the app always auto-updates to the newest version and i'm keep downgrading, theres no way to turn off updates :) And this feature was super handy for development.
Thanks! Is it possible to find that port somehow? Because the app always auto-updates to the newest version and i'm keep downgrading, theres no way to turn off updates :) And this feature was super handy for development.
And, you can find the SSH local port from the tooltip of connection node, then you can connect to "mongodb://localhost:xxxxx" which will forward to the real port of your mongodb server. :)
And, you can find the SSH local port from the tooltip of connection node, then you can connect to "mongodb://localhost:xxxxx" which will forward to the real port of your mongodb server. :)
Awesome, thanks for the help!
Awesome, thanks for the help!
Replies have been locked on this page!