MongoDB bind_ip won't work unless set to 0.0.0.0

后端 未结 12 842
遇见更好的自我
遇见更好的自我 2020-12-04 23:43

I really tried, even reinstall the MongoDB.

And it\'s the same to MongoDB bind_ip error: bind() failed errno:99 Cannot assign requested address for socket

It

12条回答
  •  忘掉有多难
    2020-12-05 00:22

    Using MongoDB 4.0.5: For me the following worked:

    bindIp=[127.0.0.1,11.22.33.44]
    

    And then I switched on Auth:

    security:
       authorization: "enabled"
    

    Restarting mongod (on Ubuntu 18.04) gave an error:

    Scalar option 'net.bindIp' must be a single value

    Therefore I had to do the bindIp: 0.0.0.0. Maybe somebody has a clue how to combine bindIp and Security

提交回复
热议问题