PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Thursday the 31st of October, 2013

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[03:21:18] <SteveDC> Hello all might someone have a moment to spare to assist a new mongodb user?
[03:24:42] <SteveDC> Hello anyone have a minute?
[03:26:43] <LoneSoldier728> hey
[03:27:00] <LoneSoldier728> how do i see how much space something takes in the db
[03:32:18] <joannac> SteveDC: Don't ask you ask; you'll get much better results if you ask your question outright
[03:32:38] <joannac> LoneSoldier728: That doesn't parse. How much space a single document takes? A collection?
[03:37:40] <SteveDC> I have installed mongodb on centos 6.4 from the 10gen and 10gen-server i start the service and it starts with no problem. I then attempt to connect to mongo trys to connect on 127.0.0.1:27017 returns with exception failed to connect. I have shut it down and removed the mongo.lock and done a repair then started mongo attempted to connect again and got the same error might anyone know why this
[03:37:40] <SteveDC> is occuring?
[03:43:46] <joannac> SteveDC: does the mongod.log say anything? ps -ef | grep mongod shows it running?
[03:43:57] <joannac> what's the exact error message you see?
[03:45:43] <LoneSoldier728> yeah, basically trying to store one object
[03:45:46] <LoneSoldier728> with 6 fields
[03:46:37] <LoneSoldier728> can I transfer from a db that belongs to a localhost
[03:46:46] <LoneSoldier728> to a db on a server -- mongohq?
[03:47:32] <joannac> mongodump / mongorestore
[03:48:57] <LoneSoldier728> so i dump it first
[03:49:06] <LoneSoldier728> then i restore it on the new mongodb
[03:50:11] <SteveDC> No there is nothing in the mongod.log at all except for the start or restarts. Nothing showing for failed connections
[03:50:33] <SteveDC> mongod 9569 1 0 23:22 ? 00:00:07 /usr/bin/mongod -f /etc/mongod.conf
[03:50:33] <SteveDC> and this is what i have for running
[03:50:51] <joannac> what's in the conf?
[03:51:01] <joannac> don't paste, use pastebin)
[03:51:20] <LoneSoldier728> if I call .find({field1: key1, field2: key2})
[03:51:30] <SteveDC> all basic installation i have not made any changes to the conf
[03:51:30] <LoneSoldier728> does that make sure that whatever is found matches those two fields
[03:51:38] <LoneSoldier728> or is it an either of the two?
[03:52:19] <LoneSoldier728> joannac am I calling the dump from the mongo cmnd line?
[03:52:28] <LoneSoldier728> the mongod? or mongo.exe?
[03:55:35] <joannac> LoneSoldier728: there's a mongodump.exe
[03:55:57] <joannac> SteveDC: exact string you're typing and exact error message?
[03:57:37] <SteveDC> http://pastebin.com/raw.php?i=X5iQSTen <-- This is the conf file
[03:58:16] <LoneSoldier728> does dump erase it
[03:58:19] <LoneSoldier728> or just create a copy
[03:58:39] <SteveDC> http://pastebin.com/raw.php?i=Kn3FNtY3
[03:59:02] <SteveDC> this is the error
[03:59:10] <SteveDC> all i put in is "mongo"
[04:00:15] <joannac> try mongo localhost:27017
[04:00:21] <LoneSoldier728> http://support.mongohq.com/importing-exporting/local-to-mongohq.html
[04:00:24] <joannac> or mongo 127.0.0.1:27017
[04:00:31] <LoneSoldier728> see I am stuck on the first step joannac
[04:00:41] <LoneSoldier728> where am I creating that tmp folder
[04:00:48] <LoneSoldier728> because I cannot create it in bin
[04:00:50] <LoneSoldier728> or mongodb
[04:00:59] <joannac> LoneSoldier728: anywhere
[04:01:05] <joannac> it's a tmp folder
[04:01:12] <joannac> also, gtg
[04:19:08] <LoneSoldier728> how do find out my current host and port for my mongo
[04:19:10] <LoneSoldier728> db
[04:22:18] <SteveDC> LoneSoldier: are you hosting it on your machine? or did you purchase it on a server
[04:23:42] <LoneSoldier728> i have it local
[04:23:54] <LoneSoldier728> I am trying to import from my local b
[04:23:55] <LoneSoldier728> db
[04:23:59] <LoneSoldier728> to my server on mongohq
[04:24:11] <LoneSoldier728> and i need the host and port from my local
[04:24:18] <LoneSoldier728> when running mongod.exe on my local
[04:24:33] <LoneSoldier728> it says host=MyName and port: some numbers
[04:24:38] <SteveDC> localhost:27017
[04:24:40] <LoneSoldier728> but it does not connect
[04:24:53] <SteveDC> 127.0.0.1:27017
[04:25:09] <SteveDC> unless you changed the port in the mongo.conf
[04:25:14] <LoneSoldier728> i didnt
[04:25:16] <LoneSoldier728> that is the port
[04:25:20] <LoneSoldier728> is it 127
[04:25:25] <LoneSoldier728> or is it localhost?
[04:25:57] <SteveDC> 27017 is the default mongo port, but documentation also says 28017 can be the default port to
[04:26:12] <SteveDC> 127.0.0.1 refers to localhost machine
[04:27:51] <LoneSoldier728> and if i never specified a username or
[04:27:57] <LoneSoldier728> password do i just ignore those parts
[04:28:10] <LoneSoldier728> mongodb://[username:password@]host:port/database_name
[04:28:15] <LoneSoldier728> this is what mongohq expects
[04:28:16] <flyankur> If I have ObjectId, Is it possible to fetch its document without knowing its collection ?
[04:28:46] <LoneSoldier728> I am trying mongodb://127.0.0.1:27017/musicDB
[04:29:27] <flyankur> Lets say If i have a "product" collection, which has a field reference to another collections - "store" & "category"( like foreign key ) - I am using node.js & native mongodb driver. While iterating If i have ObjectID("52710f953564d744923a2f64"), how do I fetch its document, without knowing to which collection it belongs ?
[04:29:41] <flyankur> Example - https://gist.github.com/flyankur/7244345
[04:33:59] <SteveDC> mongodb://mongo_admin:AxB6_w3r@localhost/musicDB
[04:34:35] <SteveDC> or mongodb://mongo_admin:AxB6_w3r@127.0.0.1:27017/musicDB
[04:35:31] <SteveDC> gtg gl
[04:36:58] <LoneSoldier728> thanks
[05:00:08] <LoneSoldier728> http://support.mongohq.com/importing-exporting/local-to-mongohq.html
[05:00:20] <LoneSoldier728> anyone know how to run this correctly I am having trouble with the last part
[08:27:54] <[AD]Turbo> hi there
[08:54:54] <flyankur> If I have ObjectId, Is it possible to fetch its document without knowing its collection ?
[09:01:11] <NodeX> no
[09:30:21] <flyankur> NodeX: Please have a look at this example of 2 documents from related collections - https://gist.github.com/flyankur/7244345 , If while iterating through product, I want to get each ObjectID's details too - How should I do, as I don't know what collection to this ObjectID is from.
[09:32:43] <flyankur> Like, Django has an ORM for RDBMs, If I query product model, I can get product.store.name & the whole store model also , but in NoSql, I am getting product, product.store._id only, not the whole store document.
[09:33:07] <flyankur> NodeX: please help, Am i writing the schema for MongoDb wrong ?
[09:37:57] <joannac> What do you mean, you don't know what collection it's from?
[09:38:15] <joannac> Are you going to have more than one store collection?
[09:38:21] <joannac> flyankur: ^^
[09:38:43] <flyankur> jonaswouters: yeah, I am generating a form by reading the bson
[09:39:11] <flyankur> jonaswouters: check this - http://easeyourshop.com:8082/db/eysapp/product/52710f953564d744923a3005
[09:39:47] <flyankur> can you see ObjectID everywhere where there is a reference to a document from other collection.
[09:39:55] <joannac> Yes.
[09:40:11] <joannac> You'll need to make another round-trip to retrieve those
[09:40:14] <flyankur> Instead of ObjectId("234234234234"), I want to display the name of may be make it clickable.
[09:41:06] <joannac> Make another query to the stores collection, by store_id
[09:41:12] <flyankur> I am ok with that, but unable to figure out. Tried brute force, looped over all collections & did findone. Have a feeling thats not the right ways.
[09:41:45] <joannac> why do you need to loop over all collections? it's a store_id
[09:42:15] <flyankur> How do I know, which collection ( store, category, etc ) I am quering for ?
[09:42:57] <flyankur> joannac: please bear with me, this is my 8th day with Mongodb & node
[09:43:03] <joannac> either code it in (preferred), or use DBrefs
[09:44:20] <joannac> if(key == "store_id") {mystore = db.store.find({"_id": value})} else if (key == "category_id") {...}
[09:44:33] <flyankur> joannac: So, I am right then, with just the Bson ( which includes ObjectID ) while iterating through it, Either I have to store collection type along with it or use DBref ?
[09:44:54] <joannac> if you want to store collection names with it, you need a DBref
[09:45:35] <flyankur> In case of DBref, I dont need to hardcode in the code the to figure out collection ?
[09:46:21] <flyankur> This approach, if(key == "store_id") {mystore = db.store.find({"_id": value})} else if (key == "category_id") {...} - Does not look scalable in my case.
[09:47:31] <joannac> I guess, depends how many of these refs you have
[09:48:21] <flyankur> Imagine If I am creating PhpMyadmin Kind of a tool for MongoDb, I will need DBref.
[09:50:28] <joannac> The docs recommend against DBRef, if that sways you any
[09:50:30] <flyankur> joannac: I am building a generic Admin tool/ UI for MongoDb which provides form to edit any document, rather that just plan document Bson - which is not easy to edit / use for a non-tech content team
[09:51:37] <flyankur> joannac: yeah, I read that , I guess that is why there is no Admin tool for Mongodb which provides better/usable CRUD interface
[10:05:37] <NodeX> flyankur what are you trying to achieve
[10:06:07] <NodeX> Derick : ping
[10:06:24] <Derick> with you in a minute, just finishing my emails
[10:06:46] <NodeX> oki doki :)
[10:08:03] <flyankur> NodeX: So, current challenge I am facing in a project is - I need to give UI to the content team who is using this app I am building on Node.js & Mongo ( PHPMYADMIN type ) - where the content team can just see records & when they want to edit it - it opens up in a more intuitive interface - a Form
[10:09:35] <flyankur> NodeX: I am using https://github.com/flyankur/mongo-express as my boilerplate, have been able to Edit doc UI to - http://easeyourshop.com:8082/db/eysapp/product/52710f953564d744923a3005
[10:11:30] <NodeX> and what's the problem so far?
[10:13:12] <flyankur> currently the problem I was facing was, all the reference field are coming as ObjectID(52710f943564d744923a2f59),etc - which is again not human readable - So I want to replace that with its lets say - category.name or store.name - because I want to make it generic, I don't want to hardcode in Node.js app - like if(key == "store_id") {mystore = db.store.find({"_id": value})} else if (key == "category_id") {...}
[10:14:33] <NodeX> why don't you just store the collection name?
[10:15:45] <NodeX> and why are you relating categories instead of embedding them>
[10:15:47] <NodeX> +?
[10:17:37] <flyankur> Ok, so there is something called embedding too.. I did not knew that ( I am sorry, Its my 8th day with Mongodb ) - Looking into it quickly & will get back to you
[10:20:33] <flyankur> NodeX: as far as I read just now, are you suggesting I should not have multiple collections ( eg. category, sub-category ), rather just embedded.. I want to keep category, stores as seperate collection as well
[10:20:42] <NodeX> no
[10:21:10] <NodeX> you keep a "category" collection but embed the name of the cateogry rather than its ObjectId
[10:22:05] <flyankur> got it.
[10:22:48] <flyankur> NodeX: On the similar note - how does Joins type data handling work then - for me to achieve that I will have to embed the whole document ?
[10:23:12] <NodeX> avoid joins as much as possible
[10:27:54] <flyankur> NodeX: you mean store/embedd as much data in one document - does not matter if its duplicated ?
[10:30:06] <flyankur> NodeX: so as to avoid joins ^
[10:31:46] <joannac> then your updates will be more work
[10:32:50] <NodeX> flyankur : the basic concept is this... if you can make your page load with 1 query this is optimal. However, there is administration which has to be done to pages / data but it's accessed less frequenctly
[10:33:18] <flyankur> NodeX: there are long list of cases where joins are very much required. Specially in an E-commerce app ( should I query - may be using Elasticsearch or something ), if so RDBMS has an advantage in e-commerce use-case , where I need to generate all sort of reports , apply filters
[10:33:39] <NodeX> for example. If you had a document with a users "country" - some people (lunatics) would probably relate that to another table/collection but lets be honest how often does the name of a country change
[10:34:26] <NodeX> Obviously there are edge cases where joins are needed and it's not avoidable.
[10:35:12] <chukaman> hi. i have a question. if i'm running on ubuntu 10.04.4 lts and i use the official 10gen "ubuntu-upstart" repo should i be weary about upgrading a cluster comprising of 2x mongos, 3x conf servers and 4x shard servers with a replica set spanned across all of those shard servers from mongodb version 2.0.7 to version 2.4.7?
[10:35:15] <NodeX> it really does depend what your end goal is for using mongodb and why you're using it
[10:35:17] <flyankur> NodeX: what if I want list of all countries , or country with maximum number of lunatics :)
[10:35:36] <NodeX> flyankur : I didn't say that you dont have a collection with the list in it ;)
[10:35:51] <flyankur> NodeX: I get your point :)
[10:36:02] <NodeX> and secondly for the maximum you can aggrgate that quite easily without a join :)
[10:36:35] <NodeX> performance carries a penalty, in this case it's duplication of data and more work on administrating that data
[10:37:17] <flyankur> NodeX: True that.
[10:38:25] <flyankur> NodeX: what kind of use case(s) do you use mongodb in ?
[10:38:58] <NodeX> For me disks are cheap so data duplication is not an issue and I have been working with mongo for so long it's second nature to write code in a way that makes manegemtn easier
[10:39:40] <joannac> chukaman: you'll need to upgrade to 2.2, then 2.4. Take backups. Take downtime. Go to 2.4.6, there's a problem with config servers on 2.4.7 which is being fixed
[10:40:16] <NodeX> flyankur : almost anything you can think of. CMS, CRM, Job Board, Social Network, Dating sites
[10:40:48] <NodeX> I don't use relational databases at all except when I need to do a transaction that might need a rollback which is not often at all
[10:41:00] <chukaman> joannac: wow, thanks for that. i'm really glad that i asked :)
[10:41:14] <flyankur> NodeX: I have felt the breeze of less complexity too, I also use mongo with Django - and now there are not more migrations & what not :)
[10:41:49] <NodeX> I am finding that I can do things now that really are not possible with relational systems
[10:42:18] <flyankur> joannac, NodeX can I have your github username ?
[10:42:30] <NodeX> I don't have a github account
[10:42:34] <flyankur> I would love to go though the code
[10:42:45] <NodeX> it's all closed source sorry ;/
[10:42:48] <flyankur> NodeX: cool.
[10:43:17] <NodeX> we're hoping to open source it one day - when it gets a clean up!! - I write messy but efficient code haha
[10:43:59] <flyankur> NodeX: yeah, same here.. although, I am working on efficient part too :P
[10:44:09] <flyankur> NodeX: where do you work ?
[10:44:46] <NodeX> run my own company
[10:44:51] <NodeX> nodex.co.uk <---
[10:46:27] <flyankur> NodeX: Great :)
[10:48:14] <NodeX> you mentioned ElsaticSearch for searching. Personaly we use solr, I find it a lot more mature as a project, nothing against elastic search though
[10:50:13] <flyankur> NodeX: I also use Both, Solr is definitely more mature ( I use it here - thefingo.com ), But in some particular usecases I figured elasticsearch might just be better.. still experimenting though
[10:50:25] <Derick> NodeX: sorry... still not done!
[10:51:15] <NodeX> It's ok Derick : I have found some more information
[10:51:33] <NodeX> good news, it's the mongodb installation, bad news, I don't have a clue how to fix it
[10:52:33] <joannac> WHat did you break, NodeX? ;)
[10:52:57] <NodeX> Installation of 2.4.6 now 2.4.7 is screwed
[10:53:13] <NodeX> unless i start it as the root user or fork it the thing wont start
[10:53:35] <NodeX> https://gist.github.com/anonymous/7247774 <---- that error
[10:54:04] <NodeX> and when it does start it causes some weird error with the PHP driver by giving out jibberish as the db host name or somehting
[10:54:26] <NodeX> yet I can connect via the shell fine and it ingests data (it's a slave) with no problems
[10:56:14] <NodeX> 3 other slaves on the same kernel work fine, this one doesn't. All installed in the exact same way too
[10:58:32] <Derick> NodeX: As a hunch - looks like issues with linking against boost - perhaps linked against an older version of the lib, or perhaps with the wrong header files
[10:58:44] <Derick> NodeX: but the driver still should not segfault on broken data
[10:59:33] <NodeX> any suggestions on fixing ? .. update boost maybe?
[11:00:25] <Derick> :S dunno
[11:00:31] <Derick> i've never seen that error before
[11:00:34] <Derick> I'm just guessing
[11:00:44] <NodeX> https://gist.github.com/anonymous/7247858
[11:01:08] <Derick> same on the other machine?
[11:01:12] <NodeX> I've googled the error and a few other people have had it. It seems it's something to do with the kernel
[11:01:28] <NodeX> no the other machines are fine, this is the weird thing. they all have the same kernel image on them too
[11:03:22] <Derick> k, burn the server and rebuild it :)
[11:03:44] <NodeX> I wish, it's my clients mail server too :/
[11:04:21] <NodeX> I even purged mongod today and apt'd a new 2.4.7 but it's the same
[11:39:56] <benjamin___> I have a dataset consisting of addresses and geojson Points. I'd like to be able to do a query to find addresses near a particular address. I've got as far as being able to specify coordinates to search near, but not a single query. In SQL I'd use a join; is this something I can achieve with a compound index?
[11:42:42] <NodeX> have you looked at the geo capabilities of mongodb?
[11:43:48] <Derick> benjamin___: you need to do two queries. The first to find the address that you want to search near, and the second one to do the near query that you've already described
[11:44:12] <benjamin___> NodeX, yes I have done that
[11:44:52] <benjamin___> OK Derick, thanks, I was just wondering if there was a specific way. I'll continue to do it in that way then, thank you for clearing this up
[12:29:18] <bartzy> Hi
[12:29:19] <bartzy> What is the difference between mongodump and mongoexport ?
[12:30:02] <ron> didn't we go over that yesterday?
[12:33:54] <amitprakash> Hi, is it possible to ask mongodump to dump a database for which records created are a day or less newer/
[12:34:11] <amitprakash> since ObjectIds are based on timestamp, this should be a doable query for all collections
[12:36:38] <NodeX> amitprakash : there is a -q paramter which takes a query
[12:37:12] <amitprakash> Right.. but queries target a single document, I want mongo to query every single collection
[12:37:42] <NodeX> http://docs.mongodb.org/manual/reference/program/mongodump/#options
[12:38:03] <NodeX> no, it queries to target anyting you specify
[12:39:00] <amitprakash> NodeX, okay, and how do I specify a query to check that ObjectId to some gt datetime?
[12:39:46] <NodeX> you need an ObjectId that represents that date time
[12:42:01] <amitprakash> NodeX, one last clarification.. mongodump -d DB -q "{_id: {\$gt: <RelevantOidForDatetime>}}" will dump all collections in db after executing that query against each collection?
[12:42:32] <NodeX> try it and see ;)
[12:42:58] <amitprakash> I am going to, but on the prod servers so don't want to task the servers heavily :D
[12:43:13] <NodeX> I have never tried it that way, I have always loop the collections and add the query to -c
[12:43:19] <NodeX> looped*
[12:44:02] <NodeX> I would be interested in the results if it does work
[12:44:32] <amitprakash> heh
[12:44:38] <amitprakash> how do I convert dt to oid :P
[12:44:45] <amitprakash> its easier the other way around :D
[12:44:55] <NodeX> you can't. You need one that was made at the time
[12:45:31] <amitprakash> a'ight
[12:45:32] <NodeX> For example you might have a backups collection. You create an OID now and insert it as a job, next time you can take that OID as a base
[12:45:45] <NodeX> when backup is done, add the next oid, rinse and repeat
[12:46:31] <NodeX> infact you would have to add the new OID before starting the export as you might have inserted data between the two that wont get backed up
[12:47:14] <amitprakash> fair point
[12:48:00] <NodeX> it's a pretty enat way of creating incremntal backups BUT it doesn't backup changes that might pre-date the oid
[12:48:29] <NodeX> for that I add a "last_updated" field as an OID
[14:11:59] <eldub> when I create a new database ona primary in a replica set, shouldn't I see the same db created on the 2 secondaries?
[14:12:55] <eldub> I see it now
[14:13:24] <eldub> My other confusion is when I do a show dbs -- I have a "local" that is 10GB -- which I never created
[14:40:02] <kali> eldub: local is the housekeeping db for replia
[14:41:04] <eldub> kali I see. That seemed like a lot
[14:41:30] <eldub> kali is there a term I can search to learn more about it?
[14:42:05] <kali> eldub: http://docs.mongodb.org/manual/faq/storage/#why-are-the-files-in-my-data-directory-larger-than-the-data-in-my-database start there
[14:43:04] <rickogden> hi all, got a little database design problem
[14:43:21] <rickogden> does anyone have any suggestions for storage of opening hours in mongodb?
[14:43:38] <cheeser> huh?
[14:44:01] <eldub> ok thank you
[14:53:04] <NodeX> I would say store when the shop opens and when it closes
[14:53:24] <NodeX> then you will have succesfuly stored the shop' opening hours
[14:57:35] <dasmith91> Hi everyone, I'm getting started with Mongo and MongoEngine and was wondering if someone could advise me on how to structure data? (Still thinking like I'm using SQL)
[14:57:52] <jkbbwr> \w 4
[14:58:27] <dasmith91> I've got a setup like this: https://gist.github.com/dasmith91/b432f1440d24e690f9da
[14:59:05] <dasmith91> This crashes as User isn't defined on line 11, however switching the classes results in the script crashing as Post is then not defined.
[15:12:27] <rickogden> NodeX: yeah, I was thinking that, an opening and closing time for each day. Just wondered if there was a good way of storing it so I could write a query for shops open at a specific datetime?
[15:13:50] <cheeser> there isn't a raw time type, no. you'd still have a date component
[15:14:12] <cheeser> though you might be able to use aggregations to apply time functions to those dates.
[15:21:28] <eldub> I currently have a 3 node replicaset configured
[15:21:49] <eldub> when I do an rs.status() I noticed that my db1's name is it's IP address and the other 2 have their host name
[15:22:05] <eldub> How can I change the one from IP to host name, without breaking the replicaset.
[15:22:14] <eldub> s/./?/g
[15:24:02] <rickogden> cheeser: thanks
[15:26:31] <eldub> I just want to change 1 field from IP to host name ;x
[15:31:41] <eldub> http://docs.mongodb.org/manual/tutorial/change-hostnames-in-a-replica-set/ -- in case anyone else was curious
[15:33:16] <LoneSoldier728> hey anyone work with mongohq?
[15:33:37] <cheeser> i've loaded their website once or twice.
[15:34:00] <LoneSoldier728> how do I move a db from my localhost
[15:34:06] <LoneSoldier728> to their site
[15:34:15] <LoneSoldier728> i tried import database
[15:34:31] <LoneSoldier728> but it isn't working...
[15:36:54] <eldub> LoneSoldier728 you used mongohq to abckup the db?
[15:37:11] <LoneSoldier728> I am using it to host my db on my server with heroku
[15:37:40] <eldub> LoneSoldier728 I see. I'd be able to help with a backup / restore but never with your method
[15:38:36] <LoneSoldier728> i tried the whole mongodump
[15:38:39] <LoneSoldier728> and mongorestore too
[15:39:12] <eldub> have you tried just copying the dbpath?
[15:39:31] <LoneSoldier728> what do you mean by copying it
[15:39:50] <LoneSoldier728> there is my db on mongohq
[15:40:04] <LoneSoldier728> and then the db on my local machine
[15:40:08] <eldub> yea I dont know anything about mongohq so I guess I wouldn't be of much help
[15:40:37] <LoneSoldier728> I have a tmp folder in my mongodb/bin/tmp
[15:40:42] <LoneSoldier728> that has the bson and json files
[15:40:47] <eldub> can you pastebin your mongodb.conf?
[15:40:52] <eldub> you should have a field in there that says dbpath =
[15:41:20] <LoneSoldier728> i never edited a .conf how do i look it up
[15:41:31] <eldub> should be in /etc/mongodb.conf
[15:41:31] <LoneSoldier728> i know i have the default settings like port 27017
[15:41:36] <LoneSoldier728> and 127.0.0.1
[15:41:39] <eldub> should be in /etc/mongodb.conf
[15:43:07] <LoneSoldier728> looking in my mongodb/bin folder
[15:43:15] <LoneSoldier728> dont see anything with mongodb.con
[15:44:16] <LoneSoldier728> damn haev to go to dentist but ill try to figure it out when i get back
[15:44:54] <eldub> what os?
[16:42:47] <acalbaza> real quick question... how does the client shell know about hosts in a cluster? if i test failover, it works as expected, but when i do the same thing in an application, it does not.
[16:43:16] <Derick> the shell, as well as all the drivers (providing you use the correct mode) will all detect failovers
[16:43:28] <Derick> it uses "ismaster" to figure out which other nodes there are
[16:44:18] <acalbaza> ok.. i'm working with spring-data + mongo so i need to understand how to configure this client.
[16:45:26] <cheeser> /8/11
[16:59:37] <acalbaza> wondering if auto-connect-retry is what i need to supply in order to get this behavior
[17:36:51] <astropirate> Hello friends
[17:37:00] <astropirate> With node.js if i set a value to undefined
[17:37:07] <astropirate> and save that value as part of a document into mongo
[17:37:16] <astropirate> does mongo save that as a null instead of undefined?
[17:48:38] <tbjers> astropirate: what driver are you using?
[17:50:31] <Number6> tbjers: One would assume NodeJS
[17:50:55] <tbjers> astropirate: what's in your package.json, what node.js mongodb module are you using?
[17:51:55] <tbjers> @Number6: if he's using the raw node.js driver, yes, he could have mongoose installed, what do I know?
[17:52:54] <tbjers> @Number6: I guess that's technically not a driver, but I meant what module was he using
[17:53:01] <Number6> tbjers: You'd make an ideal support person - never assume :-)
[17:53:26] <tbjers> @Number6: been there done that :-) Always start at the beginning
[17:58:17] <cheeser> did you try turning it off then back on again?
[18:00:56] <tbjers> Jiggle the cable.
[18:01:13] <tbjers> Or, in this case, what's in your package.json?
[18:31:09] <rafaelhb_> is a $gte search on _id covered by indexes?
[18:33:03] <kali> yes
[18:33:26] <adamobr> copydb will copy my indexes too ?
[19:07:13] <tkeith> I set up a replica set using hostnames instead of localhost, but I need localhost. It seems like the simplest solution would be to complete remove the replica set config from mongodb and create it again. I don't have any data I need. How can I completely reset mongodb? Can I just clear /var/lib/mongodb, or will that have bad side effects?
[19:08:36] <revoohc> How does mongodb deal with timezones? Is it safe to move replicate to a server running UTC when the current master is EST/EDT?
[19:09:24] <kali> revoohc: what os
[19:09:26] <kali> revoohc: ?
[19:09:32] <revoohc> linux/ubuntu
[19:10:11] <kali> revoohc: unixes servers do not have timezone, they deal with UTC internally, so no problem
[19:41:23] <umi> I'm trying to perform an update inside a forEach loop. The KEY used in the update is part of the foreach object.
[19:42:32] <umi> i.e. forEach(function(cat) { db.stats.update({id: cat.id}, {$set:{cat.type: cat.mouse}})}
[19:42:41] <umi> Mongo complains about cat.type
[19:43:09] <umi> I'm trying to refer to part of the earlier object, and not use a period in the key name, yet it still errors out on me.
[19:43:17] <umi> Any idea how I fix this?
[19:43:57] <umi> I only pasted a snippet of my full query to show the relevant part. If I replace cat.type with a string like 'test', it works, but I don't get the data I want.
[19:47:23] <umi> How can I use a variable as the key in an update?
[19:52:05] <kali> what about: {$set:{cat["type"]: cat.mouse}
[19:57:46] <kali> na
[19:57:53] <kali> javascript really is a poor language
[19:57:58] <kali> umi: var setter = {}; setter[cat["type"]] = cat.mouse; db.foo.update({}, { $set: setter})
[20:01:55] <umi> @kali it complains about []
[20:02:30] <umi> @kali found out if I create an object then I can do that 'var obj = {}; obj[cat.type] = cat.mouse;' then use obj in the set
[20:03:31] <kali> am i lagging ?
[20:05:54] <joannac> kali: Not for me
[20:09:57] <kali> thanks
[20:39:29] <l0st0ne> I have an odd issue, wondering if anyone has some thoughts…. I have a couple thousand missing documents in a sharded/replicated db.collection. When I query a mongos instance using an indexed query (not using fields in the shard key) the documents are not returned. If I run the same query on one of the db instances I find the documents. Anyone seen anything like this? We are on 2.4.3
[20:44:21] <kali> l0st0ne: i have had one like these at some point. i was using a hash-base sharding, and one mongos had been forgotten in a 2.2.x version, so it was writing some documents on the wrong shard
[20:46:41] <l0st0ne> Kali: thanks, we are not using a hash-based shard key, but I was thinking that maybe it was left behind in chunk migration
[20:48:10] <LoneSoldier728> hey
[20:48:17] <LoneSoldier728> where do I call mongodump and mongorestore from
[20:48:23] <LoneSoldier728> mongodb/bin?
[20:58:42] <eldub> anyone know how to edit the init.d of mongo 2.4.6 so it starts up with interleavinga ll
[21:17:41] <joannac> eldub: what have you tried?
[21:18:04] <eldub> well I'm in the init.d right now taking a look around
[21:18:24] <eldub> I'm sure there's somewhere to put the numactl --interleave=all
[21:18:44] <eldub> this seemed promising but is completely different than my init.d http://stackoverflow.com/questions/11161308/starting-mongodb-via-numactl-as-daemon
[22:08:42] <tystr> could having ulimit -n and -u set too low cause disk IO problems?
[22:11:36] <bartzy> Hello
[22:11:37] <bartzy> What is the difference between mongodump and mongoexport ?
[22:11:42] <bartzy> If anyone is here :)
[22:15:35] <joannac> mongodump is raw bson
[22:16:26] <joannac> mongoexport can be json or csv iirc
[22:34:13] <tystr> scary how long it takes to bounce mongod
[22:34:14] <tystr> heh