连接测试时 pymongo 错误:27017
这是我的代码:
con = pymongo.Connection('test',27017)
错误是:
(mysite)zjm1126@zjm1126-G41MT-S2:~/桌面/test/mongo$ python a.py
Traceback (most recent call last):
File "a.py", line 3, in <module>
con = pymongo.Connection('test',27017,slave_okay=True)
File "build/bdist.linux-i686/egg/pymongo/connection.py", line 352, in __init__
File "build/bdist.linux-i686/egg/pymongo/connection.py", line 576, in __find_master
我能做什么?
编辑:
将“test”更改为“localhost”
This is my code:
con = pymongo.Connection('test',27017)
and the error is:
(mysite)zjm1126@zjm1126-G41MT-S2:~/桌面/test/mongo$ python a.py
Traceback (most recent call last):
File "a.py", line 3, in <module>
con = pymongo.Connection('test',27017,slave_okay=True)
File "build/bdist.linux-i686/egg/pymongo/connection.py", line 352, in __init__
File "build/bdist.linux-i686/egg/pymongo/connection.py", line 576, in __find_master
What can I do?
EDIT:
Change 'test' to 'localhost'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
显然 test:27017 上没有运行 mongod 守护进程。
Obviously there is no mongod daemon running on test:27017.