2016-03-04 120 views
0

我不能在我的ubuntu機器上運行mongod。我看了一些博客和計算器線程建議改變/var/lib/mongodb/var/log/mongodb文件夾的所有權,Mongod未啓動

sudo chown -R mongodb:mongodb /var/lib/mongodb 
sudo chown -R mongodb:mongodb /var/log/mongodb 

,但我仍然無法運行的mongod並得到以下錯誤消息。

[email protected]:~$ mongod 
2016-03-04T09:31:29.942+0530 I CONTROL [initandlisten] MongoDB starting : pid=3211 port=27017 dbpath=/data/db 64-bit host=vinayak-Lenovo-G500 
2016-03-04T09:31:29.942+0530 I CONTROL [initandlisten] db version v3.2.3 
2016-03-04T09:31:29.942+0530 I CONTROL [initandlisten] git version: b326ba837cf6f49d65c2f85e1b70f6f31ece7937 
2016-03-04T09:31:29.942+0530 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1f 6 Jan 2014 
2016-03-04T09:31:29.942+0530 I CONTROL [initandlisten] allocator: tcmalloc 
2016-03-04T09:31:29.942+0530 I CONTROL [initandlisten] modules: none 
2016-03-04T09:31:29.942+0530 I CONTROL [initandlisten] build environment: 
2016-03-04T09:31:29.942+0530 I CONTROL [initandlisten]  distmod: ubuntu1404 
2016-03-04T09:31:29.942+0530 I CONTROL [initandlisten]  distarch: x86_64 
2016-03-04T09:31:29.942+0530 I CONTROL [initandlisten]  target_arch: x86_64 
2016-03-04T09:31:29.942+0530 I CONTROL [initandlisten] options: {} 
2016-03-04T09:31:29.968+0530 E NETWORK [initandlisten] listen(): bind() failed errno:98 Address already in use for socket: 0.0.0.0:27017 
2016-03-04T09:31:29.968+0530 E NETWORK [initandlisten] addr already in use 
2016-03-04T09:31:29.968+0530 E STORAGE [initandlisten] Failed to set up sockets during startup. 
2016-03-04T09:31:29.968+0530 I CONTROL [initandlisten] dbexit: rc: 48 
[email protected]:~$ 

..和我不這麼認爲,我的MongoDB是損壞,因爲它是新安裝的,我還沒有扭捏了什麼東西。

請提出任何解決方案。謝謝。

+1

的可能的複製[無法啓動mongodb本地服務器](http://stackoverflow.com/questions/6478113/unable-to-start-mongodb-local-server) –

回答

0

通過您的堆棧跟蹤錯誤「已在使用的插座地址:0.0.0.0:27017」 你可以嘗試不同的端口上運行 如 的mongod --port 12345

相關問題