我刚刚安装了 MongoDB(标准的 Ubuntu 版本,不是最新的稳定版),由于某种原因我无法连接:
Mon Feb 6 03:11:22 Error: couldn't connect to server 127.0.0.1 shell/mongo.js:79
exception: connect failed
现在我的机器不是 127.xx1 它是出于某种原因 xxx2 (但我已经更改了我的配置以绑定到该地址,并且还尝试绑定到我的公共 IP,但没有用。
配置:
#mongodb.conf
# Where to store the data.
# Note: if you run mongodb as a non-root user (recommended) you may
# need to create and set permissions for this directory manually,
# e.g., if the parent directory isn't mutable by the mongodb user.
dbpath=/var/lib/mongodb
#where to log
logpath=/var/log/mongodb/mongodb.log
logappend=true
bind_ip = 199.21.114.XX
port = 27017
我检查了日志,那里只显示启动信息。
我还检查了守护进程是否也在运行,它是 - 我什至尝试使用--fork
.
有没有人遇到过这个?或者有什么建议?
谢谢
更新:
重新启动后 - 以下是日志:
** WARNING: You are running in OpenVZ. This is known to be broken!!!
Tue Feb 7 19:43:32 [initandlisten] db version v1.8.2, pdfile version 4.5
Tue Feb 7 19:43:32 [initandlisten] git version: nogitversion
Tue Feb 7 19:43:32 [initandlisten] build sys info: Linux allspice 2.6.24-28-se$
Tue Feb 7 19:43:32 [initandlisten] *** warning: spider monkey build without ut$
Tue Feb 7 19:43:32 [initandlisten] waiting for connections on port 27017
Tue Feb 7 19:43:32 [websvr] web admin interface listening on port 28017