0

我正在使用分片。

有时我会在 MongoDB 中收到此错误。

MongoConnectionException: Failed to connect to: localhost:30000: Couldn't get host info for localhost in /path/to/file/ on line 340

在 30000 端口配置服务器正在运行。蒙戈版本:2.4.3

这个问题有什么解决办法吗?

4

1 回答 1

0

I wrote 127.0.0.1 in place of localhost and problem resolved. But I don't know why it was coming ? what is the difference between localhost and 127.0.0.1 ?

于 2013-06-12T10:13:17.663 回答