3

I'm trying to set-up MongoVUE to connect to a networked server running MongoDB. I can connect to it very easily either via SSHing in Putty or using mongo ip:port in windows command line.

However, when setting up a connection via MongoVUE's SSH tunnel, I get the error:

Unable to connect to server 127.0.0.1:5252: No connection could be made because the target machine actively refused it 127.0.0.1:5252.

So I assume there's something wrong with the firewall configuration.

However, my /etc/sysconfig/iptables contains the line:

-A INPUT -m state --state NEW -m tcp -p tcp --dport 27017 -j ACCEPT

What else should be in place to let this connect?

Here is the MongoVue SSH configuration:

enter image description here

HeatfanJohn
  • 7,143
  • 2
  • 35
  • 41
LittleBobbyTables
  • 4,361
  • 9
  • 38
  • 67
  • I'm confused as `127.0.0.1` is your local host not a remote system. The unable to connect is saying that you are trying to connect to MongoDB on your local system. – HeatfanJohn Oct 02 '12 at 17:48
  • MongoVUE allows for an SSH tunnel though, which is setup – LittleBobbyTables Oct 02 '12 at 17:49
  • The error means that nothing is listening on your local machine on TCP port 5252. Is there any configuration for the SSH tunnel that we can look at? – HeatfanJohn Oct 02 '12 at 17:52
  • http://i.imgur.com/96tAh.jpg is the configuration. I don't know why its going for 5252 :/ – LittleBobbyTables Oct 02 '12 at 17:59
  • What happen's when you click on the `Test` button? Same error? What system has the `/etc/sysconfig/iptables` file as MongoVUE appears to be a Windows-only application? What TCP port is your MongoDB listening on? – HeatfanJohn Oct 02 '12 at 18:09
  • I get this blank error: http://puu.sh/1aKAD when trying to test the connection. Then when I connect I get the above error. Yes, MongoVUE is a windows application. I am remotely ssh-ing to another mongo-db machine. Mongod on the remote machine says it is running on 27017 – LittleBobbyTables Oct 02 '12 at 18:27

2 Answers2

5

I get the same error using the built-in SSH feature of MongoVUE.

I suspect that this is a bug in MongoVUE. I was able to get SSH to work using Putty following the instructions at http://www.mongovue.com/2011/08/04/mongovue-connection-to-remote-server-over-ssh/.

enter image description here

enter image description here

Below is Putty Tunnel configuration: Putty configured to listen on 5151 and then connect to 27017 on remote system (MongoD).

enter image description here

HeatfanJohn
  • 7,143
  • 2
  • 35
  • 41
1

I had to use a little trick to make built-in "SSH Tunnel" work.

It turns out that default IP for a localhost in Windows 7 is Ipv6 address, so you have to add (or just un-comment) the following line into your \System32\drivers\etc\hosts file

127.0.0.1       localhost

And configure Mongovue connection as follows (with your IP for sure):

  • Settings: Settings
  • SSH Tunnel: SSH Tunnel

Notice the same IP on both tabs

Mikhail Stepura
  • 3,374
  • 20
  • 16