When installing MongoDB as a service on my Windows development machine I had the issue that the Admin Console under localhost:28017 threw Err_Connection_Refused. After some research I learned, that you need the –rest option when configuring the service on the command line, like so:
1 2 3 4 5 |
cd your\path\to\mongo sc.exe create MongoDB binPath= "\"d:\your\path\to\mongo\mongod.exe\" --service --rest --config= \"d:\your\path\to\mongoconfig\mongod.cfg\"" displayname= "MongoDB" start= "auto" net start MongoDB |
The installation guidelines for running MongoDB as Windows service unfortunately omit the –rest option.
Links: