The function app works fine locally. However on Azure, it can not connect to our database with the following message:
org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.mongodb.MongoDatabaseFactory]: Factory method 'mongoDbFactory' threw exception; nested exception is com.mongodb.MongoConfigurationException: Unable to look up TXT record for host xxxxxxxxxx.yyyyy.mongodb.net
The MongoDB instance does not have any IP restrictions.
On the console, we can not resolve our MongoDB name through the default server, but it can be resolved through google DNS (8.8.8.8).
How can we resolve that issue?