MongoTimeoutException: Error While Using MongoDB with Trino

I’m passing mongodb.properties as

connector.name=mongodb mongodb.seeds=127.0.0.1:27017 mongodb.credentials=username:password@database

But when running the catalog after passing the query it is giving error as

Query 20210312_110147_00003_zxyd4 failed: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting for a server that matches com.mongodb.client.internal.MongoClientDelegate$1@469d4507. Client view of cluster state is {type=REPLICA_SET, servers=[{address=hostname:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.SocketTimeoutException: connect timed out}}]

Can Someone Help. Am i doing something wrong while doing the connection?

Note:- I’m running trino locally using single machine for testing, that functions as both a coordinator and worker and mongodb is on some other server but i’m routing the localhost to the desired server using ssh