I’m new to mongodb and currently working on a virtual machine installed with redhat. it happens that we tried to change the permission of the following while adding the keyfile on the security option under /etc/mongod.conf
then we restart the mongodb using the command systemctl restart mongod
@Ian_Sherwin_Canaya Do you get the solution for this issue ? I have also this issue i can’t get solution yet…if you get the solution please give the method…
Hi @Ian_Sherwin_Canaya and @ajay_ps, even I’m new to MongoDB and I too had this error or whatever we can call this. I searched a ton of communities and was unable to find a fix and at the end came to a decision of reinstalling MongoDB from scratch by first removing all the packages and directories like log, database etc. After reinstalling it works fine.
About the error:
I have encountered two types of similar errors so far. One is similar to the one talked about in this post Active: failed (Result: core-dump) for which only fix I could find was to reinstall from scratch. I read somewhere that this is a possible consequence of crashed or corrupted database which can be caused by terminating the database in a way which shouldn’t be used ( I have no idea what way is it).
Another similar error is Active: failed (Result: exit-code). This can be caused by various correctable reasons like ownership (chown) or rwx (chmod) permissions of the log file and dbpath, the mongod service not running, etc.
@Yashvander_Bamel I reinstalled many times after deleting all packages. But No solution. and i changed the user in ubuntu and again installed but no solutions.
Checking time “sudo systemsctl start mongod” and after “mongo” command then get the error. Illegal instruction (core dumped)… this is the main issue
I can’t get any solution yet…
Did mongodb work on your system even once? Did you get this error when you installed mongodb for the first time ever? If that’s the case I can not comment anything.
But if it did run once and then crashed, you can remove all the packages and use steps mentioned here and delete all the files associated with mongodb. And then try to reinstall. Note that this would work only if you could run mongodb atleast once on your system as far as I can tell. But you can try in the other case as well.
And once you reinstall mongodb again, do not forget to change the ownership and permissions of the log and data folders
Found this on StackOverflow, very underrated answer. The KVM processor used in most Linux VM environments is NOT COMPATIBLE with MongoDB, try to change it to something else. I use Proxmox, and when I changed from KVM processors to EPYC it worked right away, no changes.
I installed pve on a host with an Intel core i7-2600 CPU.
I changed the processor type from Default KVM64 to Sandy-Bridge and then restart VM and mongodb service. It’s worked !