mongodb无法连接到服务器

编程入门 行业动态 更新时间:2024-10-25 16:28:40
本文介绍了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:10097/mydb Thu Jan 16 04:16:02.689 Error: couldn't connect to server linus.mongohq: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无法连接到服务器

本文发布于:2023-10-15 01:15:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1492811.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:连接到   服务器   mongodb

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!