Unable to connect from rasa to mongodb cluster

Hi,

Am getting following error while trying to use mongodb as tracker store:

Starting Rasa server on http://localhost:5005 … ConnectionException: Cannot connect to tracker store.command createIndexes requires authentication

sys:1: RuntimeWarning: coroutine ‘Loop.create_server’ was never awaited

Am using connection string as follows:

type: mongod
url: mongodb+srv://mongouser:#############@rpm-cluster.ft4wr.mongodb.net/rxdb?retryWrites=true&w=majority
db: rasa

Using python from the command shell with the same environment used to start the rasa server,

I am able to connect and browse collections.

python

Python 3.6.9 (default, Jan 26 2021, 15:33:00)

[GCC 8.4.0] on linux

Type “help”, “copyright”, “credits” or “license” for more information.

import json

import pymongo

from bson import json_util

from pymongo import MongoClient

conn = MongoClient(“mongodb+srv://mongouser:##############@rpm-cluster.ft4wr.mongodb.net/rxdb?retries=true&w=majority”)

/opt/kchappuser/rasa/venv/lib/python3.6/site-packages/pymongo/common.py:756: UserWarning: Unknown option retries

warnings.warn(str(exc))

db = conn[‘rxdb’]

result = db.ApplicationVersion.find()

for document in result:

… print(document);

{‘_id’: ObjectId(‘595bd7ae42c4f1817ac379d0’), ‘application’: ‘CHFConnect’, ‘versionNumber’: ‘0.0.0’}

{‘_id’: ObjectId(‘595bd7ae42c4f1817ac379d1’), ‘application’: ‘Sami’, ‘url’: ‘https://itunes.apple.com/us/app/samiconnect/id1234378470’, ‘versionNumber’: ‘0.0.0’}

both the client and the mongodb instances are running on aws.

rasa --version Rasa Version : 2.8.7 Minimum Compatible Version: 2.8.0 Rasa SDK Version : 2.8.1 Rasa X Version : None Python Version : 3.6.9 Operating System : Linux-5.4.0-1035-aws-x86_64-with-Ubuntu-18.04-bionic Python Path : /opt/kchappuser/rasa/venv/bin/python pymongo version 3.10.1

Any help is most appreciated.

Thanks a lot!

Venkat