I have some issues with MongoDB (or Linux security, perhaps):
1 I am runing MongoDB 3.0 in an OpenSuSE 13.1 machine (which acts as the data server). I have a local network of 4 computers with different OSs.
2 I can connect from a Windows 8.1 Laptop using the mongo command, using the pymongo Python library, or Robomongo. Everything works just fine: I can query the server and insert things.
3 However, when I try to access port 27017 to see the "It looks like you're accessing..." message, the browser says "The connection was reset".
4 SuSe's Firewall and AppArmor are disabled.
QUESTION: There is one computer that can't access the address of the local server. Said computer is in the same local network and is running Windows 8.1. I tried with many other devices and OSs (see miniupdate in comments) and they all managed to access the 27017 port on the server. Of course, the server simply displayed the message "It looks like you are trying to access MongoDB over HTTP on the native driver port.". Do you have any ideas as to why the browser in the problematic computer keeps saying "Connection was reset" instead of showing the message mentioned above? Please note that this computer can do everything I mentioned in point 2. It's the browser thing that is puzzling me.
By default, MongoDB starts at port 27017. But you can access it in a web browser not at that port, rather, at a port number 1000 more than the port at which MongoDB is started. So if you point your browser to http://localhost:28017, you can see MongoDB web interface.
0.1 : 27017 ” is a general error message indicating that your client/driver cannot connect to a server on the specified hostname/IP and port. In this specific example, 127.0. 0.1 is the hostname or IP and 27017 is the port. Your connection from client to server is blocked by firewall or network configuration.
If you have created a user and are having trouble authenticating, try the following: Check that you are using the correct username and password for your database user, and that you are connecting to the correct database deployment. Check that you are specifying the correct authSource database in your connection string.
To connect to your local MongoDB, you set Hostname to localhost and Port to 27017 . These values are the default for all local MongoDB connections (unless you changed them). Press connect, and you should see the databases in your local MongoDB.
MongoDB's default port doesn't speak the http
protocol. Which is what a browser can speak (among a few others). If you're looking for the web based status page, then that should be on port 28017
(27017 + 1000).
See http://docs.mongodb.org/manual/reference/default-mongodb-port/ for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With