Joshua
Joshua

Reputation: 31

Unable to run mongod: Fatal Assertion 28562

Newbie here learning node.js and mongodb. I am currently trying to install mongodb on my Mac and faced the following issue when i try to run mongod on terminal.

2016-01-31T12:08:39.791+0800 I CONTROL  [initandlisten] MongoDB starting :    pid=13733 port=27017 dbpath=/data/db 64-bit host=Joshuas-MBP
2016-01-31T12:08:39.792+0800 I CONTROL  [initandlisten] db version v3.2.1
2016-01-31T12:08:39.792+0800 I CONTROL  [initandlisten] git version: a14d55980c2cdc565d4704a7e3ad37e4e535c1b2
2016-01-31T12:08:39.792+0800 I CONTROL  [initandlisten] allocator: system
2016-01-31T12:08:39.792+0800 I CONTROL  [initandlisten] modules: none
2016-01-31T12:08:39.792+0800 I CONTROL  [initandlisten] build environment:
2016-01-31T12:08:39.792+0800 I CONTROL  [initandlisten]     distarch: x86_64
2016-01-31T12:08:39.792+0800 I CONTROL  [initandlisten]     target_arch: x86_64
2016-01-31T12:08:39.792+0800 I CONTROL  [initandlisten] options: {}
2016-01-31T12:08:39.794+0800 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=4G,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2016-01-31T12:08:47.249+0800 E STORAGE  [initandlisten] WiredTiger (22) [1454213327:242370][13733:0x7fff72b68000], WT_SESSION.create: 'table:_mdb_catalog' cannot be used until all column groups are created: Invalid argument
2016-01-31T12:08:47.259+0800 I -        [initandlisten] Fatal Assertion 28562
2016-01-31T12:08:47.259+0800 I -        [initandlisten] 

***aborting after fassert() failure

I have basically performed the following operations on terminal to install mongodb after looking through the docs and online tutorials:

joshuatan ~ $ brew update
joshuatan ~ $ brew install mongodb
joshuatan ~ $ sudo mkdir -p /data/db
joshuatan ~ $ whoami
joshuatan
joshuatan ~ $ sudo chown joshuatan /data/db
joshuatan ~ $ mongod

I have been searching around in google/stackoverflow but am not able to find any posts which have encountered a similar error.

Am i missing something? Would really appreciate any help/guidance...Thanks

Upvotes: 2

Views: 3428

Answers (2)

lucasarruda
lucasarruda

Reputation: 1482

If you are on Catalina, like me, what seems to work is to create a properly placed data/db on System/Volumes/Data/data/db, with

sudo mkdir -p /System/Volumes/Data/data/db
sudo chown -R `id -un` /System/Volumes/Data/data/db

And, then, add that path to mongod.conf (located on /usr/local/etc/mongod.conf), replacing dbPath there:

...
storage:
  dbPath: /System/Volumes/Data/data/db
...

Then, restart it. If you are using brew, do:

brew services restart mongodb-community

Source: https://zellwk.com/blog/install-mongodb/

Upvotes: 0

grepit
grepit

Reputation: 22392

The only thing that worked for me was (which was mac os)

rm -rf /tmp/mongodb-27017.soccd; cd /data/db;  rm -rf *;

then just mongod to start it up

Upvotes: 5

Related Questions