Mongodb shell mongo:通常只允许每个套接字地址(协议/网络地址/端口)使用一种.用于插座:0.0.0.0:27017 [英] Mongodb shell mongo: Only one usage of each socket address (protocol/network address/port) is normally permitted. for socket: 0.0.0.0:27017

查看:93
本文介绍了Mongodb shell mongo:通常只允许每个套接字地址(协议/网络地址/端口)使用一种.用于插座:0.0.0.0:27017的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

2天前还好,现在mongod不起作用.即使echo ps -A | grep mongo也什么也没打印,但是它警告错误:每个套接字地址只能使用一种".如何杀死它?我也尝试过使用其他随机端口.他们怎么也会失败?

It was fine 2 days ago, Now mongod does not work. Even echo ps -A | grep mongo printed nothing, yet it warns about error: "Only one usage of each socket address". How to kill that? I have also tried with different random port. How can they fail as well?

D:\mongodb-win32-x86_64-2.2.3\bin>mongod
mongod --help for help and startup options
Sun Mar 03 18:10:03 [initandlisten] MongoDB starting : pid=6292 port=27017 dbpat
h=\data\db\ 64-bit host=Sadaf
Sun Mar 03 18:10:03 [initandlisten] db version v2.2.3, pdfile version 4.5
Sun Mar 03 18:10:03 [initandlisten] git version: f570771a5d8a3846eb7586eaffcf4c2
f4a96bf08
Sun Mar 03 18:10:03 [initandlisten] build info: windows sys.getwindowsversion(ma
jor=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1') BOOST_LIB
_VERSION=1_49
Sun Mar 03 18:10:03 [initandlisten] options: {}
Sun Mar 03 18:10:03 [initandlisten] journal dir=/data/db/journal
Sun Mar 03 18:10:03 [initandlisten] recover : no journal files present, no recov
ery needed
Sun Mar 03 18:10:04 [initandlisten] ERROR: listen(): bind() failed errno:10048 O
nly one usage of each socket address (protocol/network address/port) is normally
 permitted. for socket: 0.0.0.0:27017
Sun Mar 03 18:10:04 [websvr] ERROR: listen(): bind() failed errno:10048 Only one
 usage of each socket address (protocol/network address/port) is normally permit
ted. for socket: 0.0.0.0:28017
Sun Mar 03 18:10:04 [initandlisten] now exiting
Sun Mar 03 18:10:04 dbexit:
Sun Mar 03 18:10:04 [initandlisten] shutdown: going to close listening sockets..
.
Sun Mar 03 18:10:04 [initandlisten] shutdown: going to flush diaglog...
Sun Mar 03 18:10:04 [initandlisten] shutdown: going to close sockets...
Sun Mar 03 18:10:04 [initandlisten] shutdown: waiting for fs preallocator...
Sun Mar 03 18:10:04 [initandlisten] shutdown: lock for final commit...
Sun Mar 03 18:10:04 [initandlisten] shutdown: final commit...
Sun Mar 03 18:10:04 [initandlisten] shutdown: closing all files...
Sun Mar 03 18:10:04 [initandlisten] closeAllFiles() finished
Sun Mar 03 18:10:04 [initandlisten] journalCleanup...
Sun Mar 03 18:10:04 [initandlisten] removeJournalFiles
Sun Mar 03 18:10:04 [initandlisten] shutdown: removing fs lock...
Sun Mar 03 18:10:04 dbexit: really exiting now

D:\mongodb-win32-x86_64-2.2.3\bin>echo ps -A | grep mongo

D:\mongodb-win32-x86_64-2.2.3\bin>

推荐答案

在命令提示符下,键入以下命令

In the command prompt type the following command

netstat -a -n -o | find "27017"

这将列出所有正在使用端口"27017"的进程以及PID.

This will list all processes which are using port "27017" along with the PID.

使用"27017"定位PID. 例如,如果PID为10580,则将其杀死

Locate the PID using "27017". For example if the PID is 10580, to kill it

taskkill /f /pid 10580

现在启动mongo. 希望这可以帮助.

Now start mongo. Hope this helps.

这篇关于Mongodb shell mongo:通常只允许每个套接字地址(协议/网络地址/端口)使用一种.用于插座:0.0.0.0:27017的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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