Helm Rocket.Chat:/app/bundle/programs/server/node_modules/fibers/future.js 出错

Helm Rocket.Chat: Error in /app/bundle/programs/server/node_modules/fibers/future.js

我刚刚在 AWS 中创建了一个 kubernetes 集群。我想做的是为每个客户创建 Rocket.Chat 的多个部署(每个客户都需要自己的服务器)。我正在使用 helm 部署 Rocket.Chat(使用官方图表)。当我进行第一次部署时,我能够将其端口转发到本地主机并正常查看 Rocket.Chat 服务器。但是,当我进行第二次部署时,pods 进入 crashloopbackoff 状态。即使删除所有部署并尝试从头开始,我仍然会遇到相同的错误。我得到的错误是:

/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 持久卷保留在原地并且删除它们似乎需要很长时间(我总是取消删除,所以我不确定他们是否能够做到)。我猜测持久卷仍然存在的事实是 "starting from scratch" 在我已经部署后不起作用的原因。无论如何,有没有人在类似的情况下看到过这些错误?你做了什么来修复它?

问题在于在 rocket chat 的 helm chart 上生成密码的建议方法。他们告诉你 运行:

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

当我从使用文档建议的 openssl 切换到 pwgen 时,我能够修复此错误。我在文档中推荐的创建密码的方式添加了一些非法字符。这是我 运行 而不是:

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

成功了!