1

I am trying to run a web application locally that uses grunt and mongodb. The app allows users to upload information which they can then view in their gallery.

  • started mongodb with mongod --port 3000 --httpinterface (As mentioned in the comments, I have tried running it without the --httpinterface as well)

  • browsing to 127.0.0.1:3000 gives a page with only the text "It looks like you are trying to access MongoDB over HTTP on the native driver port."

  • browsing to localhost:3000 loads my application

  • the application sends data over 127.0.0.1, and it is not going through

It seems very relevant to what is going on in this question.
I hope this will not be considered a duplicate, because after finding that question I tried to work through the answers offered without success. If I was able I would have tried pursuing this issue in the comments there.
Following the answers on that question I tried running mongo with a config file without success (no config file existed beforehand, I tried to create one with the sample offered on the mongo website but it rejects it). I also tried deleting the lock files and repairing mongo. Nothing has changed.

It's probably worth mentioning that the application I'm working with is an existing, sparsely documented project that was given to me for a school assignment. It is far more complicated than anything I have ever worked on and I am very unfamiliar with tools like mongo.

Community
  • 1
  • 1
  • The `--httpinterface` option opens that interface on the subsequent port number to the server, so `3001` (by default 27017, 27018 repectively). The two ports are for different things, one being the native interface for the server and the other for the "limitted" http interface. You probably should not be using that anyway, and you seem somwhat confused between your "application" needs and your applications needs to connect to the server. Also if you are running your own web app on port 3000 already, then it is not possible to also bind a MongoDB server instance to that port at the same time. – Blakes Seven Nov 12 '15 at 05:55
  • Running mongo on port 3000 without the httpinterface command gives the same result. I am confused about your last sentence- I thought mongo was what ran the application (on port 3000). As I said I am very new to all of this, so perhaps I misunderstand what mongo is doing. – 0percentmilk Nov 12 '15 at 21:25
  • I just ran mongo with the "mongod" command on its default port (27017) and the application was able to send data. Thank you. Clearly there is much more I need to understand. – 0percentmilk Nov 12 '15 at 22:22

0 Answers0