- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我的问题与本网站上的其他输入和建议类似,但没有一个对我有帮助。安装MongoDB后,由于数据库没有运行,一直没有启动。
首先尝试运行 mongo,我回答了这个问题:
Mac-Pro-de-User: ~ user $ mongo
MongoDB shell version: 2.6.4
connecting to: test
2014-10-28T10: 47: 08713-0700 warning: Failed to connect to 127.0.0.1:27017, reason: errno: 61 Connection refused
2014-10-28T10: 47: 08713-0700 Error: could not connect to server 127.0.0.1:27017 (127.0.0.1) Attempt connection failed at src / mongo / shell / mongo.js: 146
exception: connect failed
然后尝试检查mongod,我回答了这个:
Mac-Pro-de-User: ~ user $ mongod
mongod --help for help and startup options
2014-10-28T10: 59: 34485-0700 [initandlisten] MongoDB starting: pid = 926 port = 27017 dbpath = / data / db host = 64-bit Mac-Pro-de-Ernesto.local
2014-10-28T10: 59: 34485-0700 [initandlisten]
2014-10-28T10: 59: 34485-0700 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, Should be at Least 1000
2014-10-28T10: 59: 34485-0700 [initandlisten] db version v2.6.4
2014-10-28T10: 59: 34485-0700 [initandlisten] git version: 3a830be0eb92d772aa855ebb711ac91d658ee910
2014-10-28T10: 59: 34485-0700 [initandlisten] Build info: Darwin bs-osx108-4 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root: xnu-2050.48.12 ~ 1 / x86_64 RELEASE_X86_64 BOOST_LIB_VERSION = 1_49
2014-10-28T10: 59: 34485-0700 [initandlisten] allocator: system
2014-10-28T10: 59: 34485-0700 [initandlisten] options: {}
2014-10-28T10: 59: 34486-0700 [initandlisten] journal dir = / data / db / journal
2014-10-28T10: 59: 34486-0700 [initandlisten] recover: no journal files present, no recovery needed
2014-10-28T10: 59: 34500-0700 [FileAllocator] allocating new datafile /data/db/local.ns, filling zeroes With ...
2014-10-28T10: 59: 34500-0700 [FileAllocator] creating directory / data / db / _tmp
2014-10-28T10: 59: 34512-0700 [FileAllocator] done allocating datafile /data/db/local.ns, size: 16MB, took 0.011 secs
2014-10-28T10: 59: 34726-0700 [FileAllocator] allocating new datafile /data/db/local.0, filling zeroes With ...
2014-10-28T10: 59: 35398-0700 [FileAllocator] done allocating datafile /data/db/local.0, size: 64MB, took 0.671 secs
2014-10-28T10: 59: 35695-0700 [initandlisten] build index on: local.startup_log properties: {v: 1, key: {_id: 1}, name: "_id_" ns "local.startup_log"}
2014-10-28T10: 59: 35695-0700 [initandlisten] index added to empty collection
2014-10-28T10: 59: 35695-0700 [initandlisten] Local command $ cmd command. Create {create: "startup_log" size: 10485760, capped: true} ntoreturn: 1 KeyUpdates: 0 numYields: 0 reslen: 37 1194ms
2014-10-28T10: 59: 35695-0700 [initandlisten] waiting for connections on port 27017
2014-10-28T11: 00: 34516-0700 [clientcursormon] mem (MB) res: 33 virt: 2653
2014-10-28T11: 00: 34516-0700 [clientcursormon] mapped (incl journal view): 160
2014-10-28T11: 00: 34516-0700 [clientcursormon] connections: 0
然后再次尝试连接并花一些时间,再次说同样的话:
2014-10-28T11: 05: 34589-0700 [clientcursormon] mem (MB) res: 33 virt: 2653
2014-10-28T11: 05: 34589-0700 [clientcursormon] mapped (incl journal view): 160
2014-10-28T11: 05: 34589-0700 [clientcursormon] connections: 0
等等。如果您能提供帮助将不胜感激。
PS: There is already the / data / db with 777 permissions, and I'm using OSX Mavericks 10.9.5
最佳答案
您是否在同一终端中将所有这些命令作为时间戳所建议的单独操作运行? (如果没有,我希望看到故障和日志之间有重叠,以便正确诊断)。
如果是这样,那么你正在做的事情如下:
数据库需要与 shell 同时运行,以便您可以连接到它。因此,您应该在一个终端中启动 mongod
进程,使其保持运行状态,然后打开一个新终端(或选项卡)并运行 mongo
命令以连接到仍在运行的数据库。另一个选项是 run mongod
as a daemon ,这将允许您在返回后在同一终端中运行 mongo
命令。
注意:您永远不应拥有具有 777 权限的文件夹,这不是必需的,并且存在重大安全风险。
关于MongoDB : Failed to connect to 127. 0.0.1 :27017, 原因:errno:61 连接被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26612648/
我只想允许一个国家/地区访问,但排除该国家/地区内的代理。 这就是我所拥有的(为了方便起见,缩短了版本) order deny,allow deny from all allow from 139.
这个问题在这里已经有了答案: What is an unhandled promise rejection? (9 个回答) 关闭 4 年前。 我目前正在尝试实现我自己的 Promise,以便在 A
我在使用 Gitolite 推送 git 时遇到问题。 当我尝试这个时: git push origin :refs/tags/deployment 我收到这个错误: remote: D NAME/i
我已经为我的 laravel 5.0-dev 项目配置了 mysql,如下所示: 'mysql' => [ 'driver' => 'mysql', 'host' =>
我对 Web 和 SOF 进行了一些研究,但发现对于该错误没有任何真正的帮助。 我使用 Windows 10 Ubuntu Bash 安装了 Node 和 Puppeteer,但未能使其工作,但我设法
在我的应用审核期间,我收到了以下信息: “17.2:要求用户共享个人信息(例如电子邮件地址和生日)才能正常运行的应用将被拒绝 具体来说,您的应用仅使用Facebook登录名进行身份验证,但不包括该网站
我正在开发 VeriFone VX 终端的接口(interface)。虽然,这确实是一个普遍的 EMV 问题。我们的处理器的下限为零,因此它将始终在线发送。但是,如果它发生变化,您如何知道(哪些标签)
我编写了一些宏代码,根据表单提交向经理发送电子邮件(用于费用/审批流程),这是我使用谷歌表单/电子表格的第一个项目,所以也许我可能会错过一些简单的东西,但我为此浏览了 2 个教程,我的代码与重要的部分
clang 3.4 接受以下代码;而 vc++ NOV 2013 CTP 拒绝它并出现错误: error C2668: 'AreEqual' : ambiguous call to overloade
使用 nginx,您可以允许和拒绝范围和 ips (https://www.nginx.com/resources/admin-guide/restricting-access/)。使用realip模
官方编辑: 非常感谢您的帮助,但我仍然遇到问题。 我的 ffserver.conf 文件是这样的: # Port on which the server is listening. You must
我有一个问题:我是 Ubuntu 系统的根。我想授予用户(比如用户名是 X)执行任何命令的权限,但同时我有一个文件夹,除了我的用户(当然不是 X,因为它是 Admin ) 或根。有什么建议么?谢谢!
我使用 Apache2.2 作为 tomcat 服务器的前端。我想限制对某个位置的访问,但允许对子位置的所有访问,但遇到了一些麻烦。 我目前拥有的是: AllowOverride None
就像 this person ,我一直在为浏览器缓存 SSL session 而苦苦挣扎。简而言之,如果选择了客户端证书,则无法以编程方式清除状态,除非在 IE 中使用 document.execCo
我的网站是在由 Apache 服务器提供服务的 Angular 上设置的。我通过 View 将内容动态加载到主页上。 现在以下是我的问题: 我建立这个网站的主要目的是通过 google adsense
我最近遇到了我的应用程序的问题,当它突然被 Google Play 拒绝时因为他们发现我使用的是背景位置 .但实际上我并没有使用这个功能。我只有 ACCESS_COARSE_LOCATION和 ACC
function sendPushNotification(subscription, urlEncodedData){ try { webpush.sendNotification(su
我包裹了一个 request-promise-native调用返回 promise 的函数。 import request from 'request-promise-native'; functio
我正在开发我的 meteor 项目,并开始设置我的第一个更复杂的允许/拒绝规则。我发现很难看出哪些允许触发,哪些不允许触发,以及这些函数中的某些变量包含什么。例如: List.allow({ u
我正在 AngularJS 中创建一个 Factory,它是这样的: if (href) { return $http({ method: method, url: item.href });
我是一名优秀的程序员,十分优秀!