I have MongoDB running in a virtual machine. Everything was working fine until my physical PC lost power unexpectedly. After rebooting, I am unable to run MongoDb.
Below are the results of running commands that may give information that will help anyone who answers.
mongo -version
MongoDB shell version v4.4.25
Build Info: {
"version": "4.4.25",
"gitVersion": "3e18c4c56048ddf22a6872edc111b542521ad1d5",
"openSSLVersion": "OpenSSL 1.1.1f 31 Mar 2020",
"modules": [],
"allocator": "tcmalloc",
"environment": {
"distmod": "ubuntu2004",
"distarch": "x86_64",
"target_arch": "x86_64"
}
}
mongo
MongoDB shell version v4.4.25
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :
connect@src/mongo/shell/mongo.js:374:17
@(connect):2:6
exception: connect failed
exiting with code 1
systemctl status mongod.service
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: failed (Result: core-dump) since Wed 2024-01-17 16:35:01 GMT; 57s ago
Docs: https://docs.mongodb.org/manual
Process: 1120 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=dumped, signal=ABRT)
Main PID: 1120 (code=dumped, signal=ABRT)
Jan 17 16:34:57 curtis-virtual-machine systemd[1]: Started MongoDB Database Server.
Jan 17 16:34:57 curtis-virtual-machine mongod[1120]: {"t":{"$date":"2024-01-17T16:34:57.881Z"},"s":"I", "c":"CONTROL", "id":7484500, "ctx":"main","msg":"Environment variable MONGODB_CONFIG_OVERRIDE_NOFORK == 1, overriding \"processManagement.fork\" to false"}
Jan 17 16:35:01 curtis-virtual-machine systemd[1]: mongod.service: Main process exited, code=dumped, status=6/ABRT
Jan 17 16:35:01 curtis-virtual-machine systemd[1]: mongod.service: Failed with result 'core-dump'.