-
-
Save satoryu/495913e59bb249b060cc to your computer and use it in GitHub Desktop.
2016-02-06T18:10:44.893+0900 I CONTROL [main] ***** SERVER RESTARTED ***** | |
2016-02-06T18:10:44.910+0900 I CONTROL [initandlisten] MongoDB starting : pid=46957 port=27017 dbpath=/usr/local/var/mongodb 64-bit host=P23722.local | |
2016-02-06T18:10:44.910+0900 I CONTROL [initandlisten] db version v3.2.1 | |
2016-02-06T18:10:44.910+0900 I CONTROL [initandlisten] git version: a14d55980c2cdc565d4704a7e3ad37e4e535c1b2 | |
2016-02-06T18:10:44.910+0900 I CONTROL [initandlisten] allocator: system | |
2016-02-06T18:10:44.910+0900 I CONTROL [initandlisten] modules: none | |
2016-02-06T18:10:44.910+0900 I CONTROL [initandlisten] build environment: | |
2016-02-06T18:10:44.910+0900 I CONTROL [initandlisten] distarch: x86_64 | |
2016-02-06T18:10:44.910+0900 I CONTROL [initandlisten] target_arch: x86_64 | |
2016-02-06T18:10:44.910+0900 I CONTROL [initandlisten] options: { config: "/usr/local/etc/mongod.conf", net: { bindIp: "127.0.0.1" }, storage: { dbPath: "/usr/local/var/mongodb" }, systemLog: { destination: "file", logAppend: true, path: "/usr/local/var/log/mongodb/mongo.log" } } | |
2016-02-06T18:10:44.911+0900 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=4G,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-02-06T18:10:44.913+0900 E STORAGE [initandlisten] WiredTiger (2) [1454749844:913596][46957:0x7fff75fbc000], file:WiredTiger.wt, connection: /usr/local/var/mongodb/WiredTiger.wt: No such file or directory | |
2016-02-06T18:10:44.923+0900 I - [initandlisten] Assertion: 28595:2: No such file or directory | |
2016-02-06T18:10:44.923+0900 I STORAGE [initandlisten] exception in initAndListen: 28595 2: No such file or directory, terminating | |
2016-02-06T18:10:44.923+0900 I CONTROL [initandlisten] dbexit: rc: 100 |
<db>.system.namespace
has been deprecate since v3.0... https://docs.mongodb.org/manual/reference/system-collections/#%3Cdatabase%3E.system.namespaces
The error message looks like one in this report. https://jira.mongodb.org/browse/SERVER-20729
The major difference between 3.2 and 3.0 is the default storage engine. https://docs.mongodb.org/manual/core/storage-engines/
AFAIK, this problem happened after updating mongodb from 3.0 to 3.2.1 with homebrew then removed the entire db files.
The storage engine of the current my mongodb is wiredTiger
🐯
> db.serverStatus().storageEngine
{ "name" : "wiredTiger", "supportsCommittedReads" : true }
its config file is here:
systemLog:
destination: file
path: /usr/local/var/log/mongodb/mongo.log
logAppend: true
storage:
dbPath: /usr/local/var/mongodb
net:
bindIp: 127.0.0.1
Now my application uses an instance hosted by MongLab. its mongodb's version is 3.0.7.
So I'm guessing this problem is caused by using different storage engines between on my Mac and on heroku.
Bingooooooooo 🎉 🎉 🎉
Fixed the problems by specifying storage engine in its configuration file like this.
storage:
dbPath: /usr/local/var/mongoedb
engine: mmpav1
After this change, restarting a mongodb process is required.
fixed some typos in your snippet @satoryu
storage:
dbPath: /usr/local/var/mongodb
engine: mmapv1
What I did