我的Mac上的MongoDB突然无法启动。这些是消息:
2016-10-24T11:13:04.080-0500 I CONTROL [initandlisten] MongoDB starting : pid=365 port=27017 dbpath=/Users/user1/mongodb/data/db 64-bit host=Mac1.attlocal.net
2016-10-24T11:13:04.081-0500 I CONTROL [initandlisten] db version v3.2.6
2016-10-24T11:13:04.081-0500 I CONTROL [initandlisten] git version: 05552b562c7a0b3143a729aaa0838e558dc49b25
2016-10-24T11:13:04.081-0500 I CONTROL [initandlisten] allocator: system
2016-10-24T11:13:04.081-0500 I CONTROL [initandlisten] modules: none
2016-10-24T11:13:04.081-0500 I CONTROL [initandlisten] build environment:
2016-10-24T11:13:04.081-0500 I CONTROL [initandlisten] distarch: x86_64
2016-10-24T11:13:04.081-0500 I CONTROL [initandlisten] target_arch: x86_64
2016-10-24T11:13:04.081-0500 I CONTROL [initandlisten] options: { config: "mongod.conf", storage: { dbPath: "/Users/user1/mongodb/data/db" } }
2016-10-24T11:13:04.082-0500 E NETWORK [initandlisten] listen(): bind() failed errno:1 Operation not permitted for socket: /tmp/mongodb-27017.sock
2016-10-24T11:13:04.082-0500 E STORAGE [initandlisten] Failed to set up sockets during startup.
2016-10-24T11:13:04.083-0500 I CONTROL [initandlisten] dbexit: rc: 48
我试过了:
Mac1:mongodb user1$ ls -ld /tmp
lrwxr-xr-x@ 1 root wheel 11 Feb 23 2016 /tmp -> private/tmp
任何建议?
答案 0 :(得分:0)
正如当天早些时候发现的那样,我的机器为OS X El Capitan 2016-002自动更新了安全性。此更新将/ tmp label和/ private / tmp文件夹的标志更改为“restricted”。因此,在该位置无法创建任何内容(请参阅上面的评论)。
解决此问题:
这解决了我的问题。