diff --git a/plugins/data_query/nosql_mongodb.py b/plugins/data_query/nosql_mongodb.py index 4cbb9a158..07799e8fb 100755 --- a/plugins/data_query/nosql_mongodb.py +++ b/plugins/data_query/nosql_mongodb.py @@ -51,7 +51,7 @@ class nosqlMongodb(): # print(self.__DB_HOST,self.__DB_PORT, self.__DB_PASS) try: - self.__DB_CONN = pymongo.MongoClient(host=self.__DB_HOST, port=self.__DB_PORT, maxPoolSize=10) + self.__DB_CONN = pymongo.MongoClient(host=self.__DB_HOST, port=self.__DB_PORT, maxPoolSize=10,directConnection=True) self.__DB_CONN.admin.command('ping') return self.__DB_CONN except pymongo.errors.ConnectionFailure: