Re: mongod.exe process hangs on "admin web console waiting for connections on port 28017"

4,467 views
Skip to first unread message

slee

unread,
Sep 5, 2012, 10:55:42 AM9/5/12
to mongod...@googlegroups.com
Hi Dan,

Just to be clear, the --dbpath argument is not used for moving the MongoDB's database files.  Thus, when you call C:\mongodb\bin\mongod.exe --dbpath c:\mongodb\data, you're telling MongoDB to look for the database files in c:\mongodb\data.  Instead, if you want to relocate the database files to somewhere other than the default location, eg. C:\data\db, use this argument to specify the non-default location.  Make sure whatever path you use, whether the default C:\data\db or C:\mongodb\data, actually exists before calling mongod.exe.

In either case, it looks like mongod.exe, the server/daemon/backend process, is running correctly.  It's just waiting for an actual client to connect to it.  Further down the MongoDB Installation on Windows instructions, you can follow the instructions to install MongoDB as a Windows Service.  You probably want to install a service, so you won't need to manually start the server/daemon/backend from a command prompt.

Once you've installed mongod.exe as a service, you can connect using the MongoDB's Javascript shell using the mongo.exe command or through the programming language of your choice using one of the MongoDB drivers.

-Stephen

On Wednesday, September 5, 2012 6:08:20 AM UTC-4, Dan Solo wrote:
Hi,

I'm trying to setup the MongoDB for the first time on a Windows 2008 platform and have been trying to follow the 'simple' install procedure at http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/

However, whether I try to move the default database location to a different folder (by the command C:\mongodb\bin\mongod.exe --dbpath c:\mongodb\data) OR just start the main MongoDB database process using the existing default database location (by the command C:\mongodb\bin\mongod.exe) I get stuck at the same pair of command line prompts:

Wed Sep 05 11:35:24 [initandlisten] waiting for connections on port 27017
Wed Sep 05 11:35:24 [websvr] admin web console waiting for connections on port 2
8017

I've tried waiting patiently but with no signs of any action after 15mins+ the only way out is to Ctrl+C.

There's no mention of this error in the official install steps, nor in the troubleshooting guides or via a google search.

Any ideas?

Many thanks,
Dan

Dan Solo

unread,
Sep 5, 2012, 11:45:40 AM9/5/12
to mongod...@googlegroups.com
Hi Stephen,

Thanks for getting back to me.

Armed with that advice (most importantly that the mongod.exe process seems to be running correctly, awaiting a client and would not necessarily display some kind of "success" message on the --dbpath command - not overly clear from the instruction, although maybe my newbie status is as much to blame...) I've started another cmd prompt window and successfully connected to the database and added/retrieved a record.

Onwards to setting up the windows service....!

Cheers,
Dan

slee

unread,
Sep 5, 2012, 12:02:53 PM9/5/12
to mongod...@googlegroups.com
No problem - the "waiting for connections" is pretty typical equivalent of success for a server process, but it doesn't hurt being explicit especially for a newcomer.

Ali Bagheri Shakib

unread,
Jul 22, 2013, 3:07:51 AM7/22/13
to mongod...@googlegroups.com
Hi...
I have this problem too.You must open another cmd window and then run this command in that:
c:\mongodb\bin\mongo.exe

And come back to previous window... :-)
This is because when you start mongod.exe , it will be ready to accept a request to port28017 which prepared.
Reply all
Reply to author
Forward
0 new messages