Active:failed after running the command systemctl status mongod

HI Team,
After restarting the mongodb server we can observe that the status of mongo db server showing as Active:failed after running the command systemctl status mongod. Pls help on issues.

Regards,

Hi @anjaneya_prasad and welcome to the MongoDB Community forums. :wave:

You would need to look at the log files to figure out why the process failed. Without seeing the logs we can’t help point you in a direction to resolve the issue.

Hi @anjaneya_prasad,

In addition to an excerpt of the MongoDB server log it would be helpful to include:

  • O/S version
  • MongoDB server version
  • Type of deployment (standalone, replica set, or sharded cluster)
  • Whether this is a new or existing installation

As @Doug_Duncan mentioned, if a MongoDB process fails to start or exits unexpectedly the server log will usually include some error messages relating to the reason for shutting down the process.

Regards,
Stennie

HI Team,

I’m sharing my mongodb logs kindly check and resolve the issue. and below details.

-O/S version - NAME=Red Hat Enterprise Linux Server VERSION= 7.9
-MongoDB server version - MongoDB shell version v5.0.9
-Type of deployment - replica set
-This is a existing installation

2022-09-19T18:57:11.247+0530 E STORAGE [initandlisten] Failed to set up listener: SocketException: Cannot assign requested address
2022-09-19T18:57:11.248+0530 I CONTROL [initandlisten] now exiting
2022-09-19T18:57:11.248+0530 I CONTROL [initandlisten] shutting down with code:48
2022-09-20T11:28:41.904+0530 I CONTROL [main] ***** SERVER RESTARTED *****
2022-09-20T11:28:41.909+0530 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols ‘none’
2022-09-20T11:28:42.599+0530 I CONTROL [initandlisten] MongoDB starting : pid=230912 port=27017 dbpath=/var/lib/mongo 64-bit host=dctestapi1
2022-09-20T11:28:42.599+0530 I CONTROL [initandlisten] db version v4.2.0
2022-09-20T11:28:42.599+0530 I CONTROL [initandlisten] git version: a4b751dcf51dd249c5865812b390cfd1c0129c30
2022-09-20T11:28:42.599+0530 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
2022-09-20T11:28:42.599+0530 I CONTROL [initandlisten] allocator: tcmalloc
2022-09-20T11:28:42.599+0530 I CONTROL [initandlisten] modules: none
2022-09-20T11:28:42.599+0530 I CONTROL [initandlisten] build environment:
2022-09-20T11:28:42.599+0530 I CONTROL [initandlisten] distmod: rhel70
2022-09-20T11:28:42.599+0530 I CONTROL [initandlisten] distarch: x86_64
2022-09-20T11:28:42.599+0530 I CONTROL [initandlisten] target_arch: x86_64
2022-09-20T11:28:42.599+0530 I CONTROL [initandlisten] options: { config: “/etc/mongod.conf”, net: { bindIp: “10.1.4.33”, port: 27017 }, processManagement: { fork: true, pidFilePath: “/var/run/mongodb/mongod.pid”, timeZoneInfo: “/usr/share/zoneinfo” }, replication: { replSetName: “tykrs” }, storage: { dbPath: “/var/lib/mongo”, journal: { enabled: true } }, systemLog: { destination: “file”, logAppend: true, path: “/var/log/mongodb/mongod.log” } }
2022-09-20T11:28:42.599+0530 E STORAGE [initandlisten] Failed to set up listener: SocketException: Cannot assign requested address
2022-09-20T11:28:42.599+0530 I CONTROL [initandlisten] now exiting
2022-09-20T11:28:42.599+0530 I CONTROL [initandlisten] shutting down with code:48
2022-09-20T11:28:49.094+0530 I CONTROL [main] ***** SERVER RESTARTED *****
2022-09-20T11:28:49.099+0530 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols ‘none’
2022-09-20T11:28:49.110+0530 I CONTROL [initandlisten] MongoDB starting : pid=230944 port=27017 dbpath=/var/lib/mongo 64-bit host=dctestapi1
2022-09-20T11:28:49.110+0530 I CONTROL [initandlisten] db version v4.2.0
2022-09-20T11:28:49.110+0530 I CONTROL [initandlisten] git version: a4b751dcf51dd249c5865812b390cfd1c0129c30
2022-09-20T11:28:49.110+0530 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
2022-09-20T11:28:49.110+0530 I CONTROL [initandlisten] allocator: tcmalloc
2022-09-20T11:28:49.110+0530 I CONTROL [initandlisten] modules: none
2022-09-20T11:28:49.110+0530 I CONTROL [initandlisten] build environment:
2022-09-20T11:28:49.110+0530 I CONTROL [initandlisten] distmod: rhel70
2022-09-20T11:28:49.110+0530 I CONTROL [initandlisten] distarch: x86_64
2022-09-20T11:28:49.110+0530 I CONTROL [initandlisten] target_arch: x86_64
2022-09-20T11:28:49.110+0530 I CONTROL [initandlisten] options: { config: “/etc/mongod.conf”, net: { bindIp: “10.1.4.33”, port: 27017 }, processManagement: { fork: true, pidFilePath: “/var/run/mongodb/mongod.pid”, timeZoneInfo: “/usr/share/zoneinfo” }, replication: { replSetName: “tykrs” }, storage: { dbPath: “/var/lib/mongo”, journal: { enabled: true } }, systemLog: { destination: “file”, logAppend: true, path: “/var/log/mongodb/mongod.log” } }
2022-09-20T11:28:49.110+0530 E STORAGE [initandlisten] Failed to set up listener: SocketException: Cannot assign requested address
2022-09-20T11:28:49.110+0530 I CONTROL [initandlisten] now exiting
cally disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols ‘none’
2022-09-20T11:28:49.110+0530 I CONTROL [initandlisten] MongoDB starting : pid=230944 port=27017 dbpath=/var/lib/mongo 64-bit host=dctestapi1
2022-09-20T11:28:49.110+0530 I CONTROL [initandlisten] shutting down with code:48

You are trying to bind to an IP address that does not belong to this machine.

1 Like