gpt4 book ai didi

mongodb - 连接到 mongoHQ shell 的 JavaScript 执行失败

转载 作者:IT老高 更新时间:2023-10-28 13:09:13 26 4
gpt4 key购买 nike

尝试直接访问 MongoHQ:

> mongo mongodb://heroku:mypassword@alex.mongohq.com:10046/myapp
MongoDB shell version: 2.4.3
connecting to: mongodb://heroku:mypassword@alex.mongohq.com:10046/myapp
Tue Jun 4 16:10:09.255 Assertion failure _setName.size() src/mongo/client/dbclientinterface.h 211
0x10017116b 0x100135396 0x100068356 0x100129bab 0x10010f92f 0x10024b2fa 0x139ba3a06362 0x139ba3a0ce93 0x139ba3a400c9 0x139ba3a0c76e
0 mongo 0x000000010017116b _ZN5mongo15printStackTraceERSo + 43
1 mongo 0x0000000100135396 _ZN5mongo12verifyFailedEPKcS1_j + 310
2 mongo 0x0000000100068356 _ZN5mongo16ConnectionString5parseERKSsRSs + 1878
3 mongo 0x0000000100129bab _ZN5mongo17mongoConsExternalEPNS_7V8ScopeERKN2v89ArgumentsE + 187
4 mongo 0x000000010010f92f _ZN5mongo7V8Scope10v8CallbackERKN2v89ArgumentsE + 175
5 mongo 0x000000010024b2fa _ZN2v88internalL30Builtin_HandleApiCallConstructENS0_12_GLOBAL__N_116BuiltinArgumentsILNS0_21BuiltinExtraArgumentsE1EEEPNS0_7IsolateE + 618
6 ??? 0x0000139ba3a06362 0x0 + 21559186056034
7 ??? 0x0000139ba3a0ce93 0x0 + 21559186083475
8 ??? 0x0000139ba3a400c9 0x0 + 21559186292937
9 ??? 0x0000139ba3a0c76e 0x0 + 21559186081646
Tue Jun 4 16:10:09.264 JavaScript execution failed: Error: assertion src/mongo/client/dbclientinterface.h:211 at src/mongo/shell/mongo.js:L114
exception: connect failed

要做什么?

最佳答案

这是一个 shell 错误,并不是一个新错误。基本上,mongo shell 不接受与常规 mongodb 驱动程序相同的连接字符串格式。我可以在当前和以前的版本中重现此错误,并且此语法预计不会起作用(尽管它可能也不应该崩溃,但外壳程序已经存在一个错误以接受标准连接字符串:jira.mongodb.org/browse/SERVER-3254

同时您可以使用 mongo shell 选项进行连接,例如

mongo -u <user> -p <passwd> hostIP:port/db 

mongo --host host --port port [ other options ] db

关于mongodb - 连接到 mongoHQ shell 的 JavaScript 执行失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16929040/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com