-
Type: Bug
-
Resolution: Community Answered
-
Priority: 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:
- mongod.service - running mongodb-27017.sock -exist
- mongod.service - running mongodb-27017.sock - does not exist
- mongod.service - stoped mongodb-27017.sock -exist
- 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