MongoDB不在Vagrant Centos Box中工作

时间:2016-01-26 01:24:28

标签: mongodb vagrant

当我登录到Centos 7.1 Box时,我似乎无法分叉MongoDB守护进程的实例。我已经创建了data / db文件夹,每次我尝试运行

./bin/mongod --dbpath data/db

我得到了一堆错误

2016-01-26T00:44:23.820+0000 I CONTROL  [initandlisten] MongoDB starting : pid=2735 port=27017 dbpath=data/db 64-bit host=localhost.localdomain
2016-01-26T00:44:23.820+0000 I CONTROL  [initandlisten] db version v3.2.1
2016-01-26T00:44:23.820+0000 I CONTROL  [initandlisten] git version: a14d55980c2cdc565d4704a7e3ad37e4e535c1b2
2016-01-26T00:44:23.821+0000 I CONTROL  [initandlisten] allocator: tcmalloc
2016-01-26T00:44:23.821+0000 I CONTROL  [initandlisten] modules: none
2016-01-26T00:44:23.821+0000 I CONTROL  [initandlisten] build environment:
2016-01-26T00:44:23.821+0000 I CONTROL  [initandlisten]     distarch: x86_64
2016-01-26T00:44:23.821+0000 I CONTROL  [initandlisten]     target_arch: x86_64
2016-01-26T00:44:23.821+0000 I CONTROL  [initandlisten] options: { storage: { dbPath: "data/db" } }
2016-01-26T00:44:23.842+0000 I STORAGE  [initandlisten] wiredtiger_open config: create,cache_size=1G,session_max=20000,eviction=(threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=60,log_size=2GB),statistics_log=(wait=0),
2016-01-26T00:44:23.853+0000 E STORAGE  [initandlisten] WiredTiger (22) [1453769063:853352][2735:0x7f09f2eddcc0], connection: data/db/WiredTiger.wt: fsync: Invalid argument
2016-01-26T00:44:23.856+0000 I -        [initandlisten] Fatal Assertion 28561
2016-01-26T00:44:23.856+0000 I -        [initandlisten] 

***aborting after fassert() failure

奇怪的是我之前做过它并且有效。可能是什么问题?

1 个答案:

答案 0 :(得分:3)

事实证明,将下载的mongodb数据库放在主机和虚拟机之间的同步文件夹中会导致某种类型的权限问题或配置问题。

当你从同步文件夹中取出它 - 很可能有Vagrantfile - 并把它放在一个没有同步/共享的文件夹中时,似乎工作得很好。我浪费了5个小时的思考身份: - )