Created
October 31, 2012 15:27
-
-
Save jprante/3987668 to your computer and use it in GitHub Desktop.
MongoDB river not working
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jorg-Prantes-MacBook-Pro:mongodb-osx-x86_64-2.2.1 joerg$ mkdir -p data/rs0-0 | |
Jorg-Prantes-MacBook-Pro:mongodb-osx-x86_64-2.2.1 joerg$ ./bin/mongod --dbpath data/rs0-0 --port 27017 --replSet rs0 | |
Wed Oct 31 15:57:06 [initandlisten] MongoDB starting : pid=13387 port=27017 dbpath=data/rs0-0 64-bit host=Jorg-Prantes-MacBook-Pro.local | |
Wed Oct 31 15:57:06 [initandlisten] db version v2.2.1, pdfile version 4.5 | |
Wed Oct 31 15:57:06 [initandlisten] git version: d6764bf8dfe0685521b8bc7b98fd1fab8cfeb5ae | |
Wed Oct 31 15:57:06 [initandlisten] build info: Darwin erh-tnt.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_49 | |
Wed Oct 31 15:57:06 [initandlisten] options: { dbpath: "data/rs0-0", port: 27017, replSet: "rs0" } | |
Wed Oct 31 15:57:06 [initandlisten] journal dir=data/rs0-0/journal | |
Wed Oct 31 15:57:06 [initandlisten] recover : no journal files present, no recovery needed | |
Wed Oct 31 15:57:06 [websvr] admin web console waiting for connections on port 28017 | |
Wed Oct 31 15:57:06 [initandlisten] waiting for connections on port 27017 | |
Wed Oct 31 15:57:06 [initandlisten] connection accepted from 192.168.1.113:62160 #1 (1 connection now open) | |
Wed Oct 31 15:57:06 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG) | |
Wed Oct 31 15:57:06 [rsStart] replSet info you may need to run replSetInitiate -- rs.initiate() in the shell -- if that is not already done | |
Wed Oct 31 15:57:16 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG) | |
Wed Oct 31 15:57:26 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG) | |
Wed Oct 31 15:57:36 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG) | |
Wed Oct 31 15:57:46 [rsStart] replSet can't get local.system.replset config from self or any seed (EMPTYCONFIG) | |
Jorg-Prantes-MacBook-Pro:mongodb-osx-x86_64-2.2.1 joerg$ ./bin/mongo localhost:27017 | |
MongoDB shell version: 2.2.1 | |
connecting to: localhost:27017/test | |
Welcome to the MongoDB shell. | |
For interactive help, type "help". | |
For more comprehensive documentation, see | |
http://docs.mongodb.org/ | |
Questions? Try the support group | |
http://groups.google.com/group/mongodb-user | |
> rs.initiate() | |
{ | |
"info2" : "no configuration explicitly specified -- making one", | |
"me" : "Jorg-Prantes-MacBook-Pro.local:27017", | |
"info" : "Config now saved locally. Should come online in about a minute.", | |
"ok" : 1 | |
} | |
> exit | |
bye | |
Jorg-Prantes-MacBook-Pro:mongodb-osx-x86_64-2.2.1 joerg$ ./bin/mongofiles --host localhost:27017 --db testmongo --collection files put ~/Desktop/929_2N7J85.pdf | |
connected to: localhost:27017 | |
added file: { _id: ObjectId('50913d17aa975804c3de7f3d'), filename: "/Users/joerg/Desktop/929_2N7J85.pdf", chunkSize: 262144, uploadDate: new Date(1351695640757), md5: "cddfcb39bf2f77e8efae05031c9e8adb", length: 2364515 } | |
done! | |
Jorg-Prantes-MacBook-Pro:elasticsearch-0.19.11 joerg$ ./bin/plugin -install richardwilly98/elasticsearch-river-mongodb/1.4.0 | |
-> Installing richardwilly98/elasticsearch-river-mongodb/1.4.0... | |
Trying https://github.com/downloads/richardwilly98/elasticsearch-river-mongodb/elasticsearch-river-mongodb-1.4.0.zip... | |
Downloading ... | |
...DONE | |
Installed river-mongodb | |
Jorg-Prantes-MacBook-Pro:elasticsearch-0.19.11 joerg$ ./bin/plugin -install elasticsearch/elasticsearch-mapper-attachments/1.6.0 | |
-> Installing elasticsearch/elasticsearch-mapper-attachments/1.6.0... | |
Trying https://github.com/downloads/elasticsearch/elasticsearch-mapper-attachments/elasticsearch-mapper-attachments-1.6.0.zip... | |
Downloading ... | |
...DONE | |
Jorg-Prantes-MacBook-Pro:elasticsearch-0.19.11 joerg$ ./bin/elasticsearch -f | |
[2012-10-31 16:01:25,620][INFO ][node ] [Eon] {0.19.11}[13416]: initializing ... | |
[2012-10-31 16:01:25,807][INFO ][plugins ] [Eon] loaded [river-mongodb, mapper-attachments], sites [] | |
[2012-10-31 16:01:27,753][INFO ][node ] [Eon] {0.19.11}[13416]: initialized | |
[2012-10-31 16:01:27,754][INFO ][node ] [Eon] {0.19.11}[13416]: starting ... | |
[2012-10-31 16:01:27,828][INFO ][transport ] [Eon] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/192.168.1.113:9300]} | |
[2012-10-31 16:01:30,878][INFO ][cluster.service ] [Eon] new_master [Eon][deK4c9ZzSeWBW1pSF9LEYQ][inet[/192.168.1.113:9300]], reason: zen-disco-join (elected_as_master) | |
[2012-10-31 16:01:30,902][INFO ][discovery ] [Eon] elasticsearch/deK4c9ZzSeWBW1pSF9LEYQ | |
[2012-10-31 16:01:30,907][INFO ][http ] [Eon] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/192.168.1.113:9200]} | |
[2012-10-31 16:01:30,907][INFO ][node ] [Eon] {0.19.11}[13416]: started | |
[2012-10-31 16:01:30,910][INFO ][gateway ] [Eon] recovered [0] indices into cluster_state | |
Jorg-Prantes-MacBook-Pro:elasticsearch-0.19.11 joerg$ curl -XPUT 'http://localhost:9200/_river/mongodb/_meta' -d '{ | |
"type": "mongodb", | |
"mongodb": { | |
"db": "testmongo", | |
"collection": "files", | |
"gridfs": true | |
}, | |
"index": { | |
"name": "mongoindex", | |
"type": "files" | |
} | |
}' | |
{"ok":true,"_index":"_river","_type":"mongodb","_id":"_meta","_version":1} | |
[2012-10-31 16:01:58,481][INFO ][cluster.metadata ] [Eon] [_river] creating index, cause [auto(index api)], shards [1]/[0], mappings [] | |
[2012-10-31 16:01:58,908][INFO ][cluster.metadata ] [Eon] [_river] update_mapping [mongodb] (dynamic) | |
[2012-10-31 16:01:58,931][INFO ][river.mongodb ] [Eon] [mongodb][mongodb] Using mongodb server(s): host [localhost], port [27017] | |
[2012-10-31 16:01:58,931][INFO ][river.mongodb ] [Eon] [mongodb][mongodb] starting mongodb stream: options: secondaryreadpreference [false], gridfs [true], filter [testmongo], db [mongoindex], indexing to [files]/[{}] | |
[2012-10-31 16:01:58,960][INFO ][cluster.metadata ] [Eon] [mongoindex] creating index, cause [api], shards [1]/[0], mappings [] | |
[2012-10-31 16:01:58,990][INFO ][river.mongodb ] [Eon] [mongodb][mongodb] Mapping: {"files":{"properties":{"content":{"type":"attachment"},"filename":{"type":"string"},"contentType":{"type":"string"},"md5":{"type":"string"},"length":{"type":"long"},"chunkSize":{"type":"long"}}}} | |
[2012-10-31 16:01:59,031][INFO ][cluster.metadata ] [Eon] [mongoindex] create_mapping [files] | |
[2012-10-31 16:01:59,109][INFO ][cluster.metadata ] [Eon] [_river] update_mapping [mongodb] (dynamic) | |
[2012-10-31 16:01:59,162][INFO ][river.mongodb ] [Eon] [mongodb][mongodb] No known previous slurping time for this collection | |
curl -XGET 'http://localhost:9200/mongoindex/files/_search?q=*' | |
{"took":70,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment