Egg project connection mongoose copy set (Replica Set) connection

problem description
egg project uses mongoose mongoose to report error failed to connect to server,

PRIMARY:hostA, master node
SECONDARY:hostB, hostC; slave node
one master and two slaves, both ports are 27017

copy set set:rs0

Url: "mongodb:// account I wrote: password @ hostA:27017,hostB:27017,hostC:27017/dataBase?replicaSet=rs0"
options: {} empty without configuration

the connection is not available. Ask the gods to specify

.
Mar.12,2022

try authSouce=admin with a parameter

Menu