Mongodb状态显示失败,即使它正常运行

时间:2018-01-21 10:06:41

标签: mongodb ubuntu-16.04 daemon

我已经在ubuntu 16.04上将mongodb从v3.4升级到v3.6。

我可以使用mongo shell或使用robomongo访问数据库。

但是当我尝试显示mongod的状态时,它会显示:var spreadsheetId = "### spreadsheet ID ###"; var sheetName = "### sheet name ###"; // Open a form by ID and log the responses to each question. var form = FormApp.openById('1234567890abcdefghijklmnopqrstuvwxyz'); var formResponses = form.getResponses(); var result = []; // Added for (var i = 0; i < formResponses.length; i++) { var formResponse = formResponses[i]; var itemResponses = formResponse.getItemResponses(); for (var j = 0; j < itemResponses.length; j++) { var itemResponse = itemResponses[j]; Logger.log('Response #%s to the question "%s" was "%s"', (i + 1).toString(), itemResponse.getItem().getTitle(), itemResponse.getResponse()); result.push([(i + 1).toString(), itemResponse.getItem().getTitle(), itemResponse.getResponse()]); // Added } } // var sheet = SpreadsheetApp.getActiveSheet(); // If you use this script as a bound script of Spreadsheet, you can use this. var sheet = SpreadsheetApp.openById(spreadsheetId).getSheetByName(sheetName); // Added sheet.getRange(sheet.getLastRow() + 1, 1, result.length, result[0].length).setValues(result) // Added

两者:

failed

sudo service mongod status

enter image description here

1 个答案:

答案 0 :(得分:1)

我已卸载与mongodb相关的所有文件并重新安装。

之后我运行sudo systemctl enable mongod

现在有效!