listDatabases failed:{ "errmsg" : "need to login", "ok" : 0 }
[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
}
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26230597/viewspace-1102478/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- FAILED_LOGIN_ATTEMPTSAI
- Oracle FAILED_LOGIN_ATTEMPTS 理解OracleAI
- SEC_MAX_FAILED_LOGIN_ATTEMPTS 用途AI
- About login/failed_user_auto_unlock work or notAI
- LOGIN:ERROR-Failed to initialize policy manager(轉)ErrorAI
- sqlserver 2008 login failed: error 18456SQLServerAIError
- Opiino: Attach Failed! Error=-1 Ifvp=0AIError
- sqlplus login -- SP2-0750: You may need to set ORACLE_HOME to your Oracle software directorySQLOracle
- Oracle OCP 1Z0 053 Q347( report need backup)Oracle
- Failed to run 'create login' or 'sp_addsrvrolemeber' in sql Linux using windows authentcationAIVRSQLLinuxWindows
- MongoDB:"errmsg" : "DBClientBase::findN: transport error:MongoDBclientError
- Oracle OCP 1Z0-053 Q510(RMAN REPORT NEED BACKUP)Oracle
- @EXPORT and @EXPORT_OKExport
- Do we need HACMP?ACM
- ORA-04098: trigger 'SYS.TR_LOGIN' is invalid and failed re-validationAI
- OK Log設計思路
- Need to set ‘serverTimezone‘ propertyServer
- login.sqlSQL
- 解決sphinx connection to 127.0.0.1:9312 failed (errno=0, msg=)127.0.0.1AI
- _gcry_ath_mutex_lock: Assertion `*lock == ((ath_mutex_t) 0)' failed.GCMutexAI
- 記錄Windows failed fast startup with error status 0xC00000D4.WindowsAIASTError
- linux命令loginLinux
- Oracle login.sqlOracleSQL
- REMOTE_LOGIN_PASSWORDFILEREM
- REMOTE_LOGIN_PASSWORDREM
- MSSQL Server Login and DBUserSQLServer
- ssh到圖形介面時報:X11 forwarding request failed on channel 0ForwardAI
- 購物車(OK HTTP方法請求)HTTP
- [譯] You Might Not Need ES6
- 理解BERT Transformer:Attention is not all you need!ORM
- 目標檢測:Segmentation is All You Need ?Segmentation
- No need to set a listener password in ORACLE 10GOracle 10g
- tensorflow.python.framework.errors_impl.InvalidArgumentError: assertion failed: [0] [Op:Assert] namePythonFrameworkErrorAI
- Linux BRIDGED 模式下的Determining IP information for eth0...failedLinux模式ORMAI
- 【微信小程式】“errMsg“:“navigateTo:fail can not navigateTo a tabbar page“微信小程式AItabBar
- Clear Windows XP login passwordWindows
- REMOTE_LOGIN_PASSWORDFILE[zt]REM
- iSQL/PLUS DBA Login ScreenSQL