mongo - 无法连接到服务器 127.0.0.1:27017 [英] mongo - couldn't connect to server 127.0.0.1:27017

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

问题描述

我来自 riak 和 redis,在那里我从未遇到过此服务启动或交互的问题.

I am coming from riak and redis where I never had an issue with this services starting, or to interact.

这是 mongo 普遍存在的问题,而且我相当无能为力.重新启动没有帮助.我是 mongo 的新手.

This is a pervasive problem with mongo and am rather clueless. Restarting does not help.I am new to mongo.

mongo
MongoDB shell version: 2.2.1
connecting to: test
Fri Nov  9 16:44:06 Error: couldn't connect to server 127.0.0.1:27017 src/mongo/shell/mongo.js:91
exception: connect failed

这是我在日志中看到的.

This is what I see in the logs.

 now open)
Fri Nov  9 16:44:34 [conn47] end connection 10.29.16.208:5306 (1 connection now open)
Fri Nov  9 16:45:04 [initandlisten] connection accepted from 10.29.16.208:5307 #48 (2 connections now open)
Fri Nov  9 16:45:04 [conn48] end connection 10.29.16.208:5307 (1 connection now open)
Fri Nov  9 16:45:04 [initandlisten] connection accepted from 10.29.16.208:5308 #49 (2 connections now open)
Fri Nov  9 16:45:04 [conn49] end connection 10.29.16.208:5308 (1 connection now open)
Fri Nov  9 16:45:34 [initandlisten] connection accepted from 10.29.16.208:5316 #50 (2 connections now open)
Fri Nov  9 16:45:34 [conn50] end connection 10.29.16.208:5316 (1 connection now open)
Fri Nov  9 16:45:34 [initandlisten] connection accepted from 10.29.16.208:5317 #51 (2 connections now open)
Fri Nov  9 16:45:34 [conn51] end connection 10.29.16.208:5317 (1 connection now open)
Fri Nov  9 16:46:04 [initandlisten] connection accepted from 10.29.16.208:5320 #52 (2 connections now open)
Fri Nov  9 16:46:04 [conn52] end connection 10.29.16.208:5320 (1 connection now open)
Fri Nov  9 16:46:04 [initandlisten] connection accepted from 10.29.16.208:5321 #53 (2 connections now open)
Fri Nov  9 16:46:04 [conn53] end connection 10.29.16.208:5321 (1 conn

推荐答案

如果 mongo shell 无法与 mongod 服务器通信,您会看到此错误.

This error is what you would see if the mongo shell was not able to talk to the mongod server.

这可能是因为地址错误(主机或 IP)或者它没有运行.需要注意的一件事是提供的日志跟踪不包括您的 mongo 时间戳 的Fri Nov 9 16:44:06".

This could be because the address was wrong (host or IP) or that it was not running. One thing to note is the log trace provided does not cover the "Fri Nov 9 16:44:06" of your mongo timestamp.

你能:

  1. 提供用于启动您的命令行参数(如果有)mongod 进程
  2. 提供来自 mongod 启动的日志文件活动以及mongo shell 启动尝试期间的日志?
  3. 确认您的 mongod 进程正在同一台上启动机器作为 mongo shell?

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

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