我有Google App Engine F1,我的应用程序正尝试连接到mongodb atlas免费层集群。我在本地测试了我的应用,效果很好。但是部署到应用程序引擎时出现以下错误。我将地图集配置为接受所有IP,所以我认为这不是IP问题。但是我无法从错误消息中找出原因。
2018-12-03 04:19:03 default[20181202t224815] "GET / HTTP/1.1" 500
2018-12-03 04:19:04 default[20181202t224815] production
2018-12-03 04:19:04 default[20181202t224815] (node:6)
DeprecationWarning: current URL string parser is deprecated, and will
be removed in a future version. To use the new parser, pass option {
useNewUrlParser: true } to MongoClient.connect.
2018-12-03 04:19:04 default[20181202t224815] { Error: querySrv
ESERVFAIL _mongodb._tcp.cluster0-kzjxb.mongodb.net
2018-12-03 04:19:04 default[20181202t224815] at
QueryReqWrap.onresolve
[as oncomplete] (dns.js:197:19)
2018-12-03 04:19:04 default[20181202t224815] errno: 'ESERVFAIL',
2018-12-03 04:19:04 default[20181202t224815] code: 'ESERVFAIL',
2018-12-03 04:19:04 default[20181202t224815] syscall: 'querySrv',
2018-12-03 04:19:04 default[20181202t224815] hostname:
'_mongodb._tcp.cluster0-kzjxb.mongodb.net' }