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

Hello community

I have the same problem… Any solution please?

Best regards.

By same problem you mean sysctl error or listener setup error?
Is your bindIp value correct?
Are you connecting remotely?Can you connect locally

Hello mister

I am going to do all again and we´ll see what happens. Because I getout to trash the virtual machine so…
I will informe about that as soon as possible.

Best regards.

The problem is that MONGODB version 6 needs virtual hardware to run so, I installed a old version of mongodb.

Best regards.

I’m unable to connect mongoDB with redhat, below is the log

{“t”:{“$date”:“2023-09-10T06:06:20.630+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:20698, “ctx”:“main”,“msg”:“***** SERVER RESTARTED **“}
{“t”:{”$date":“2023-09-10T06:06:20.647+05:30”},“s”:“I”, “c”:“NETWORK”, “id”:4915701, “ctx”:“main”,“msg”:“Initialized wire specification”,“attr”:{“spec”:{“incomingExternalClient”:{“minWireVersion”:0,“maxWireVersion”:21},“incomingInternalClient”:{“minWireVersion”:0,“maxWireVersion”:21},“outgoing”:{“minWireVersion”:6,“maxWireVersion”:21},“isInternalClient”:true}}}
{“t”:{“$date”:“2023-09-10T06:06:20.649+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:23285, “ctx”:“main”,“msg”:“Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols ‘none’”}
{“t”:{“$date”:“2023-09-10T06:06:20.649+05:30”},“s”:“I”, “c”:“NETWORK”, “id”:4648601, “ctx”:“main”,“msg”:“Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set tcpFastOpenServer, tcpFastOpenClient, and tcpFastOpenQueueSize.”}
{“t”:{“$date”:“2023-09-10T06:06:20.797+05:30”},“s”:“I”, “c”:“REPL”, “id”:5123008, “ctx”:“main”,“msg”:“Successfully registered PrimaryOnlyService”,“attr”:{“service”:“TenantMigrationDonorService”,“namespace”:“config.tenantMigrationDonors”}}
{“t”:{“$date”:“2023-09-10T06:06:20.797+05:30”},“s”:“I”, “c”:“REPL”, “id”:5123008, “ctx”:“main”,“msg”:“Successfully registered PrimaryOnlyService”,“attr”:{“service”:“TenantMigrationRecipientService”,“namespace”:“config.tenantMigrationRecipients”}}
{“t”:{“$date”:“2023-09-10T06:06:20.797+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:5945603, “ctx”:“main”,“msg”:“Multi threading initialized”}
{“t”:{“$date”:“2023-09-10T06:06:20.797+05:30”},“s”:“I”, “c”:“TENANT_M”, “id”:7091600, “ctx”:“main”,“msg”:“Starting TenantMigrationAccessBlockerRegistry”}
{“t”:{“$date”:“2023-09-10T06:06:20.797+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:4615611, “ctx”:“initandlisten”,“msg”:“MongoDB starting”,“attr”:{“pid”:39591,“port”:27017,“dbPath”:“/var/lib/mongo”,“architecture”:“64-bit”,“host”:“MongoVM”}}
{“t”:{“$date”:“2023-09-10T06:06:20.797+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:23403, “ctx”:“initandlisten”,“msg”:“Build Info”,“attr”:{“buildInfo”:{“version”:“7.0.1”,“gitVersion”:“425a0454d12f2664f9e31002bbe4a386a25345b5”,“openSSLVersion”:“OpenSSL 1.1.1g FIPS 21 Apr 2020”,“modules”:[“enterprise”],“allocator”:“tcmalloc”,“environment”:{“distmod”:“rhel80”,“distarch”:“x86_64”,“target_arch”:“x86_64”}}}}
{“t”:{“$date”:“2023-09-10T06:06:20.797+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:51765, “ctx”:“initandlisten”,“msg”:“Operating System”,“attr”:{“os”:{“name”:“CentOS Linux release 8.3.2011”,“version”:“Kernel 4.18.0-240.1.1.el8_3.x86_64”}}}
{“t”:{“$date”:“2023-09-10T06:06:20.797+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:21951, “ctx”:“initandlisten”,“msg”:“Options set by command line”,“attr”:{“options”:{“config”:“/etc/mongod.conf”,“net”:{“bindIp”:“127.0.0.1”,“port”:27017},“processManagement”:{“timeZoneInfo”:“/usr/share/zoneinfo”},“storage”:{“dbPath”:“/var/lib/mongo”},“systemLog”:{“destination”:“file”,“logAppend”:true,“path”:“/var/log/mongodb/mongod.log”}}}}
{“t”:{“$date”:“2023-09-10T06:06:20.799+05:30”},“s”:“E”, “c”:“NETWORK”, “id”:23024, “ctx”:“initandlisten”,“msg”:“Failed to unlink socket file”,“attr”:{“path”:“/tmp/mongodb-27017.sock”,“error”:“Operation not permitted”}}
{“t”:{“$date”:“2023-09-10T06:06:20.799+05:30”},“s”:“F”, “c”:“ASSERT”, “id”:23091, “ctx”:“initandlisten”,“msg”:“Fatal assertion”,“attr”:{“msgid”:40486,“file”:“src/mongo/transport/asio/asio_transport_layer.cpp”,“line”:1202}}
{“t”:{“$date”:“2023-09-10T06:06:20.799+05:30”},“s”:“F”, “c”:“ASSERT”, “id”:23092, “ctx”:“initandlisten”,“msg”:"\n\n
aborting after fassert() failure\n\n”}

{“t”:{“$date”:“2023-09-10T06:09:17.619+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:20698, “ctx”:“main”,“msg”:“***** SERVER RESTARTED *****”}
{“t”:{“$date”:“2023-09-10T06:09:17.621+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:23285, “ctx”:“main”,“msg”:“Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols ‘none’”}
{“t”:{“$date”:“2023-09-10T06:09:17.628+05:30”},“s”:“I”, “c”:“NETWORK”, “id”:4915701, “ctx”:“main”,“msg”:“Initialized wire specification”,“attr”:{“spec”:{“incomingExternalClient”:{“minWireVersion”:0,“maxWireVersion”:21},“incomingInternalClient”:{“minWireVersion”:0,“maxWireVersion”:21},“outgoing”:{“minWireVersion”:6,“maxWireVersion”:21},“isInternalClient”:true}}}
{“t”:{“$date”:“2023-09-10T06:09:17.628+05:30”},“s”:“I”, “c”:“NETWORK”, “id”:4648601, “ctx”:“main”,“msg”:“Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set tcpFastOpenServer, tcpFastOpenClient, and tcpFastOpenQueueSize.”}
{“t”:{“$date”:“2023-09-10T06:09:17.643+05:30”},“s”:“I”, “c”:“REPL”, “id”:5123008, “ctx”:“main”,“msg”:“Successfully registered PrimaryOnlyService”,“attr”:{“service”:“TenantMigrationDonorService”,“namespace”:“config.tenantMigrationDonors”}}
{“t”:{“$date”:“2023-09-10T06:09:17.643+05:30”},“s”:“I”, “c”:“REPL”, “id”:5123008, “ctx”:“main”,“msg”:“Successfully registered PrimaryOnlyService”,“attr”:{“service”:“TenantMigrationRecipientService”,“namespace”:“config.tenantMigrationRecipients”}}
{“t”:{“$date”:“2023-09-10T06:09:17.644+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:5945603, “ctx”:“main”,“msg”:“Multi threading initialized”}
{“t”:{“$date”:“2023-09-10T06:09:17.644+05:30”},“s”:“I”, “c”:“TENANT_M”, “id”:7091600, “ctx”:“main”,“msg”:“Starting TenantMigrationAccessBlockerRegistry”}
{“t”:{“$date”:“2023-09-10T06:09:17.644+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:4615611, “ctx”:“initandlisten”,“msg”:“MongoDB starting”,“attr”:{“pid”:39681,“port”:27017,“dbPath”:“/var/lib/mongo”,“architecture”:“64-bit”,“host”:“MongoVM”}}
{“t”:{“$date”:“2023-09-10T06:09:17.645+05:30”},“s”:“I”, “c”:“CONTROL”, “id”:23403, “ctx”:“initandlisten”,“msg”:“Build Info”,“attr”:{“buildInfo”:{“version”:“7.0.1”,“gitVersion”:“425a0454d12f2664f9e31002bbe4a386a25345b5”,“openSSLVersion”:“OpenSSL 1.1.1g FIPS 21 Apr 2020”,“modules”:[“enterprise”],“allocator”:“tcmalloc”,“environment”:{“distmod”:“rhel80”,“distarch”:“x86_64”,“target_arch”:“x86_64”}}}}