简体   繁体   中英

Fail to start mongodb on centos

I'm trying to install mongodb on my centos server. after downloading and unziping the file I used the command rpm -ivh mongodb-org-server-4.0.5-1.el6.x86_64.rpm to install mongodb, then mkdir -p /var/lib/mongo and mkdir -p /var/log/mongodb to create the MongoDB data and log directories. I did chown -R mongod:mongod <directory> to set the owner and group of these directories to mongod. I modified the path : export PATH=<mongodb-install-directory>/bin:$PATH

but when I want to start mongo it fails Starting mongod: [FAILED] it is the stack trace in mongodb log file:

2019-01-13T10:45:13.807+0330 F -        [initandlisten] Fatal assertion 28520                                                                                           knownError: 28: No space left on device at src/mongo/db/storage/kv/kv_storage_                                                                                          gine.cpp 128
2019-01-13T10:45:13.807+0330 F -        [initandlisten]

***aborting after fassert() failure


2019-01-13T10:45:13.949+0330 F -        [initandlisten] Got signal: 6 (Aborted
 0x7fc4b8b36b11 0x7fc4b8b35d29 0x7fc4b8b3620d 0x7fc4b4fb3710 0x7fc4b4c42925 0x                                                                                          c4b4c44105 0x7fc4b715570b 0x7fc4b73a42a5 0x7fc4b73a6d40 0x7fc4b720c066 0x7fc4b                                                                                          ffa7a 0x7fc4b70d7f90 0x7fc4b71c1466 0x7fc4b7156fb9 0x7fc4b4c2ed1d 0x7fc4b71bf5
----- BEGIN BACKTRACE -----
{"backtrace":[{"b":"7FC4B6741000","o":"23F5B11","s":"_ZN5mongo15printStackTrac                                                                                          RSo"},{"b":"7FC4B6741000","o":"23F4D29"},{"b":"7FC4B6741000","o":"23F520D"},{"                                                                                          :"7FC4B4FA4000","o":"F710"},{"b":"7FC4B4C10000","o":"32925","s":"gsignal"},{"b                                                                                          "7FC4B4C10000","o":"34105","s":"abort"},{"b":"7FC4B6741000","o":"A1470B","s":"                                                                                          N5mongo42fassertFailedWithStatusNoTraceWithLocationEiRKNS_6StatusEPKcj"},{"b":                                                                                          FC4B6741000","o":"C632A5","s":"_ZN5mongo15KVStorageEngine11loadCatalogEPNS_16O                                                                                          rationContextE"},{"b":"7FC4B6741000","

can any one knows why it doesn't start successfully? It doesn't know the use command either when I want to make a database.

Why are you using version mongodb-org-server-4.0.5-1.el6.x86_64?

I recently installed mongodb on a shared centos server from godaddy. I used this version of mongodb:https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-4.0.5.tgz .

Remove all the files and folders from your first attempt, and try the version above. Hope it helps!

Edit:

SOLUTION by kometen

Does the file /tmp/mongodb-27017.sock exist? If so try to delete it, ie. 'sudo rm /tmp/mongodb-27017.sock'.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM