Browser can't access MongoDB on 27017

A R picture A R · Apr 2, 2015 · Viewed 14.6k times · Source

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.

Answer

kashyap picture kashyap · Apr 2, 2015

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.