mongoDB测试错误
我开始了解 mongoDB 并寻找测试。所以我安装了它,然后进行测试当我在终端上使用命令 mongo 时,它显示了这样的错误
MongoDB shell version: 1.8.2
connecting to: test
Sun Jul 31 01:06:07 Error: couldn't connect to server 127.0.0.1 shell/mongo.js:79
exception: connect failed
所以有人可以告诉我问题是什么。我正在使用 ubuntu 11.04。For我使用过的安装说明 这个 网站。我是这个 mongoDB 的新手,所以请帮助我。任何帮助都将非常感激。
I came to know about mongoDB and looked for test.So I made it install and then for test when I used command mongo on terminal it showed an error like this
MongoDB shell version: 1.8.2
connecting to: test
Sun Jul 31 01:06:07 Error: couldn't connect to server 127.0.0.1 shell/mongo.js:79
exception: connect failed
So can someone tell me what is the problem.I am using ubuntu 11.04.For installation instruction I had used this site.I am newbie to this mongoDB so please helpe me.Any help will be highly appreciable.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您所需要做的就是打开 2 个终端选项卡。其中之一是运行,
启动 MongoDB 服务器。
在另一个中,运行
连接到 MongoDB 服务器的 shell。
All you need to do is open 2 terminal tabs. In one, run
which starts the MongoDB server.
In the other, run
which is the shell that connects to your MongoDB server.
MongoDB 似乎没有运行。您可以在浏览器中连接到网络界面吗?
http://localhost:28017
另外,您是否看到该进程在您的计算机上运行?运行时您应该会看到 mongod 条目...
或者
It looks like MongoDB isn't running. Can you connect to the web interface in your browser?
http://localhost:28017
Also, do you see the process running on your machine? You should see an entry for mongod when running ...
or
为什么不从 10gen 自己的 debian 存储库安装 mongodb?更容易,更有可能工作
http://www.mongodb.org/显示/DOCS/Ubuntu+and+Debian+packages
要查看 mongodb 是否正在运行,这也有帮助:
如果它正在运行,并且您仍然遇到相同的错误,那么它一定是 mongodb 的奇怪的 localhost bug 。由于某种原因,它假设 localhost 是 127.0.1.1。尝试
why not install mongodb from 10gen's own debian repository? much easier and more likely to work
http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages
To see if mongodb is running, this also helps:
if it is running, and you still get the same error, then it must be the weird localhost bug that mongodb has. it assumes localhost is 127.0.1.1 for some reason. try
我也有同样的问题。只需尝试创建文件夹 c:\data 和下一个 c:\data\db
I had the same problem. Just try to create folder c:\data and next c:\data\db