2
我正在使用AWS和EC2和EBS。该系统确实工作并添加了安装的EBS驱动器。然后我将驱动器映射到/ data并在更改mongod.conf之前添加/ data/db以获取新的数据文件夹。现在mongo不会启动。当我从ubuntu命令行输入mongo时,我得到以下信息。无法连接到Mongo db
2015-04-14T10:49:21.292+0000 W NETWORK Failed to connect to
127.0.0.1:27017, reason: errno:111 Connection refused
2015-04-14T10:49:21.294+0000 E QUERY Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed
at connect (src/mongo/shell/mongo.js:179:14)
at (connect):1:6 at src/mongo/shell/mongo.js:179
exception: connect failed
如果我使用的mongod尝试和得到的东西运行,它只是挂起如下:
2015-04-14T10:57:14.147+0000 I JOURNAL [initandlisten] journal dir=/data/db/journal
2015-04-14T10:57:14.148+0000 I JOURNAL [initandlisten] recover : no journal files present, no recovery needed
2015-04-14T10:57:14.153+0000 I JOURNAL [durability] Durability thread started
2015-04-14T10:57:14.153+0000 I JOURNAL [journal writer] Journal writer thread started
2015-04-14T10:57:14.156+0000 I CONTROL [initandlisten] MongoDB starting : pid=1977 port=27017 dbpath=/data/db 64-bit host=ip-10-167-179-237
2015-04-14T10:57:14.156+0000 I CONTROL [initandlisten]
2015-04-14T10:57:14.156+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2015-04-14T10:57:14.156+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2015-04-14T10:57:14.156+0000 I CONTROL [initandlisten]
2015-04-14T10:57:14.156+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2015-04-14T10:57:14.156+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never'
2015-04-14T10:57:14.156+0000 I CONTROL [initandlisten]
2015-04-14T10:57:14.156+0000 I CONTROL [initandlisten] db version v3.0.1
2015-04-14T10:57:14.156+0000 I CONTROL [initandlisten] git version: 534b5a3f9d10f00cd27737fbcd951032248b5952
2015-04-14T10:57:14.156+0000 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.0.1f 6 Jan 2014
2015-04-14T10:57:14.156+0000 I CONTROL [initandlisten] build info: Linux ip-10-167-176-91 3.13.0-24-generiC#46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 BOOST_LIB_VERSION=1_49
2015-04-14T10:57:14.156+0000 I CONTROL [initandlisten] allocator: tcmalloc
2015-04-14T10:57:14.156+0000 I CONTROL [initandlisten] options: {}
2015-04-14T10:57:14.198+0000 I NETWORK [initandlisten] waiting for connections on port 27017
我试图消除mongod.lock文件,它只是返回。日志似乎根本没有新条目。系统在更改conf之前确实有效,这是通过添加/数据和新的EBS的唯一改变。我有最新版本的mongo和ubuntu。
这确实有效,当我重新启动EC2时,旧的错误返回并且上述现在不起作用。 –