4

I just reinstalled OSX from a backup and now I can't get mongod to work. I'm getting the ***aborting after fassert() failure error. Here's a pastebin with the log: http://pastebin.com/5WmXdGKd.

I get the same error if I try to run sudo mongod --repair. I also tried the solution offered here: https://stackoverflow.com/a/34946049/3923183, but after deleting the .sock file, nothing changed. None of the other solutions I've found were any help.

This is on my local machine, not a server, so I have no problem losing any data. I can easily replace it. I tried removing mongodb and reinstalling, but the problem persists. Any help would be greatly appreciated, thanks!

Community
  • 1
  • 1
nikarc
  • 138
  • 3
  • 11
  • what was the reason for reinstall? did mongod shutdown gracefully before reinstall? – profesor79 Jun 24 '16 at 15:20
  • I replaced the hard drive in my computer. As far as i know it shutdown correctly. I killed all the processes in terminal i had running and shut down the computer. – nikarc Jun 24 '16 at 15:22
  • I did a time machine restore and I'm having a similar problem. Looking like starting fresh might be the only option right now... Luckily not production data and just me playing around with learning MongoDB but super annoying. – Keverw Jul 09 '16 at 09:16

3 Answers3

2

you can just add new --dbpath in your config file, no need to reinstall mongodb.

Rahman Bokhari
  • 125
  • 1
  • 7
0

Try increasing your ulimit and give ownership to the db path of "mongodb" or "mongod" and restart your mongod it works for me.

Go to /etc/security/limit.conf and add the following lines and save the file and restart your machine to take effect.

 * soft     nproc          200000
 * hard     nproc          200000
 * soft     nofile         200000
 * hard     nofile         200000
 * soft     memlock        2048
 * hard     memlock        2048
-4

So I was able to fix my problem by simply moving/deleting /data/db and and starting with an empty /data/db folder. Of course this removes all db data, so it's not really a solution to the problem and should only be done if you don't mind losing your data.

nikarc
  • 138
  • 3
  • 11