How to Configure the mongo.env when install using Mongo replica set with auth

install
docker
(qinhao) #1

I installed mongo replica set in advance, and start with --auth mode.
Then i tried to install stackstorm using the mongo replica set.
I’am confused about the mongo.env configuation.
How to set the MONGO_HOST MONGO_PORT MONGO_DB MONGO_USER MONGO_PASS
can the st2 application success connect to the Mongo

Here is my mongo.env , seems not working
MONGO_HOST=mongo1,mongo2,mongo3/?replicaSet=rs1&authSource=st2
MONGO_PORT=27017
MONGO_DB=st2
MONGO_USER=st2
MONGO_PASS=1qaz2wsx3edc

(qinhao) #2

when look into the st2.auth.log, looks like repeat tring to connect to mongo

2019-03-18 10:23:43,136 140069147527120 INFO init [-] Connecting to database “st2” @ “mongo1,mongo2,mongo3/?replicaSet=rs1&authSource=st2:27017” as user “st2”.
2019-03-18 10:24:13,863 140069147527120 INFO init [-] Connecting to database “st2” @ “mongo1,mongo2,mongo3/?replicaSet=rs1&authSource=st2:27017” as user “st2”.
2019-03-18 10:24:44,481 140069147527120 INFO init [-] Connecting to database “st2” @ “mongo1,mongo2,mongo3/?replicaSet=rs1&authSource=st2:27017” as user “st2”.
2019-03-18 10:25:15,200 140069147527120 INFO init [-] Connecting to database “st2” @ “mongo1,mongo2,mongo3/?replicaSet=rs1&authSource=st2:27017” as user “st2”.
2019-03-18 10:25:45,939 140069147527120 INFO init [-] Connecting to database “st2” @ “mongo1,mongo2,mongo3/?replicaSet=rs1&authSource=st2:27017” as user “st2”.
2019-03-18 10:26:16,604 140069147527120 INFO init [-] Connecting to database “st2” @ “mongo1,mongo2,mongo3/?replicaSet=rs1&authSource=st2:27017” as user “st2”.