简体   繁体   English

无法将 mongo 地图集连接到 mongodb 指南针、shell 和 Go 应用程序

[英]can't connect mongo atlas into mongodb compass, shell and Go app

i think this question been asked many times, but i've had this issue also last year and another last year, i resolved it to use VPN provider like nordvpn and tunnelBear.我想这个问题被问过很多次了,但我去年也遇到过这个问题,去年我也遇到过这个问题,我解决了这个问题,使用了像 nordvpn 和 tunnelBear 这样的 VPN 提供商。 my issue here my company has own VPN which to connect to some internal apps, but i cant connect with multi VPN, my company VPN not resolved the issue to connect Mongo Atlas into Compass, after i install NordVPN in my Linux Fedora, it was solve, but i can't open another internal app if i dont connect with my company VPN.我的问题在这里我的公司有自己的 VPN 可以连接到一些内部应用程序,但我无法连接多个 VPN,我的公司 VPN 没有解决将 Mongo Atlas 连接到 Compass 的问题,在我的 Linux Fedora 中安装 NordVPN 后,它已解决,但如果我不连接我的公司 VPN,我将无法打开另一个内部应用程序。 so i tried connect my company VPN while my NordVPN connected as well, but it doesnt work.所以我尝试在连接我的 NordVPN 的同时连接我的公司 VPN,但它不起作用。 i need to turn off my private VPN to connect my company VPN.我需要关闭我的私人 VPN 才能连接我的公司 VPN。 this is really confusing for me if keep to turn off and on my private VPN and Company VPN for my work.如果继续为我的工作关闭并打开我的私人 VPN 和公司 VPN,这对我来说真的很困惑。 wha i have tried to fix this issues but always failed我试图解决这个问题但总是失败

  • change DNS on my fedora /etc/resolv.conf into nameserver 0.0.0.0 or nameserver 8.8.8.8 ;将我的 fedora /etc/resolv.conf上的 DNS 更改为nameserver 0.0.0.0nameserver 8.8.8.8
  • change net.bindIp on /etc/mongod.conf into 0.0.0.0 and my ip;将 /etc/mongod.conf 上的/etc/mongod.conf更改为0.0.0.0和我的 ip;
  • listed ip public in Mongo Atlas 0.0.0.0 ;在 Mongo Atlas 0.0.0.0中公开列出 ip ;

error on mongo compass after paste the URI: querySrv ENODATA _mongodb._tcp.companyNameHere.ycex0.mongodb.net粘贴 URI 后 mongo 罗盘出错: querySrv ENODATA _mongodb._tcp.companyNameHere.ycex0.mongodb.net

error in mongo shell mongo shell 中的错误

MongoDB shell version v4.4.3
exception: Failed to look up service "_mongodb._tcp.companyNameHere.ycex0.mongodb.net": Success
exiting with code 1

error in Go app: Go 应用程序中的错误:

panic: error parsing uri: lookup _mongodb._tcp.companyNameHere.ycex0.mongodb.net on XXX.XXX.1.1:53: no such host

those ways not work in my Fedora, i cant connect Mongo Atlas URI in Compass, Go App and Shell as well, is that any another way?这些方法在我的 Fedora 中不起作用,我无法在 Compass、Go App 和 Shell 中连接 Mongo Atlas URI,还有其他方法吗? my os is: Fedora 33我的操作系统是:Fedora 33

Try using the standard connection string, as SRV strings sometimes not resolvable by some of the images.尝试使用标准连接字符串,因为某些图像有时无法解析 SRV 字符串。

The standard connection string can be obtained in the Atlas UI for the version 3.4 earlier标准连接字符串可以在 3.4 早期版本的 Atlas UI 中获取

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM