为什么我的mongodb无法连接到端口28017? [英] Why won't my mongodb connect to port 28017?

查看:600
本文介绍了为什么我的mongodb无法连接到端口28017?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望somone可以帮助我解决mongodb的问题.我之前可以正常连接,但是在断电期间笔记本电脑的电池用完之后,我无法再次连接到端口28017.我修复了数据库,但是当我连接时它既不会连接也不会引发错误.

I was hoping somone could help me with my problem with mongodb. I had been able to connect just fine before, however after my laptop's battery ran out during a power outage I have not been able to connect to port 28017 again. I repaired the database, yet when I connect it won't connect nor throw an error.

控制台:

Fri Jul 19 22:19:01.175 [initandlisten] build info: Linux bs-linux32.10gen.cc 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686 BOOST_LIB_VERSION=1_49
Fri Jul 19 22:19:01.175 [initandlisten] allocator: system
Fri Jul 19 22:19:01.175 [initandlisten] options: { dbpath: "/var/lib/mongodb" }
Fri Jul 19 22:19:01.363 [initandlisten] waiting for connections on port 27017
Fri Jul 19 22:19:01.363 [websvr] admin web console waiting for connections on port 28017

推荐答案

因此,该解决方案实际上是在与默认的27017和38017不同的端口上连接.我相信这是由于我进行的不安全关机,正如我提到的那样较早.

So the solution turned out to be connecting on different ports than the default 27017 and 38017. I believe this is because of an unsafe shutdown I had, as I mentioned earlier.

这篇关于为什么我的mongodb无法连接到端口28017?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆