-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add localhost vs 127.0.0.1 info in FAQ and connections docs #13483
Comments
Node 18.x connects to IPv6 address ::1 instead of IPv4 127.0.0.1 when using localhost:27017. net:
port: 27017
bindIp: localhost
ipv6: true |
@vkarpov15 should we add this to the FAQ? |
It didn't worked initially, but after making the changes to config file, needed to restart the MongoDB server from services. |
docs(connections+faq): add info on localhost vs 127.0.0.1
Prerequisites
Mongoose version
7.2.2
Node.js version
18.12.1
MongoDB version
6.0.4
Operating system
Windows
Operating system version (i.e. 20.04, 11.3, 10)
11
Issue
I can connect to mongoDB with
127.0.0.1:27017
andlocalhost:27017
both, with the help of mongoDB Compass, when I am trying to connect to the same with the help of mongoose, forlocalhost:27017
it is showing error message like,ECONNREFUSED ::1:27017
, but in case if I try to connect with127.0.0.1:27017
, it connects.N.B: I have checked my host mapping for my system, everything is mapped correctly.
The text was updated successfully, but these errors were encountered: