[SERVER-32766] net.bindIpAll with net.ipv6 fails with "listen: Address already in use, terminating" Created: 18/Jan/18 Updated: 30/Oct/23 Resolved: 28/Jan/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Networking |
| Affects Version/s: | 3.6.2 |
| Fix Version/s: | 3.6.3, 3.7.2 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Olav Morken | Assignee: | Sara Golemon |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Debian Jessie |
||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Backport Requested: |
v3.6
|
||||
| Steps To Reproduce: | 1. Create a temporary empty data directory for the database: mkdir /tmp/delete-me-test-mongodb-bindall |
||||
| Participants: | |||||
| Description |
|
Enabling both net.bindIpAll (--bind_ip_all) and net.ipv6 (--ipv6) results in the server failing to start with the following error message:
The same thing occurs if specifying --bind_ip 0.0.0.0,:: with the --ipv6 option. A workaround for this issue is to specify --bind_ip with all IPv4 & IPv6 addresses of the server. The log output is attached as mongodb-ipv6-bindall-log.txt. |
| Comments |
| Comment by Githook User [ 31/Jan/18 ] |
|
Author: {'email': 'sara.golemon@mongodb.com', 'name': 'Sara Golemon', 'username': 'sgolemon'}Message: (cherry picked from commit d887ee0da56d4f099e3bec9f1079467ec465850c) |
| Comment by Sara Golemon [ 28/Jan/18 ] |
|
Issue fixed on master branch. Backport for 3.6 requested. |
| Comment by Githook User [ 28/Jan/18 ] |
|
Author: {'email': 'sara.golemon@mongodb.com', 'name': 'Sara Golemon', 'username': 'sgolemon'}Message: |
| Comment by Sara Golemon [ 28/Jan/18 ] |
|
Hello Olav; The fix is currently in review, and should hopefully find its way back to 3.6 shortly. In the mean time, you should be able to bind all addresses on your 3.6 system by specifying: --bind_ip '::' --ipv6 Note the lack of of the IPv4 formatted "0.0.0.0". Ordinarily this would NOT work, but our new transport layer was missing an option which disables IPv4-in-IPv6 mapped addresses. Since both 0.0.0.0 and :: would therefore cover the 0.0.0.0 range, we get the "address already in use" message. Once the fix is in, and you upgrade to a version which has the fix, you'll want to put 0.0.0.0 back into that list, or better yet just use --bind_ip_all directly at that time. |
| Comment by Kelsey Schubert [ 19/Jan/18 ] |
|
Thanks for the clear reproduction steps, olavmrk – we're investigating the issue and will update this ticket as we progress. |
| Comment by Olav Morken [ 18/Jan/18 ] |
|
Sorry for the incorrectly formatted issue description; It was appears that using monospaced with option names in some cases result in JIRA formatting it as strike-through instead. Unfortunately I cannot edit the description to fix it. |