1
我的MongoDB在Mac上突然無法啓動。這些消息:Mac OSX 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
[email protected] 1 root wheel 11 Feb 23 2016 /tmp -> private/tmp
有什麼建議?
它有權限寫在'/ Users/user1/mongodb/data/db'上嗎?這個文件夾是否存在? –
是的,數據庫在那裏。這裏是權限,如果我做ls -ld db:drwxrwxrwx 26 user1 staff 884 Oct 14 16:22 db – user523234
您是否嘗試將mongod作爲「user1」啓動,或者以root身份啓動? – andresk