Helm Rocket.Chat:/app/bundle/programs/server/node_modules/fibers/future.js中的错误

问题描述 投票:0回答:1

我刚刚在AWS中创建了一个kubernetes集群。我正在尝试为每个客户创建多个Rocket.Chat部署(每个客户都需要自己的服务器)。我正在使用头盔部署Rocket.Chat(使用官方图表)。当我进行第一次部署时,我可以将其端口转发到localhost并看到Rocket.Chat服务器就可以了。但是,当我进行第二次部署时,pod进入了崩溃循环回退状态。即使删除所有部署并尝试从头开始,我仍然会遇到相同的错误。我得到的错误是:

/app/bundle/programs/server/node_modules/fibers/future.js:280
                                                throw(ex);
                                                ^

MongoParseError: Unescaped slash in userinfo section
    at parseConnectionString (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/uri_parser.js:538:21)
    at connect (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/operations/mongo_client_ops.js:195:3)
    at connectOp (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/operations/mongo_client_ops.js:284:3)
    at executeOperation (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:416:24)
    at MongoClient.connect (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/mongo_client.js:175:10)
    at Function.MongoClient.connect (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/mongo_client.js:341:22)
    at new MongoConnection (packages/mongo/mongo_driver.js:177:11)
    at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collection_driver.js:4:16)
    at Object.<anonymous> (packages/mongo/remote_collection_driver.js:38:10)
    at Object.defaultRemoteCollectionDriver (packages/underscore.js:784:19)
    at new Collection (packages/mongo/collection.js:97:40)
    at new AccountsCommon (packages/accounts-base/accounts_common.js:23:18)
    at new AccountsServer (packages/accounts-base/accounts_server.js:23:5)
    at packages/accounts-base/server_main.js:7:12
    at server_main.js (packages/accounts-base/server_main.js:19:1)
    at fileEvaluate (packages/modules-runtime.js:336:7)

/app/bundle/programs/server/node_modules/fibers/future.js:313
                                                throw(ex);
                                                ^

MongoNetworkError: failed to connect to server [fc-mongodb:27017] on first connect [MongoError: Authentication failed.]
    at Pool.<anonymous> (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/topologies/server.js:431:11)
    at emitOne (events.js:116:13)
    at Pool.emit (events.js:211:7)
    at connect (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:557:14)
    at callback (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connect.js:109:5)
    at provider.auth.err (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connect.js:352:21)
    at _authenticateSingleConnection (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/auth/auth_provider.js:66:11)
    at sendAuthCommand (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/auth/scram.js:215:18)
    at Connection.messageHandler (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connect.js:334:5)
    at emitTwo (events.js:126:13)
    at Connection.emit (events.js:214:7)
    at processMessage (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connection.js:364:10)
    at Socket.<anonymous> (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/connection.js:533:15)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at addChunk (_stream_readable.js:263:12)

但是,我确实注意到,当我运行helm delete fc时,持久卷仍然存在,并且似乎需要永久删除它们(我一直取消删除,所以我不确定它们是否能够)。我猜测持久卷仍然存在的事实是为什么在我已经部署后“从头开始”不起作用的原因。无论如何,有人在类似情况下见过这些错误吗?您做了什么修复?

node.js mongodb amazon-web-services kubernetes-helm rocket.chat
1个回答
0
投票

问题在于在火箭聊天的头盔图上生成密码的建议方法。他们告诉你跑步:

helm install stable/rocketchat --set mongodb.mongodbPassword=$(echo -n $(openssl rand -base64 32)),mongodb.mongodbRootPassword=$(echo -n $(openssl rand -base64 32))

当我在Yaml文件(如mongodbPassword: qwerty123)中设置自己的密码时,我能够解决此错误。为了获得更像生产的修复程序,我运行了:

helm install <installation-name> stable/rocketchat --set mongodb.mongodbPassword="$(pwgen 20 1)",mongodb.mongodbRootPassword="$(pwgen 20 1)" -f values.yaml

它成功了!

© www.soinside.com 2019 - 2024. All rights reserved.