Cant Connect to MongoDB server from Client - mongodb

I am trying to connect from my machine (client) to server, and it says I cant connect to server.
My machine is Windows 10 and Server machine is Windows Server 2016.
And I tried to connect from cmd and it gives me this error.
Help me with this problem please.

You should check the following items on the server running MongoDB.
Firewalls
Whitelists
You should also verify basic network communication using something like ping from the client to the server.

I will comment regarding Robomongo, seems like you are trying to connect to MongoDB 3.4 DB which only supported starting from the latest beta: Robomongo 1.1 - Beta version with MongoDB 3.4 Support

Related

How can I connect and use MongoDB Compass from Windows to MongoDb server on WSL2

I want to work with Mongo Compass running in Windows and connect to MongoDb server in WSL2.
Both MongoDb services are working fine (I can connect from Windows to MongoDb server on Windows and from WSL2 to MongoDb server on WSL2).
Windows build 19042.
Thanks!
Unless you are running a pretty old build (from 2018 or earlier) WSL includes a feature known as Localhost Forwarding, which should automatically allow you to use localhost in Mongo Compass in Windows to connect to the database running under WSL.
However, sometimes that features "breaks", especially if you hibernate or turn on Windows with the Fast Startup feature enabled (which is the default).
If this is the case, try wsl --shutdown and restart WSL. Then disable Fast Startup. If you do need to hibernate, remember that you may need to wsl --shutdown again to restore the forwarding mechanism.
See this answer for some additional details.
As far, as I understood, to access something running on WSL from you host-machine(Windows) you need to manually map host:port of your WSL MongoDB server to localhost.
This link describes the topic, I hope:
https://learn.microsoft.com/en-us/windows/wsl/networking#accessing-a-wsl-2-distribution-from-your-local-area-network-lan
After mapping your port you probably will connect to your MongoDB server via Compass with mapped address and port.

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. 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. so i tried connect my company VPN while my NordVPN connected as well, but it doesnt work. i need to turn off my private VPN to connect my company VPN. this is really confusing for me if keep to turn off and on my private VPN and Company VPN for my work.
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;
change net.bindIp on /etc/mongod.conf into 0.0.0.0 and my ip;
listed ip public in Mongo Atlas 0.0.0.0;
error on mongo compass after paste the URI:
querySrv ENODATA _mongodb._tcp.companyNameHere.ycex0.mongodb.net
error in 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:
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 ?
my os is: Fedora 33
Try using the standard connection string , as SRV strings sometimes not resolvable by some of the images.
The standard connection string can be obtained in the Atlas UI for the version 3.4 earlier

Connect MongoDB server that is deployed on docker

I'm new to MongoDB.
My manager says that he has deployed MongoDB on Docker for testing purposes. He shared the server name and it is running on 27017 port.
He told me that I do not need to install Docker or MongoDB on my VDI, I just need to connect to the MongoDB server from client.
Now, I'm totally clueless on how to do that. Any help will be highly appreciated.
Thanks in Advance 😊
Try checking if you can access the said mongodb at 27017 port. You can use telnet or such similar commands. If the connection is successful you can use the mongodb_host and port directly in your script.

robomongo aws ec2 ubuntu

Trying to make a remote connection from Robomongo to my ec2 ubuntu mongodb. I have been able to make connections to other non-ec2 ubuntu servers with Robomongo. But when I try with ec2 I keep getting the "you skipped authorization" error. I can remote connect to it in the terminal, but not with Robomongo. Is there something I a missing with ec2 remote connections?
What I have done:
created a mongo user administrator
make a connection within Robomongo
I am able to connect but says I skipped authorization.
My mongo log reads:
Failed to authenticate neil#admin with mechanism MONGODB-CR: AuthenticationFailed MONGODB-CR credentials missing in the user document
The Robomongo (at least 0.8.4) does not support Mongo 3.0 at this time.
For PHP, just update mongo.so module via pecl, because only 1.6 version is fully support Mongo 3.0.
https://github.com/paralect/robomongo/issues/766

mongodb could not connect to server

I'm new to MongoDB. I'm trying to connect to my remote mongo database from my work machine( I tried for both mongohq as well as mongolab). I'm getting the error listed below. When I run the same command from my home machine it runs fine and does connect to remove mongo database. I'm not sure what is messed up on my work machine but I'd like to fix it. Thanks for you help.
MongoDB shell version: 2.4.9
connecting to: linus.mongohq.com:10097/mydb
Thu Jan 16 04:16:02.689 Error: couldn't connect to server linus.mongohq.com:10097
at src/mongo/shell/mongo.js:147
exception: connect failed
As per question comments, your mongo shell client can't connect to the mongo instance. Assuming that your internet connectivity is fine, the most common reason for the failure is that the ports are blocked on your network.
Some ISPs automatically block these ports by default as an additional security protection for users that don't need them open. Contact your ISP or network admin, they should be able to help you out.