mongodb - failed to connect to server [localhost:27017] on first connect
天蓬老师
天蓬老师 2017-05-02 09:23:22
0
3
1944

已安装mongodb,并通过mongo启动

运行命令 supervisor --harmony index 报错

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(3)
为情所困

Try to ping localhost

ping: cannot resolve localhost: Unknown host

Modify the host file and add 127.0.0.1 localhost

Just restart the service...

phpcn_u1582

Is there a problem with the configuration? Can you post the code for connecting to the database?

某草草

It seems that the Socket cannot be connected. You should first check whether the server address given is correct and whether you can connect using Shell.

mongo [ip]:[port]

If it can be connected, it means there is a configuration problem. Otherwise, mongodb may not be started at all, or the listening address may be incorrect. Problems need to be eliminated one by one.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!