-
-
Notifications
You must be signed in to change notification settings - Fork 782
Description
SUMMARY
Unable to connect Stackstorm to Mongo DB over SSL.
Stackstorm can't function correctly when connection to MongoDB is encrypted by SSL,
There is exception of "aximum recursion depth exceeded while calling a Python object" in st2api.log and st2auth.log. In this conditions stackstorm is in non functional state at all.
STACKSTORM VERSION
st2 3.1.0, on Python 3.6.9
:
OS, environment, install method
OS: Both the stackstorm and moongodb on Ubuntu 18.04 LTS but installed in diffrent VMs in the same subnet.
All Stackstorm components are installed on one VM but Mongo DB, RAbitMQ on the second VM.
Steps to reproduce the problem
Without SSL all works fine, but after moving a connection to SSL, Stackstorm can't connect to Mongo.
-
Put ssl=true in st2.conf
-
Other parameters related to ssl ,don't really matter . Tested in all combinations of these parameters with and without client certificate authentication and so on.
-
mongo client can connect to monog over ssl without any problem. Simple python script using mongoengine module can connect to mongo over ssl. So it seems as not a problem of underlying infrastructure because all other tools and components can connect to mongo wih SSL but staskstorm can't/
Expected Results
Staskstoem should work with mongo over SSL. That a basic requirements .
Actual Results
Stackstorm starting up but in the st2api. log and st2auth.log we can see every few seconds error
2019-12-15 08:08:45,891 140651884441824 INFO (unknown file) [-] Connecting to database "somedatabase" @ "mongodb-host:27017" as user "someuser".
2019-12-15 08:08:45,892 140651884441824 WARNING (unknown file) [-] Retry on ConnectionError - Cannot connect to database default :
maximum recursion depth exceeded while calling a Python object
it seems like some bug in __init__py file in _db_connect function in line number 125 where the connection attempt goes to endless recursion or something likes this.