Unable to connect to mongodb on remote server

I have a spring boot application with a mongo database on localhost and everything work fine.
Now i want to deploy my application to my server and the database is on another remote server.
I changed mongod.conf file and uncommented “bindIp: 0.0.0.0 #default value is 127.0.0.1”
In my application.properties file i have this:
“spring.data.mongodb.uri=mongodb://172.16.4.26:27017/jenkinsdb”
When i run my application i get “com.mongodb.MongoSocketOpenException: Exception opening socket” caused by “Caused by: java.net.SocketTimeoutException: connect timed out”