2015-01-16 3 views
-4

Mac OSX에 MongoDB를 설치했습니다. mongod을 실행하면 연결이 시작되지 않습니다. 대신 아래 출력을 표시합니다. 누군가가 나이MongoDB 인스턴스가 시작되지 않습니다.

$ mongod 
mongod --help for help and startup options 
2015-01-16T09:57:18.994-0500 [initandlisten] MongoDB starting : pid=1571 port=27017 dbpath=/data/db 64-bit host=3c15c2e72774 
2015-01-16T09:57:18.995-0500 [initandlisten] 
2015-01-16T09:57:18.995-0500 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000 
2015-01-16T09:57:18.995-0500 [initandlisten] db version v2.6.7 
2015-01-16T09:57:18.995-0500 [initandlisten] git version: nogitversion 
2015-01-16T09:57:18.995-0500 [initandlisten] build info: Darwin minimavericks.local 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49 
2015-01-16T09:57:18.995-0500 [initandlisten] allocator: tcmalloc 
2015-01-16T09:57:18.995-0500 [initandlisten] options: {} 
2015-01-16T09:57:18.996-0500 [initandlisten] journal dir=/data/db/journal 
2015-01-16T09:57:18.996-0500 [initandlisten] recover : no journal files present, no recovery needed 
2015-01-16T09:57:19.056-0500 [initandlisten] bad .ns file: /data/db/local.ns 
2015-01-16T09:57:19.056-0500 [initandlisten] warning database /data/db local could not be opened 
2015-01-16T09:57:19.056-0500 [initandlisten] DBException 10079: bad .ns file length, cannot open database 
2015-01-16T09:57:19.056-0500 [initandlisten] exception in initAndListen: 10079 bad .ns file length, cannot open database, terminating 
2015-01-16T09:57:19.056-0500 [initandlisten] dbexit: 
2015-01-16T09:57:19.056-0500 [initandlisten] shutdown: going to close listening sockets... 
2015-01-16T09:57:19.056-0500 [initandlisten] shutdown: going to flush diaglog... 
2015-01-16T09:57:19.056-0500 [initandlisten] shutdown: going to close sockets... 
2015-01-16T09:57:19.056-0500 [initandlisten] shutdown: waiting for fs preallocator... 
2015-01-16T09:57:19.056-0500 [initandlisten] shutdown: lock for final commit... 
2015-01-16T09:57:19.056-0500 [initandlisten] shutdown: final commit... 
2015-01-16T09:57:19.056-0500 [initandlisten] shutdown: closing all files... 
2015-01-16T09:57:19.056-0500 [initandlisten] closeAllFiles() finished 
2015-01-16T09:57:19.056-0500 [initandlisten] journalCleanup... 
2015-01-16T09:57:19.060-0500 [initandlisten] removeJournalFiles 
2015-01-16T09:57:19.060-0500 [initandlisten] shutdown: removing fs lock... 
2015-01-16T09:57:19.060-0500 [initandlisten] dbexit: really exiting now 
+0

data/db 폴더를 만들었습니까? 좋아하지 않는 것 같습니다 –

+0

예 폴더를 만들었습니다 – user3841342

+0

안녕하세요 chridam, 내 문제는 initAndListen 예외입니다 : 10079 불량 .ns 파일 길이, 데이터베이스를 열 수 없습니다. 이것을 해결하는 방법 – user3841342

답변

1

나는이 문제를 가지고 MongoDB를

0

다시 시작에/데이터/DB 어떤 오래되거나 손상된 .NS 파일을 제거하고 해결하는 데 도움을 주시기 바랍니다 수 있습니다. 가상 박스를 사용하여 복제본의 메모리 크기를 늘려서 해결했습니다.