mongodb无法连接到服务器 [英] mongodb could not connect to server

查看:258
本文介绍了mongodb无法连接到服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是MongoDB的新手.我正在尝试从工作机连接到远程mongo数据库(我尝试同时使用mongohq和mongolab).我收到下面列出的错误.当我从家用计算机上运行同一命令时,它运行良好,并且确实连接以删除mongo数据库.我不确定我的工作机器上有什么问题,但我想修复它.感谢您的帮助.

I'm new to MongoDB. I'm trying to connect to my remote mongo database from my work machine( I tried for both mongohq as well as mongolab). I'm getting the error listed below. When I run the same command from my home machine it runs fine and does connect to remove mongo database. I'm not sure what is messed up on my work machine but I'd like to fix it. Thanks for you help.

MongoDB shell version: 2.4.9
connecting to: linus.mongohq.com:10097/mydb
Thu Jan 16 04:16:02.689 Error: couldn't connect to server linus.mongohq.com:10097
at src/mongo/shell/mongo.js:147 
exception: connect failed

推荐答案

根据问题注释,您的mongo shell客户端无法连接到mongo实例.假设您的Internet连接正常,则最常见的失败原因是网络上的端口被阻塞.

As per question comments, your mongo shell client can't connect to the mongo instance. Assuming that your internet connectivity is fine, the most common reason for the failure is that the ports are blocked on your network.

默认情况下,某些ISP自动阻止这些端口,以为不需要打开它们的用户提供额外的安全保护.与您的ISP或网络管理员联系,他们应该可以为您提供帮助.

Some ISPs automatically block these ports by default as an additional security protection for users that don't need them open. Contact your ISP or network admin, they should be able to help you out.

这篇关于mongodb无法连接到服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆