MongoDB无法正常关闭
2017-01-07 20:24
141 查看
我的MongoDBshi 2.6.6版本,安装的操作系统是Win7系统32位。
执行的操作:
C:\Program Files\MongoDB 2.6 Standard\bin>mongo 192.168.10.188:27017/test
故障码如下:
Server has startup warnings:
2017-01-07T11:34:42.203+0800 [initandlisten]
2017-01-07T11:34:42.203+0800 [initandlisten] ** NOTE: This is a 32 bit MongoDB b
inary.
2017-01-07T11:34:42.203+0800 [initandlisten] ** 32 bit builds are limited
to less than 2GB of data (or less with --journal).
2017-01-07T11:34:42.204+0800 [initandlisten] ** Note that journaling defau
lts to off for 32 bit and is currently off.
2017-01-07T11:34:42.204+0800 [initandlisten] ** See http://dochub.mongodb. org/core/32bit
2017-01-07T11:34:42.204+0800 [initandlisten]
> use admin
switched to db admin
> db.shutdownServer()
assert failed : unexpected error: "shutdownServer failed: shutdown must run from
localhost when running db without auth"
Error: assert failed : unexpected error: "shutdownServer failed: shutdown must r
un from localhost when running db without auth"
at Error (<anonymous>)
at doassert (src/mongo/shell/assert.js:11:14)
at assert (src/mongo/shell/assert.js:20:5)
at DB.shutdownServer (src/mongo/shell/db.js:171:9)
at (shell):1:4
2017-01-07T11:42:52.209+0800 Error: assert failed : unexpected error: "shutdownS
erver failed: shutdown must run from localhost when running db without auth" at
src/mongo/shell/assert.js:13
解决办法:
C:\Program Files\MongoDB 2.6 Standard\bin>mongo --port 27017
运行结果:
MongoDB shell version: 2.6.6
connecting to: 127.0.0.1:27017/test
Server has startup warnings:
2017-01-07T11:34:42.203+0800 [initandlisten]
2017-01-07T11:34:42.203+0800 [initandlisten] ** NOTE: This is a 32 bit MongoDB b
inary.
2017-01-07T11:34:42.203+0800 [initandlisten] ** 32 bit builds are limited
to less than 2GB of data (or less with --journal).
2017-01-07T11:34:42.204+0800 [initandlisten] ** Note that journaling defau
lts to off for 32 bit and is currently off.
2017-01-07T11:34:42.204+0800 [initandlisten] ** See http://dochub.mongodb. org/core/32bit
2017-01-07T11:34:42.204+0800 [initandlisten]
> use admin
switched to db admin
> db.shutdownServer()
2017-01-07T11:54:55.198+0800 DBClientCursor::init call() failed
server should be down...
2017-01-07T11:54:55.215+0800 trying reconnect to 127.0.0.1:27017 (127.0.0.1) fai
led
2017-01-07T11:54:56.258+0800 warning: Failed to connect to 127.0.0.1:27017, reas
on: errno:10061 由于目标计算机积极拒绝,无法连接。
2017-01-07T11:54:56.259+0800 reconnect 127.0.0.1:27017 (127.0.0.1) failed failed
couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt fail
ed
可以看到,此时MongoDB服务器可以正常关闭了。
出现这种情况的原因就是IP地址为192.168.10.188的主机找不到,其实MongoDB中是不推荐采用IP地址定位主机的,否则有可能出现意想不到的问题。
执行的操作:
C:\Program Files\MongoDB 2.6 Standard\bin>mongo 192.168.10.188:27017/test
故障码如下:
Server has startup warnings:
2017-01-07T11:34:42.203+0800 [initandlisten]
2017-01-07T11:34:42.203+0800 [initandlisten] ** NOTE: This is a 32 bit MongoDB b
inary.
2017-01-07T11:34:42.203+0800 [initandlisten] ** 32 bit builds are limited
to less than 2GB of data (or less with --journal).
2017-01-07T11:34:42.204+0800 [initandlisten] ** Note that journaling defau
lts to off for 32 bit and is currently off.
2017-01-07T11:34:42.204+0800 [initandlisten] ** See http://dochub.mongodb. org/core/32bit
2017-01-07T11:34:42.204+0800 [initandlisten]
> use admin
switched to db admin
> db.shutdownServer()
assert failed : unexpected error: "shutdownServer failed: shutdown must run from
localhost when running db without auth"
Error: assert failed : unexpected error: "shutdownServer failed: shutdown must r
un from localhost when running db without auth"
at Error (<anonymous>)
at doassert (src/mongo/shell/assert.js:11:14)
at assert (src/mongo/shell/assert.js:20:5)
at DB.shutdownServer (src/mongo/shell/db.js:171:9)
at (shell):1:4
2017-01-07T11:42:52.209+0800 Error: assert failed : unexpected error: "shutdownS
erver failed: shutdown must run from localhost when running db without auth" at
src/mongo/shell/assert.js:13
解决办法:
C:\Program Files\MongoDB 2.6 Standard\bin>mongo --port 27017
运行结果:
MongoDB shell version: 2.6.6
connecting to: 127.0.0.1:27017/test
Server has startup warnings:
2017-01-07T11:34:42.203+0800 [initandlisten]
2017-01-07T11:34:42.203+0800 [initandlisten] ** NOTE: This is a 32 bit MongoDB b
inary.
2017-01-07T11:34:42.203+0800 [initandlisten] ** 32 bit builds are limited
to less than 2GB of data (or less with --journal).
2017-01-07T11:34:42.204+0800 [initandlisten] ** Note that journaling defau
lts to off for 32 bit and is currently off.
2017-01-07T11:34:42.204+0800 [initandlisten] ** See http://dochub.mongodb. org/core/32bit
2017-01-07T11:34:42.204+0800 [initandlisten]
> use admin
switched to db admin
> db.shutdownServer()
2017-01-07T11:54:55.198+0800 DBClientCursor::init call() failed
server should be down...
2017-01-07T11:54:55.215+0800 trying reconnect to 127.0.0.1:27017 (127.0.0.1) fai
led
2017-01-07T11:54:56.258+0800 warning: Failed to connect to 127.0.0.1:27017, reas
on: errno:10061 由于目标计算机积极拒绝,无法连接。
2017-01-07T11:54:56.259+0800 reconnect 127.0.0.1:27017 (127.0.0.1) failed failed
couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt fail
ed
可以看到,此时MongoDB服务器可以正常关闭了。
出现这种情况的原因就是IP地址为192.168.10.188的主机找不到,其实MongoDB中是不推荐采用IP地址定位主机的,否则有可能出现意想不到的问题。
相关文章推荐
- mongodb 关闭无法正常启动, use --journal
- vs2013+NetCDF开发出现“应用程序无法正常启动(0xc000007b)。请单击“确定”关闭应用程序”
- Tomcat无法正常关闭
- oracle 异常关闭操作 导致数据库无法正常关闭 也无法启动
- “应用程序无法正常启动(0xc000007b)。请单击“确定”关闭应用程序。”
- mongodb自动关闭:页面太小,无法完成操作
- MongoDB:如何正常关闭服务(转)
- mongodb 应用程序无法正常启动(0xc000007b)
- Hadoop之——正常启动而无法正常关闭
- 数据库无法正常关闭的处理步骤
- 无法通过工作流正常关闭的销售订单问题解决
- Tomcat无法正常关闭
- ORA-01089 数据库无法正常关闭
- PHPWAMP出现“应用程序无法正常启动(0xc0000135)。请单击“确定”关闭应用程序”的解决方案
- mongodb无法正常启动
- oracle 异常关闭造成 -重启服务仍无法正常连接 -windows处理
- 应用程序无法正常启动(0xc0000013),请单击确定关闭应用程序。
- 应用程序无法正常启动(0xc000007b)。请单击“确定”关闭应用程序 解决
- mongoDB非正常关闭后无法启动问题
- 关于“应用程序无法正常启动(0xc000007b)。请单击“确定”关闭应用程序。”