【发布时间】:2015-04-19 21:30:23
【问题描述】:
在尝试运行命令时
mongod --fork --logpath /var/log/mongodb.log
在 amazon ec2 32 位实例(Amazon Linux AMI 版本 2014.09)上,我遇到以下错误:
2015-02-18T18:14:09.007+0000
2015-02-18T18:14:09.007+0000 warning: 32-bit servers don't have journaling
enabled by default. Please use --journal if you want durability.
2015-02-18T18:14:09.007+0000
about to fork child process, waiting until server is ready for connections.
forked process: 17116
ERROR: child process failed, exited with error number 1
我还注意到在此过程中没有创建日志文件。
【问题讨论】:
-
/data/db存在吗?错误号 1:#define EPERM 1 /* Operation not permitted */。这也可以解释为什么没有创建日志文件 - 不允许用户创建。 -
确实如此,我也有一些我一直在使用的数据库文件。
-
@mnemosyn ls -al total 245772 drwxr-xr-x 2 ec2-user root 4096 Feb 5 17:14 . drwxr-xr-x 3 root root 4096 Feb 4 17:40 .. -rw------- 1 ec2-user ec2-user 67108864 Feb 5 21:42 brands.0 -rw------- 1 ec2-user ec2-user 16777216 Feb 5 21:42 brands.ns -rw------- 1 ec2-user ec2-user 67108864 Feb 4 22:54 brandsTest2.0 -rw------- 1 ec2-user ec2-user 16777216 Feb 4 22:54 brandsTest2.ns -rw------- 1 ec2-user ec2-user 67108864 Feb 18 17:52 local.0 -rw------- 1 ec2-user ec2-user 16777216 Feb 18 17:52 local.ns -rwxrwxr-x 1 ec2-user ec2-user 0 Feb 18 17:59 mongod.lock -
嗯,那么我的猜测似乎是错误的。我仍然会调查 errno 1 路线...
-
@mnemosyn 你在哪里找到错误代码?我在看https://github.com/mongodb/mongo/blob/master/docs/errors.md,但看不到。
标签: mongodb unix amazon-ec2