-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
None
-
Affects Version/s: 2.4.3
-
Component/s: Networking
-
ALL
-
-
Platforms 14 (05/13/16)
When you start the mongos instance and specify the adresse of a config server, and this address is an IPV6, mongos can't resolve it because it parse it as a normal IP or hostname.
https://github.com/mongodb/mongo/blob/master/src/mongo/s/config.cpp#L984
to resolve this issue we can remplace:
if ( name.find( ":" ) != string::npos ) { if ( withPort ) return name; return name.substr( 0 , name.find( ":" ) ); }
by:
if ( name.find( ":" ) != string::npos ) { if ( withPort ) return name; return name.substr( 0 , name.find_last_of( ":" ) ); }
Example:
2001:0db8:0000:85a3:0000:0000:ac1f:8001:port
mongos will try to resolve "2001" as the host part of the adresse intead of 2001:0db8:0000:85a3:0000:0000:ac1f:8001
- is related to
-
SERVER-5436 IPv6 address ambiguity in HostPort syntax
- Closed
- related to
-
SERVER-11664 Fix IPv6 address parsing
- Closed
- links to