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

specifying --bind_ip localhost results in error "address already in use"

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.3, 3.7.2
    • Affects Version/s: 3.6.0, 3.6.1
    • Component/s: Networking
    • None
    • Environment:
      CentOS Linux release 7.4.1708 (Core)
    • Fully Compatible
    • ALL
    • v3.6
    • Hide

      mongod --bind_ip localhost --dbpath data --logpath mongod.log
      or
      mongod --bind_ip localhost,10.0.2.15 --dbpath data --logpath mongod.log

      Show
      mongod --bind_ip localhost --dbpath data --logpath mongod.log or mongod --bind_ip localhost,10.0.2.15 --dbpath data --logpath mongod.log

      Specifying --bind_ip localhost with or without an additional ip address results in the server error:

      2018-01-10T18:17:10.809+0000 I STORAGE  [initandlisten] exception in initAndListen std::exception: listen: Address already in use, terminating
      2018-01-10T18:17:10.809+0000 I NETWORK  [initandlisten] shutdown: going to close listening sockets...
      

      As a result, it is not possible to start a server that binds to both localhost and an alternate IP address.

            Assignee:
            sara.golemon@mongodb.com Sara Golemon
            Reporter:
            arnie.listhaus@mongodb.com Arnie Listhaus
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: