MongoDB服务器问题,(anon):1137exception连接失败

我最近在Ubuntu上安装了MongoDB服务器。 这是工作,我也使用PHP的ID,但是,我不知道为什么开始失败。 这是我第一次使用mongodb,所以我有点迷路。

实际上,当试图通过PHP或通过shell访问mongo时:

root@ubuntu:~# /etc/init.d/mongodb restart Rather than invoking init scripts through /etc/init.d, use the service(8) utility, eg service mongodb restart Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the stop(8) and then start(8) utilities, eg stop mongodb ; start mongodb. The restart(8) utility is also available. mongodb start/running, process 7223 root@ubuntu:~# root@ubuntu:~# mongo MongoDB shell version: 1.6.3 Wed Sep 7 10:20:35 *** warning: spider monkey build without utf8 support. consider rebuilding with utf8 support connecting to: test Wed Sep 7 10:20:35 Error: couldn't connect to server 127.0.0.1 (anon):1137 exception: connect failed root@ubuntu:~# 

我第一次使用蜘蛛猴的错误不在那里。 它的工作。 我试图重新安装,什么也没有。

我如何解决这个问题?

先谢谢你! 我可以添加任何信息让我知道,请。

正如它所说,试试这个:

 # start mongodb 

还要看看Upstart–一个基于事件的SysV init的替代品。