uncaught exception: listDatabases failed:{ "errmsg" : "need to login", "ok" : 0 }
来源:互联网 发布:华为网络技术学院 编辑:程序博客网 时间:2024/05/20 06:05
[root@346439-eastore_db3 ~]# /db/mongodb-linux-x86_64-2.0.2/bin/mongo 127.0.0.1:37017
MongoDB shell version: 2.0.2
connecting to: 127.0.0.1:37017/test
> show dbs;
Tue May 7 06:41:53 uncaught exception: listDatabases failed:{ "errmsg" : "need to login", "ok" : 0 }
> exit
bye
[root@346439-eastore_db3 ~]#
[root@346439-eastore_db3 ~]#
[root@346439-eastore_db3 ~]#
[root@346439-eastore_db3 ~]#
[root@346439-eastore_db3 ~]#
[root@346439-eastore_db3 ~]# /db/mongodb-linux-x86_64-2.0.2/bin/mongo 127.0.0.1:37017 -uadmin -pxxxxx
MongoDB shell version: 2.0.2
connecting to: 127.0.0.1:37017/test
Tue May 7 06:42:53 uncaught exception: login failed
exception: login failed
PS:要去连接admin库才行:
[root@346439-eastore_db3 ~]# /db/mongodb-linux-x86_64-2.0.2/bin/mongo 127.0.0.1:37017/admin -uadmin -pxxxx
MongoDB shell version: 2.0.2
connecting to: 127.0.0.1:37017/admin
PRIMARY> rs.status();
"set" : "sso-rest",
"date" : ISODate("2013-05-07T06:43:21Z"),
"myState" : 1,
"members" : [
{
"_id" : 0,
"name" : "xxxxx:37017",
"health" : 1,
"state" : 1,
"stateStr" : "PRIMARY",
"optime" : {
"t" : 1367909001000,
"i" : 37
},
"optimeDate" : ISODate("2013-05-07T06:43:21Z"),
"self" : true
},
{
"_id" : 1,
"name" : "xxxxx:37018",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 1113625,
"optime" : {
"t" : 1367909000000,
"i" : 10
},
"optimeDate" : ISODate("2013-05-07T06:43:20Z"),
"lastHeartbeat" : ISODate("2013-05-07T06:43:20Z"),
"pingMs" : 0
},
{
"_id" : 2,
"name" : "xxxxx:37017",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 268349,
"optime" : {
"t" : 1367908999000,
"i" : 32
},
"optimeDate" : ISODate("2013-05-07T06:43:19Z"),
"lastHeartbeat" : ISODate("2013-05-07T06:43:20Z"),
"pingMs" : 0
},
{
"_id" : 3,
"name" : "xxxxxx:37018",
"health" : 1,
"state" : 2,
"stateStr" : "SECONDARY",
"uptime" : 1113567,
"optime" : {
"t" : 1367908999000,
"i" : 19
},
"optimeDate" : ISODate("2013-05-07T06:43:19Z"),
"lastHeartbeat" : ISODate("2013-05-07T06:43:20Z"),
"pingMs" : 0
},
{
"_id" : 4,
"name" : "xxxxx:37019",
"health" : 1,
"state" : 7,
"stateStr" : "ARBITER",
"uptime" : 1113627,
"optime" : {
"t" : 0,
"i" : 0
},
"optimeDate" : ISODate("1970-01-01T00:00:00Z"),
"lastHeartbeat" : ISODate("2013-05-07T06:43:21Z"),
"pingMs" : 0
}
],
"ok" : 1
}
- uncaught exception: listDatabases failed:{ "errmsg" : "need to login", "ok" : 0 }
- rs.initiate(config); {"ok" : 0, "errmsg" : "couldn't initiate : need all members up to initiate, not
- Uncaught handler: thread main exiting due to uncaught exception
- Terminating app due to uncaught exception 'UIApplicationInvalidInterfaceOrientation'
- Terminating app due to uncaught exception 'NSUnknownKeyException'
- Terminating app due to uncaught exception 'NSUnknownKeyException'
- Terminating app due to uncaught exception 'NSUnknownKeyException'
- Terminating app due to uncaught exception 'NSInternalInconsistency
- telnet localhost to login guest domain failed.
- slim错误"failed to execute login command"
- Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<ViewController 0x19862
- *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<DataModel 0x7fe44b
- Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x687
- iOS8.0以上出错Terminating app due to uncaught exception \'NSInvalidArgumentException\', reason: \'Invalid Region\'
- Terminating app due to uncaught exception 'NSUnknownKeyException' reason: '[<ViewController 0x19862
- xib:*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<NSObject 0x1
- Uncaught TypeError: Failed to execute 'removeChild' on 'Node': 1 argument required, but only 0 prese
- uncaught exception: Access to restricted URI denied (NS_ERROR_DOM_BAD_URI)
- floyd详解
- Android中RelativeLayout各个属性的含义
- 高性能网络I/O框架-netmap源码分析(4)
- 杭电2176
- 黑马程序员---Thread类总结
- uncaught exception: listDatabases failed:{ "errmsg" : "need to login", "ok" : 0 }
- Linux菜鸟-iconv
- 直接拿来用!最火的Android开源项目(一)
- hdu 1045 dfs 二分匹配
- RSync的配置与使用
- JavaScript中的事件流(IE与Firefox)
- ts打包代码详解 (ffmpeg)
- c++高级---c语言中关于运算符优先级和运算符集合顺序的理解(*p++和*++p的区别)
- 还是级联删除的问题!