使用mongod --dbpath开启mongo时遇到了问题。我收到了以下错误信息:
NETWORK [HostnameCanonicalizationWorker] Failed to obtain address information for hostname ##########: nodename nor servname provided, or not known
主机名只能使用拉丁字符。我尝试了多个网络,删除了所有DNS条目,确认我的/etc/hosts文件没有问题,现在我陷入了僵局。
这是我的/etc/hosts文件:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
#::1 localhost