electerious/Ackee

Error when using MongoDB URL with replicas

開放

#310 建立於 2022年1月12日

 (2 則留言) (0 個反應) (0 位負責人)JavaScript (386 個分叉)github user discovery
bughelp wanted

倉庫指標

星標
 (4,692 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

🐞 Describe the bug

i'm using my default connection to my replicated instance of mongo db. The url is:

mongodb://USERNAME:PASSWORD@MONGO1_URL:27017,MONGO2_URL:27017,MONGO3_URL:27017/ackee?authSource=admin&authMechanism=SCRAM-SHA-1

with MONGO1_URL, MONGO2_URL, MONGO3_URL fql names of the mongodb servers (that is currently used from many apps as mongodb uri),

but when the container start, it crash with:

TypeError [ERR_INVALID_URL]: Invalid URL: ........

and the error shows the desidered uri

it seems a valid url, accepted from mongodb spec, what is wrong? it seems an issue

the mongodb spec is:

mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[defaultauthdb][?options]]

貢獻者指南