Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-25836

net.ipv6 still used in 3.2.9 whereas doc says it's removed and useless.

    • Type: Icon: Question Question
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.2.9
    • Component/s: Networking
    • None

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            bigbourin@gmail.com Adrien Jarthon
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: