dsrjs86444
dsrjs86444
2014-03-31 13:50

如何使MongoDB与Wampserver一起使用

已采纳

I really need your help. I spent more than three hours trying to do to MongoDB work with WampServer.

I'm using Windows 8. PHP version is 5.4.12 and MongoDB which I downloaded is 64 bit version ( because my windows is 64 bit).

I have followed these steps: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/

And error which I got is:

mongod.exe --help for help and startup options
Mon Mar 31 15:48:42.925 [initandlisten] MongoDB starting : pid=13156 port=27017 dbpath=\data\db\ 64-bit host=WalterLP2014-1
Mon Mar 31 15:48:42.926 [initandlisten] db version v2.4.9
Mon Mar 31 15:48:42.926 [initandlisten] git version: 52fe0d21959e32a5bdbecdc62057db386e4e029c
Mon Mar 31 15:48:42.926 [initandlisten] build info: windows sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack='Service Pack 1') BOOST_LIB_VERSION=1_49
Mon Mar 31 15:48:42.926 [initandlisten] allocator: system
Mon Mar 31 15:48:42.926 [initandlisten] options: {}
Mon Mar 31 15:48:42.977 [initandlisten] journal dir=\data\db\journal
Mon Mar 31 15:48:42.978 [initandlisten] recover : no journal files present, no recovery needed
Mon Mar 31 15:48:43.362 [initandlisten] ERROR: listen(): bind() failed errno:10048 Only one usage of each socket address (protocol/network address/port) is normally permitted. for socket: 0.0.0.0:2701
7
Mon Mar 31 15:48:43.362 [websvr] ERROR: listen(): bind() failed errno:10048 Only one usage of each socket address (protocol/network address/port) is normally permitted. for socket: 0.0.0.0:28017
Mon Mar 31 15:48:43.363 [initandlisten] now exiting
Mon Mar 31 15:48:43.363 dbexit:
Mon Mar 31 15:48:43.364 [initandlisten] shutdown: going to close listening sockets...
Mon Mar 31 15:48:43.364 [initandlisten] shutdown: going to flush diaglog...
Mon Mar 31 15:48:43.364 [initandlisten] shutdown: going to close sockets...
Mon Mar 31 15:48:43.364 [initandlisten] shutdown: waiting for fs preallocator...
Mon Mar 31 15:48:43.365 [initandlisten] shutdown: lock for final commit...
Mon Mar 31 15:48:43.365 [initandlisten] shutdown: final commit...
Mon Mar 31 15:48:43.453 [initandlisten] shutdown: closing all files...
Mon Mar 31 15:48:43.454 [initandlisten] closeAllFiles() finished
Mon Mar 31 15:48:43.454 [initandlisten] journalCleanup...
Mon Mar 31 15:48:43.458 [initandlisten] removeJournalFiles
Mon Mar 31 15:48:43.460 [initandlisten] shutdown: removing fs lock...
Mon Mar 31 15:48:43.460 dbexit: really exiting now

Any kind of help will be appreciated...

Thanks in advance

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • douduan2272 douduan2272 7年前
    Mon Mar 31 15:48:43.362 [initandlisten] ERROR: listen(): bind() failed errno:10048 Only     one usage of each socket address (protocol/network address/port) is normally permitted. for socket: 0.0.0.0:2701
    Mon Mar 31 15:48:43.362 [websvr] ERROR: listen(): bind() failed errno:10048 Only one usage of each socket address (protocol/network address/port) is normally permitted. for socket: 0.0.0.0:28017
    

    Form these errors It looks like you're trying to bind a port that is already taken. On windows you can see what application is using a certain port with netstat.

    A Guide on using netstat for this purpose van be found here:http://www.mydigitallife.info/how-to-check-and-identify-which-application-is-listening-or-opening-port-80-and-443-on-windows/

    Just change 80 or 443 in the guide to 2701 and 28017.

    点赞 评论 复制链接分享