Aborted(Core dumped) when running mongd with a config file


It keeps giving me this. What does core dumped mean? what is the core?
I checked my process. I didn’t see any mongo process.

Your mongod process is getting terminated abnormally causing core dump
Please check your config file
Did you create necessary dirs for dbpath & logpath with required permissions?

This is what my config file look like. I think it looks fine.

This is the permission of that file. It has write and read permission for others.

Are you sure these dirs exist?

Please show output of
ls -lrt /data/db

ls -lrt /var/log/mongod

/data/db does exist and the permission is fine. So is the monogd.log

WiredTigerLAS.wt seems to indicated you started mongod as the root user. Your previous mongod might still be running. Use ps -aef | grep [m]ongo and ss -tlnmp to determine if it is the case. The best way is to connect to the running instance is with mongo and do a clean shutdown. Then try to restart mongod as vagrant user.

Thanks for the reply.
Here are the results. Can’t find a mongod process and socket information shows no sign of a mongod process.

You have no mongod running. If the root owned files in /data/db/ remove them with sudo.

Thank you. I’ll try that out.

Still aborted

Give vagrant ownership of the config file:
sudo chown -R vagrant:vagrant /etc/mongod.conf

PS: For this course, use the shared folder to host your config files.

I forgot to make you remove the *.lock files.

Last try remove all files in /data/db.

Thanks. Now we have another situation.
I cleared /data/db folder and tried to run monogd. After pressing enter, a cursor appeared on a new line and it accepts my input. Nothing else happened.

I recalled that this also happened when I first run mongod with a config file and I didn’t know what to know so I Ctrl C out of it. After that, I run into the aborted problem when I run monogd again.

You mongod seems to be running fine now. Please do not Ctl-C. You may Ctr-Z and type bg. Your config file is probably missing the fork options.

Thank you. It works now! I guess my first try actually worked I just had no idea why it gave me a cursor on a newline.

Still a lot to learn on Linux stuff.

The Ctr-Z suspend the process and returns you to the shell. The bg command resume the last suspended job as a background process.

Check the processManagement.fork option in https://docs.mongodb.com/manual/reference/configuration-options/ so that you do not have to Ctl-Z and bg in the future.

1 Like