Mongodb服务器在运行时退出

时间:2013-02-23 21:27:19

标签: mongodb

我现在正在使用mongodb几个月,直到昨天工作正常,但今天我遇到了麻烦。我在驱动器中有23.7GB的可用空间,其中指定了data\db路径,但它显示Please make at least 3379MB available in /data/db/journal。这是一个错误还是什么?

C:\Users\sadaf2605\Downloads\Compressed\Console2>mongod
mongod --help for help and startup options
Sun Feb 24 03:20:05 [initandlisten] MongoDB starting : pid=7020 port=27017 dbpath=\data\db\ 64-bit host=Sadaf
Sun Feb 24 03:20:05 [initandlisten] db version v2.2.2, pdfile version 4.5
Sun Feb 24 03:20:05 [initandlisten] git version: d1b43b61a5308c4ad0679d34b262c5af9d664267
Sun Feb 24 03:20:05 [initandlisten] build info: windows sys.getwindowsversion(major=6, minor=1, build=7601, pla
tform=2, service_pack='Service Pack 1') BOOST_LIB_VERSION=1_49
Sun Feb 24 03:20:05 [initandlisten] options: {}
Sun Feb 24 03:20:05 [initandlisten] journal dir=/data/db/journal
Sun Feb 24 03:20:05 [initandlisten] recover : no journal files present, no recovery needed
Sun Feb 24 03:20:05 [initandlisten]
Sun Feb 24 03:20:05 [initandlisten] ERROR: Insufficient free space for journal files
Sun Feb 24 03:20:05 [initandlisten] Please make at least 3379MB available in /data/db/journal or use --smallfiles
Sun Feb 24 03:20:05 [initandlisten]
Sun Feb 24 03:20:05 [initandlisten] exception in initAndListen: 15926 Insufficient free space for journals, terminating
Sun Feb 24 03:20:05 dbexit:
Sun Feb 24 03:20:05 [initandlisten] shutdown: going to close listening sockets...
Sun Feb 24 03:20:05 [initandlisten] shutdown: going to flush diaglog...
Sun Feb 24 03:20:05 [initandlisten] shutdown: going to close sockets...
Sun Feb 24 03:20:05 [initandlisten] shutdown: waiting for fs preallocator...
Sun Feb 24 03:20:05 [initandlisten] shutdown: lock for final commit...
Sun Feb 24 03:20:05 [initandlisten] shutdown: final commit...
Sun Feb 24 03:20:05 [initandlisten] shutdown: closing all files...
Sun Feb 24 03:20:05 [initandlisten] closeAllFiles() finished
Sun Feb 24 03:20:05 [initandlisten] journalCleanup...
Sun Feb 24 03:20:05 [initandlisten] removeJournalFiles
Sun Feb 24 03:20:05 [initandlisten] shutdown: removing fs lock...
Sun Feb 24 03:20:05 dbexit: really exiting now

我也尝试过使用--smallfiles,但它不起作用!

C:\Users\sadaf2605\Downloads\Compressed\Console2>mongod --smallfiles
Sun Feb 24 03:23:38 [initandlisten] MongoDB starting : pid=6844 port=27017 dbpath=\data\db\ 64-bit host=Sadaf
Sun Feb 24 03:23:38 [initandlisten] db version v2.2.2, pdfile version 4.5
Sun Feb 24 03:23:38 [initandlisten] git version: d1b43b61a5308c4ad0679d34b262c5af9d664267
Sun Feb 24 03:23:38 [initandlisten] build info: windows sys.getwindowsversion(major=6, minor=1, build=7601, platform=2, service_pack=
'Service Pack 1') BOOST_LIB_VERSION=1_49
Sun Feb 24 03:23:38 [initandlisten] options: { smallfiles: true }
Sun Feb 24 03:23:38 [initandlisten] journal dir=/data/db/journal
Sun Feb 24 03:23:38 [initandlisten] recover : no journal files present, no recovery needed
Sun Feb 24 03:23:38 [initandlisten] ERROR: listen(): bind() failed errno:10048 Only one usage of each socket address (protocol/networ
k address/port) is normally permitted. for socket: 0.0.0.0:27017
Sun Feb 24 03:23:38 [websvr] admin web console waiting for connections on port 28017
Sun Feb 24 03:23:38 [initandlisten] now exiting
Sun Feb 24 03:23:38 dbexit:
Sun Feb 24 03:23:38 [initandlisten] shutdown: going to close listening sockets...
Sun Feb 24 03:23:38 [initandlisten] closing listening socket: 464
Sun Feb 24 03:23:38 [initandlisten] shutdown: going to flush diaglog...
Sun Feb 24 03:23:38 [initandlisten] shutdown: going to close sockets...
Sun Feb 24 03:23:38 [initandlisten] shutdown: waiting for fs preallocator...
Sun Feb 24 03:23:38 [initandlisten] shutdown: lock for final commit...
Sun Feb 24 03:23:38 [initandlisten] shutdown: final commit...
Sun Feb 24 03:23:38 [initandlisten] shutdown: closing all files...
Sun Feb 24 03:23:38 [initandlisten] closeAllFiles() finished
Sun Feb 24 03:23:38 [initandlisten] journalCleanup...
Sun Feb 24 03:23:38 [initandlisten] removeJournalFiles
Sun Feb 24 03:23:38 [initandlisten] shutdown: removing fs lock...
Sun Feb 24 03:23:38 dbexit: really exiting now

1 个答案:

答案 0 :(得分:0)

  

错误:日记文件的可用空间不足

根据上述错误,释放你的空间。

另请参阅:Journal files are present in journal directory, yet starting without journaling enabled

  

错误:listen():bind()失败错误号:10048通常只允许使用每个套接字地址(协议/网络地址/端口)。对于套接字:0.0.0.0:27017

这表明在端口27017上已经存在一些进程绑定,应该被终止。