MONGODB | The address family is not supported by the protocol family - connect (2) for [:: 1]: 27017

I use rails 5lastest mongoidgem, and when starting a server mongodbwith any model this error will be thrown:

MONGODB | Address family not supported by protocol family - connect(2) for [::1]:27017

I almost looked for everything, but I can not find a solution.

Any suggestions are greatly appreciated.

+4
source share
1 answer

Just stumbled upon it myself, updating the gem mongoto 2.5.0(from 2.4.3). It looks like you can no longer connect to the Mongo instance using the domain name, in my case (and probably yours) localhost.

Change MONGOID_HOSTfrom localhost:27017to 127.0.0.1:27017.

+15
source

Source: https://habr.com/ru/post/1692683/


All Articles