gpt4 book ai didi

shell - Mongodb shell mongo : Only one usage of each socket address (protocol/network address/port) is normally permitted. 用于套接字 : 0. 0.0.0:27017

转载 作者:IT老高 更新时间:2023-10-28 13:09:10 27 4
gpt4 key购买 nike

2 天前还好,现在 mongod 不起作用。甚至 echo ps -A | grep mongo 什么也没打印,但它警告错误:“每个套接字地址只使用一次”。怎么杀那个?我也尝试过使用不同的随机端口。他们怎么会失败呢?

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>

最佳答案

在命令提示符下输入以下命令

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

这将列出所有使用端口“27017”的进程以及 PID。

使用“27017”定位 PID。比如PID是10580,杀掉它

taskkill /f /pid 10580

现在开始 mongo。希望这可以帮助。

关于shell - Mongodb shell mongo : Only one usage of each socket address (protocol/network address/port) is normally permitted. 用于套接字 : 0. 0.0.0:27017,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15185572/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com