3

我对 mongodb 很陌生。通过安装后:brew intall mongodb然后mongod在终端输入,错误抛出:kern.sched unavailable

我正在使用 mac os 版本 10.6.8。

日志:

Sat Apr 13 16:40:56.374 [initandlisten] MongoDB starting : pid=6387 port=27017 dbpath=/usr/local/var/mongodb 64-bit host=fatbizkit
Sat Apr 13 16:40:56.374 [initandlisten]
Sat Apr 13 16:40:56.374 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
Sat Apr 13 16:40:56.374 [initandlisten] db version v2.4.1
Sat Apr 13 16:40:56.374 [initandlisten] git version: 1560959e9ce11a693be8b4d0d160d633eee75110
Sat Apr 13 16:40:56.374 [initandlisten] build info: Darwin bs-osx-106-x86-64-1.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:$
Sat Apr 13 16:40:56.374 [initandlisten] allocator: system
Sat Apr 13 16:40:56.374 [initandlisten] options: { bind_ip: "127.0.0.1", config: "/usr/local/etc/mongod.conf", dbpath: "/usr/local/var/mong$
Sat Apr 13 16:40:56.375 [initandlisten] journal dir=/usr/local/var/mongodb/journal
Sat Apr 13 16:40:56.375 [initandlisten] recover : no journal files present, no recovery needed
Sat Apr 13 16:40:56.441 [websvr] admin web console waiting for connections on port 28017
Sat Apr 13 16:40:56.442 [initandlisten] waiting for connections on port 27017  
Sat Apr 13 16:41:29.416 got signal 2 (Interrupt), will terminate after current cmd ends
Sat Apr 13 16:41:29.416 [interruptThread] now exiting
Sat Apr 13 16:41:29.416 dbexit:
Sat Apr 13 16:41:29.416 [interruptThread] shutdown: going to close listening sockets...
Sat Apr 13 16:41:29.416 [interruptThread] closing listening socket: 9  
Sat Apr 13 16:41:29.416 [interruptThread] closing listening socket: 10
Sat Apr 13 16:41:29.416 [interruptThread] closing listening socket: 11
Sat Apr 13 16:41:29.416 [interruptThread] removing socket file: /tmp/mongodb-27017.sock
Sat Apr 13 16:41:29.417 [interruptThread] shutdown: going to flush diaglog...
Sat Apr 13 16:41:29.417 [interruptThread] shutdown: going to close sockets...
Sat Apr 13 16:41:29.417 [interruptThread] shutdown: waiting for fs preallocator...
Sat Apr 13 16:41:29.417 [interruptThread] shutdown: lock for final commit...
Sat Apr 13 16:41:29.417 [interruptThread] shutdown: final commit...
Sat Apr 13 16:41:29.432 [interruptThread] shutdown: closing all files...
Sat Apr 13 16:41:29.442 [interruptThread] closeAllFiles() finished
Sat Apr 13 16:41:29.442 [interruptThread] journalCleanup...
Sat Apr 13 16:41:29.442 [interruptThread] removeJournalFiles
Sat Apr 13 16:41:29.442 [interruptThread] shutdown: removing fs lock...
Sat Apr 13 16:41:29.442 dbexit: really exiting now

我试过谷歌,但没有运气。有人知道吗?

4

3 回答 3

0

使用 brew 安装 mongodb 并输入命令 mongod 后,我遇到了相同的错误和相同的日志。我把终端打开了。我打开了另一个终端窗口,并输入了命令 mongo,我现在在 mongodb 命令行上。我还可以看到 mongodb 在以下 url 上的浏览​​器中运行:http://localhost:28017/ 因为它工作我现在留下了错误,我稍后会尝试找到答案。希望它会帮助你。

于 2013-04-15T13:11:12.943 回答
0

使用来自 http://hunterford.me/mongodb-startup-item/ 的启动文件后,我遇到了这个问题。我不知道这是否是您描述的错误的唯一可能原因,但在我的情况下。

错误的原因似乎是在启动文件中有段:

<string>/usr/local/bin/mongod</string>

这可能是也可能不是 mongod 实际安装的位置。我使用 macports 安装了 mongo,所以我发现 mongod 在 opt/local/bin - YMMV

一旦我将启动项中的目录值更改为正确的值,我就不再遇到这个问题,尽管我的“软 rlimits 太低”还有其他问题,存在解决方案,但因为您使用的是 mac os x for mongo,我怀疑你正在开发/演示,所以这可能不会成为问题。

我希望这有帮助。

于 2013-09-12T14:26:04.730 回答
0

您使用的是什么 mongodb 版本?

您发布的日志语句没有显示有关错误的任何信息,您可以尝试再次重现并发送详细日志吗?

您是否尝试重新安装或从其他来源安装?

问候, 莫西

于 2013-04-23T22:38:07.037 回答