[SERVER-42065] 'Address family not supported by protocol' depending on the way used to disable IPv6 Created: 03/Jul/19 Updated: 29/Oct/23 Resolved: 10/Mar/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Networking |
| Affects Version/s: | None |
| Fix Version/s: | 4.7.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Carlos Rodríguez Hernández | Assignee: | Amirsaman Memaripour |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible | |||||
| Operating System: | ALL | |||||
| Steps To Reproduce: | Using a configuration file with
disabling IPv6 in the system by running
it works fine, but disabling it passing
as a bootarg to the Linux kernel, we obtain the
error message in the logs and the service doesn't run. |
|||||
| Sprint: | Service Arch 2019-10-07, Service Arch 2019-10-21, Service Arch 2019-11-18, Service Arch 2019-12-02, Service Arch 2019-12-16, Service Arch 2019-12-30, Service Arch 2020-01-13, Service Arch 2020-01-27, Service Arch 2020-02-10, Service Arch 2020-03-23 | |||||
| Participants: |
| Description |
|
Tested on k8s by setting the ipv6 parameter to true or false in the mongodb.conf file:
In some k8s cluster, mongodb service is not running because of the following error (from mongodb.log):
This message is very descriptive:
Although the host has disabled IPv6, it is expected that MongoDB will try to use IPv4 in its absence, in fact, we tried it when using this parameter for the first time, so why in some k8s cluster works and not in others? We can disable IPv6 support by running
in this case, mongodb server does not complain about unsupported address family when IPv6 is enabled in the configs. This reflects with our earlier findings as we had used the same method to disable IPv6.
Continuing on our investigation, we found that the alternate way of disabling IPv6 support is to pass
as a bootarg to the Linux kernel and with this, we were able to see the unsupported address family error with mongodb. With these findings, we cannot make the assumption that IPv6 enabled in the mongodb configs by default will always work regardless of whether the underlying host supports IPv6 or not.
|
| Comments |
| Comment by Githook User [ 10/Mar/20 ] |
|
Author: {'name': 'Amirsaman Memaripour', 'username': 'samanca', 'email': 'amirsaman.memaripour@mongodb.com'}Message: |
| Comment by Carlos Rodríguez Hernández [ 29/Aug/19 ] |
|
Sorry for the delay, as you can imagine after that, this is not a blocking issue for me, I just want to know the reasons and let you know. So you can schedule the task as you prefer. |
| Comment by Mira Carey [ 29/Jul/19 ] |
|
setting ipv6.disable is fundamentally different than setting disable_ipv6. The former completely avoids loading the ipv6 kernel module. The latter loads the kernel module, but avoids assigning addresses. carrodher, |
| Comment by Carlos Rodríguez Hernández [ 10/Jul/19 ] |
|
Thanks Daniel. |
| Comment by Danny Hatcher (Inactive) [ 08/Jul/19 ] |
|
Thanks for your report, I will forward this ticket to the appropriate team. |