mongodb启动错误(Failed to set up listener: SocketException: Cannot assign requested address)

编译环境为:华为“弹性云服务器”CentOS Linux+SecureCRT 8.3

错误日志

cat /var/log/mongdb/mongd.log



2019-01-16T09:50:44.675+0800 E STORAGE  [initandlisten] Failed to set up listener: SocketException: Cannot assign requested address
2019-01-16T09:50:44.675+0800 I CONTROL  [initandlisten] now exiting
2019-01-16T09:50:44.675+0800 I CONTROL  [initandlisten] shutting down with code:48

问题原因:配置文件mongod.conf中bindip填写有误

应该填写私有ip地址,而不是公网ip地址

解决办法:

1、编辑配置文件,修改其中的bindIp值

vim /etc/mongod.conf

mongodb启动错误(Failed to set up listener: SocketException: Cannot assign requested address)_第1张图片

你可能感兴趣的:(python)