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

Each time server restarts, mongod fails to start

    • Type: Icon: Bug Bug
    • Resolution: Community Answered
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      Ubuntu 18.04 LTS, mongodb 4.0.10
    • ALL

      After server machine reboot, mongod fails to start with error code: 48.
      Mitigation is to manualy run `sudo systemctl restart mongod` and it works.
      I played aroung and at one point deleting mongodb-27017.sock file was needed
      for mongodb to start, but after a reboot behavior went to the one I just describe.
      I've tried combinations of mongod.service running and file pre booting status:

      1. mongod.service - running mongodb-27017.sock -exist
      2. mongod.service - running mongodb-27017.sock - does not exist
      3. mongod.service - stoped mongodb-27017.sock -exist
      4. mongod.service - stoped mongodb-27017.sock -does not exist

      and problem persist.
      What is a long term mitigation, ie, how to make mongod starts good after server reboot?

      Short logs:

      2020-07-16T07:22:34.792+0200 I CONTROL [initandlisten] options: { config: "/etc/mongod.conf", net:

      { bindIp: "127.0.0.1,192.168.2.170", port: 27017 }

      , processManageme$
      2020-07-16T07:22:34.792+0200 E STORAGE [initandlisten] Failed to set up listener: SocketException: Cannot assign requested address
      2020-07-16T07:22:34.793+0200 I CONTROL [initandlisten] now exiting
      2020-07-16T07:22:34.793+0200 I CONTROL [initandlisten] shutting down with code:48

            Assignee:
            dmitry.agranat@mongodb.com Dmitry Agranat
            Reporter:
            nikolarancic@yahoo.com firstName lastName
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: