[SERVER-60408] Mongod cannot bind to IPv6 address Created: 02/Oct/21 Updated: 11/Oct/21 Resolved: 11/Oct/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mi B | Assignee: | Edwin Zhou |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Operating System: | ALL |
| Steps To Reproduce: | This needs to be running inside an IPv6 docker environment
docker run -d -v /Docker/entrypoint/:/usr/local/bin/ -v /Docker/mongoconfig/mongod.conf.orig:/etc/mongod.conf.orig -p 27017:27017 mongo:5.0.3
docker entry point modified to docker-entrypoint.sh:
mongod --dbpath ~/mongoDB --bind_ip [::] --ipv6
|
| Participants: | |
| Story Points: | 25 |
| Description |
|
I'm running MongoDB inside the official container - however I am running docker in an IPv6 only environment. "ctx":"initandlisten","msg":"Found no addresses for peer","attr":{"peer": {"code":7,"codeName":"HostNotFound","errmsg":"Could not find address for [[::]]:27017: SocketException: Host not found (authoritative)"}}} I've tried typing the full IPv6 address, this also didn't work. It occurred to me that Mongod may be using a library to find the IPv6 address, I only have ifupdown and ifconfig installed. Log attached.
|
| Comments |
| Comment by Edwin Zhou [ 11/Oct/21 ] | |
|
I believe the issue occurs when the square brackets are included around the "::" ip address. The square brackets are used to delimit the IPv6 address with the port number. You may specify the port number with the --port flag.I was able to start the mongod with the command:
Please note that the MongoDB Docker image is maintained by the Docker Community and not by MongoDB. The MongoDB SERVER project is reserved for bug reports for the MongoDB server. As this doesn't appear to be a bug, I will close this ticket. We'd like to encourage you to ask our community for help by posting on the MongoDB Developer Community Forums. If the discussion there leads you to suspect a bug in the MongoDB server, then we'd want to investigate it as a possible bug here in the SERVER project. Best, |