I setup a vmware ESXI 7.0.2 on a server machine.
In Vmware i installed a bitnami mongodb virtual machine Using this link
With mongodb console, i'm able to reach mongodb within vmware ESXI using the following command: mongo admin --username root -p
When i log in, everything works fine.
From now on, i want to reach this mongodb from an other machine on the same network with the following connection string: mongodb://192.168.10.110:27017
In order to reach it, iam using MongoDB Compass and initiating a New Connection.
Even if i put the credentials into the connection string ( which iam using to log in to mongodb from bitnami console ) like this: mongodb://[username]:[password]192.168.10.110:27017
the connection is timed out always.
In the bitnami console, when i start the virtual machine, the console says that i can reach it with this IP, which is from DHCP.
Picture included:
If i log in to mongo i see this on the console:
So i can connect to mongodb within bitnami console, but not from outside VMWARE but inside the same network.
EDIT: Tried using with NodeJS from the same machine which runs MongoDB Compass, but this results in a timeout too.
It turned out that i had to open the port for the mongodb to be able to access it from "outside" it's network.
I just went and enabled the firewall first:
sudo systemctl enable ufw
sudo ufw status
started it:
sudo systemctl start ufw
and opened the port
sudo ufw allow 27017
All is working fine. My bad.