2017-04-17 70 views
0

因此,我已經在Ubuntu上安裝了MongoDB Community Edition,遵循here提供的說明。Ubuntu更改mongoDB的位置導致連接失敗(操作不允許)

我成功測試了我的連接,首先啓動該服務,然後使用任何客戶端進行連接。 (robomongo和umongo)。

現在由於我的工作類型,我將存儲GB文件到我的機器。因此我需要改變mongoDB的位置。因此,我採取了以下步驟:(提到here以及):

步驟1: 打開mongod.conf\etc

步驟2

編輯路徑deired之一。我的新路徑如下

dbPath: /home/shouman/mongodb

步驟3:複製從舊路徑到新的路徑數據

步驟4:更新新目錄權限遞歸777

現在我似乎無法啓動mongoDB之後。我查了日誌文件,在/var/log/mongodb/mongod.lod而且似乎如下面提到

/home/shouman/mongodb/WiredTiger.wt

現在你可以看到從

  1. MongoDB的幾點注意事項現在看到的新位置是一個權限問題。 (這也創造了兩個鎖文件)
  2. 我檢查的許可此特定的文件,它似乎確定(檢查在結尾處的畫面)
  3. 我試圖重新啓動的MongoDB,但仍同樣的問題

這裏全日誌輸出

2017-04-17T18:19:59.466+0300 I CONTROL [main] ***** SERVER RESTARTED ***** 
2017-04-17T18:19:59.471+0300 I CONTROL [initandlisten] MongoDB starting : pid=3374 port=27017 dbpath=/home/shouman/mongodb 64-bit host=shouman-Lenovo-IdeaPad-Y500 
2017-04-17T18:19:59.471+0300 I CONTROL [initandlisten] db version v3.4.3 
2017-04-17T18:19:59.471+0300 I CONTROL [initandlisten] git version: f07437fb5a6cca07c10bafa78365456eb1d6d5e1 
2017-04-17T18:19:59.471+0300 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.2g 1 Mar 2016 
2017-04-17T18:19:59.471+0300 I CONTROL [initandlisten] allocator: tcmalloc 
2017-04-17T18:19:59.471+0300 I CONTROL [initandlisten] modules: none 
2017-04-17T18:19:59.471+0300 I CONTROL [initandlisten] build environment: 
2017-04-17T18:19:59.471+0300 I CONTROL [initandlisten]  distmod: ubuntu1604 
2017-04-17T18:19:59.471+0300 I CONTROL [initandlisten]  distarch: x86_64 
2017-04-17T18:19:59.471+0300 I CONTROL [initandlisten]  target_arch: x86_64 
2017-04-17T18:19:59.471+0300 I CONTROL [initandlisten] options: { config: "/etc/mongod.conf", net: { bindIp: "127.0.0.1", port: 27017 }, storage: { dbPath: "/home/shouman/mongodb", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongod.log", quiet: true } } 
2017-04-17T18:19:59.503+0300 I -  [initandlisten] Detected data files in /home/shouman/mongodb created by the 'wiredTiger' storage engine, so setting the active storage engine to 'wiredTiger'. 
2017-04-17T18:19:59.503+0300 I STORAGE [initandlisten] 
2017-04-17T18:19:59.503+0300 I STORAGE [initandlisten] ** WARNING: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine 
2017-04-17T18:19:59.503+0300 I STORAGE [initandlisten] **   See http://dochub.mongodb.org/core/prodnotes-filesystem 
2017-04-17T18:19:59.503+0300 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=3454M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0), 
2017-04-17T18:19:59.507+0300 E STORAGE [initandlisten] WiredTiger error (1) [1492442399:507878][3374:0x7f5379b49cc0], file:WiredTiger.wt, connection: /home/shouman/mongodb/WiredTiger.wt: handle-open: open: Operation not permitted 
2017-04-17T18:19:59.508+0300 I -  [initandlisten] Assertion: 28595:1: Operation not permitted src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp 267 
2017-04-17T18:19:59.508+0300 I STORAGE [initandlisten] exception in initAndListen: 28595 1: Operation not permitted, terminating 
2017-04-17T18:19:59.508+0300 I NETWORK [initandlisten] shutdown: going to close listening sockets... 
2017-04-17T18:19:59.508+0300 I NETWORK [initandlisten] removing socket file: /tmp/mongodb-27017.sock 
2017-04-17T18:19:59.508+0300 I NETWORK [initandlisten] shutdown: going to flush diaglog... 
2017-04-17T18:19:59.508+0300 I CONTROL [initandlisten] now exiting 
2017-04-17T18:19:59.508+0300 I CONTROL [initandlisten] shutting down with code:100 

WireTiger.wt Permissions

回答

相關問題