Ok , i succeeded to reproduce this issue on premises.
The problem is not related to replica set but to ssl.
I succeeded to connect a stackstorm server to on premises mongo replica set without ssl.
But once i require the connection to be protected by ssl, the same issue is appearing.
without ssl all seems working perfectly with or without replica set.
I tried all combination of paramters, i tried to remove part of them but always the same issue is appearing - the stackstorm is succeeded to start up and even to create the DB and collections in the DB ( so the initial connection is ok) but after, every few seconds in st2api.log and st2auth.log i see this:
2019-12-13 15:22:58,551 139656589406280 INFO (unknown file) [-] Connecting to database “st5” @ “d-stackstorm-control-box-vm:27017,d-stackstorm1-vm:27017 (replica set)” as user “alex”.
2019-12-13 15:22:58,553 139656589406280 WARNING (unknown file) [-] Retry on ConnectionError - Cannot connect to database default :
maximum recursion depth exceeded.
So it’s definitely some bug with ssl implementation that leads the exception : maximum recursion depth exceeded.
currently my settings as following:
I already tried to gray out 3 last settings or even part of them without any positive result. still the same error.
Only removing ssl requirement solves it but i can’t remove it forever. Noway to connect to mongo DB without ssl protection. unfortunately no way to use stackstorm now because of this limitation