[SERVER-37941] specifying --bind_ip localhost results in error "address already in use" when IPv6 alias exists Created: 06/Nov/18 Updated: 29/Oct/23 Resolved: 07/Nov/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Networking |
| Affects Version/s: | None |
| Fix Version/s: | 4.0.5, 4.1.5 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Mariano Escribano | Assignee: | Sara Golemon |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Backport Requested: |
v4.0
|
||||||||||||||||
| Steps To Reproduce: | Assuming the following /etc/hosts file: # cat /etc/hosts mongod --bind_ip localhost --dbpath data --logpath mongod.log |
||||||||||||||||
| Sprint: | Security 2018-11-19 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||
| Description |
|
Specifying --bind_ip localhost with or without an additional ip address results in the server error below and the mongod fails to start: 2018-11-06T10:23:07.682-0600 I STORAGE [initandlisten] exception in initAndListen std::exception: listen: Address already in use, terminating This is due to the `localhost` alias being used for both IPv4 and IPv6 loopback addresses in /etc/hosts. The following workarounds are available:
This was tested on the following release:
|
| Comments |
| Comment by Githook User [ 09/Nov/18 ] |
|
Author: {'name': 'Sara Golemon', 'email': 'sara.golemon@mongodb.com', 'username': 'sgolemon'}Message: (cherry picked from commit f62cf06d496a357b6fb3f1ca9f3174887fca302a) |
| Comment by Githook User [ 07/Nov/18 ] |
|
Author: {'name': 'Sara Golemon', 'email': 'sara.golemon@mongodb.com', 'username': 'sgolemon'}Message: |
| Comment by Sara Golemon [ 06/Nov/18 ] |
|
Looks like the fix applied for |