[SERVER-25836] net.ipv6 still used in 3.2.9 whereas doc says it's removed and useless. Created: 27/Aug/16  Updated: 20/Feb/17  Resolved: 31/Aug/16

Status: Closed
Project: Core Server
Component/s: Networking
Affects Version/s: 3.2.9
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Adrien Jarthon Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates DOCS-8722 net.ipv6 is used in MongoDB configura... Closed
Related
Participants:

 Description   

I'm a bit confused here, there's not much information about using mongodb with ipv6 the only one I read in the doc seems to be wrong, here is what the doc (https://docs.mongodb.com/manual/reference/configuration-options/) says:

net.ipv6
Type: boolean

Default: False

Removed in version 3.0.

Enable or disable IPv6 support and allows mongos or mongod to connect to the MongoDB instance using an IPv6 network. Prior to MongoDB 3.0, you had to specify net.ipv6 to use IPv6. In MongoDB 3.0 and later, IPv6 is always enabled.

So as I'm using 3.2.9, I understand this option no longer exists and ipv6 is enabled by default. But ipv6 is not working for me, and when I tried setting this options after hours of debugging, I actually found it to be working ☹:

$ mongod --version
db version v3.2.9
git version: 22ec9e93b40c85fc7cae7d56e7d6a02fd811088c
OpenSSL version: OpenSSL 1.0.2g-fips  1 Mar 2016
allocator: tcmalloc
modules: none
build environment:
    distmod: ubuntu1604
    distarch: x86_64
    target_arch: x86_64

without the option

$ tail -3 /etc/mongod.conf
net:
  port: 27017
 
$ sudo service mongodb restart
$ netstat -an | grep tcp | grep 27017
tcp        0      0 0.0.0.0:27017           0.0.0.0:*               LISTEN
$ nc -vz 127.0.0.1 27017
Connection to 127.0.0.1 27017 port [tcp/*] succeeded!
$ nc -vz ::1 27017
nc: connect to ::1 port 27017 (tcp) failed: Connection refused

with the option

$ tail -4 /etc/mongod.conf
net:
  port: 27017
  ipv6: true
 
$ sudo service mongodb restart
$ netstat -an | grep tcp | grep 27017
tcp        0      0 0.0.0.0:27017           0.0.0.0:*               LISTEN
tcp6       0      0 :::27017                :::*                    LISTEN
$ nc -vz 127.0.0.1 27017
Connection to 127.0.0.1 27017 port [tcp/*] succeeded!
$ nc -vz ::1 27017
Connection to ::1 27017 port [tcp/*] succeeded!

So what's the problem, did I misunderstood something ? is it a bug ? is the doc wrong or the code wrong ? I'll of course use this option in the meanwhile but I would like to save the next persons to have this issue a few hours of their life

And I would also make sure that If I start using this option it won't break my config at some upgrade once it's removed for real.



 Comments   
Comment by Geert Hendrickx [ 20/Feb/17 ]

@Thomas Schubert,

Alternatively, isn't it about time to just enable IPv6 by default in mongod/mongos and shell as well?

Comment by Kelsey Schubert [ 06/Sep/16 ]

Yes, that's correct, bigbourin@gmail.com.

Comment by Adrien Jarthon [ 31/Aug/16 ]

Hi Thomas,

Ok so this is just a documentation issue then, I can keep using this option without any risk?

Thanks!

Comment by Kelsey Schubert [ 31/Aug/16 ]

Hi bigbourin@gmail.com,

Thank you for bringing this to our attention. This is an issue with our documentation resulting from a change in DOCS-7067 and I've opened DOCS-8722 to correct it. Please feel free to vote for it and watch it for updates.

Best regards,
Thomas

Generated at Thu Feb 08 04:10:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.