PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Tuesday the 16th of September, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[04:22:50] <WarAndGeese> sup
[04:23:27] <WarAndGeese> so I have a database on mongohq, now known as compose.io. The important thing is that it's being stored online somewhere. What's the easiest application I can set up that can take data from that database?
[04:48:38] <nomad111> hey all, how should i go about aggregating a set of documents based on numeric ranges of a field such that I get [{_id: ‘0-10’, count: 1}, {_id: ‘10-20’, count: 4}, etc…]
[04:52:55] <Boomtime> @WarAndGeese: hello again, same again, do you have a database (schema/query/update/configuration/requirements) question?
[04:53:55] <Boomtime> You may get some answers regarding people's favourite applications, but they will be entirely opinion
[05:01:33] <Boomtime> @nomad111: interesting problem.. you can construct a $project which modifies the incoming _id to strip off the $mod of 10, then feed that to a $group
[05:01:48] <Boomtime> oh, and sum
[05:01:57] <Boomtime> should take just 2 pipeline stages
[05:02:42] <Boomtime> use a $project first with this: http://docs.mongodb.org/manual/reference/operator/aggregation/mod/#exp._S_mod
[05:03:23] <Boomtime> you'll need a $mod as the second argument to a $subtract
[05:06:06] <nomad111> neat!
[05:06:07] <nomad111> thanks
[05:15:08] <WarAndGeese> fair enough Boomtime
[05:32:12] <sputnik13> is there a way to selectively remove things from a collection when mongodb won't start?
[05:43:16] <Boomtime> @sputnik13: there should be no need for the requirement. how about we focus on why mongodb won't start?
[05:43:51] <sputnik13> because it's a 32bit system and the collection is full
[05:44:29] <sputnik13> and no moving to a 64 bit system is not an option for me
[05:44:39] <Boomtime> ahahahaa
[05:44:50] <Boomtime> sorry, yes, you can do something.. maybe
[05:45:01] <Boomtime> was journaling enabled?
[05:45:08] <sputnik13> I did manage to get it started, I used noprealloc last time but it was insufficient this time
[05:45:16] <sputnik13> specifying --smallfiles let it start
[05:45:30] <sputnik13> I need to use capped collections
[05:45:38] <Boomtime> removing items from a collection does not free space on disk
[05:45:44] <sputnik13> I was meaning to do that and didn't get around to it, and of course it breaks on me
[05:45:58] <sputnik13> Boomtime: I know, I have to free up space now to run repair
[05:46:11] <Boomtime> you will never be able to run repair
[05:46:19] <sputnik13> actually on second thought all the data is gone so I can just drop
[05:46:28] <Boomtime> if you have attmpted to run repair then you might be hosed already
[05:46:43] <Boomtime> dropDatabase will free up space
[05:46:57] <Boomtime> if you have multiple databases then you can split them up
[05:47:39] <Boomtime> as an aisde, where did you find a 32bit system to runa database on?
[05:48:14] <sputnik13> arm is all 32 bit
[05:48:26] <Boomtime> mongodb does not run on arm
[05:48:43] <sputnik13> my ubuntu arm setup begs to differ
[05:48:45] <sputnik13> :-)
[05:48:53] <sputnik13> mongodb does not run on armv7
[05:48:57] <sputnik13> it runs fine on armv8
[05:49:26] <sputnik13> wait I got my numbers mixed up
[05:49:32] <Boomtime> i read "runs fine" as "runs like crap"
[05:50:00] <sputnik13> it doestn' it doesn't run on armv6
[05:50:05] <sputnik13> runs fine on armv7
[05:50:17] <sputnik13> won't even compile on armv6
[05:50:26] <sputnik13> it runs fine except for the 32bit limit
[05:51:01] <Boomtime> and the penalty of nearly every read being misaligned and costing upwards of 4 reads on the arm
[05:51:11] <Boomtime> i.e run like crap
[05:52:08] <Boomtime> so anyway, i don't think you have a problem, and any you do have is largely your own :-)
[05:52:58] <sputnik13> right, so while I appreciate your willingness to help, I also don't have much time to sit here and be criticized on my platform choice without any attempt to understand what I'm working on
[05:53:17] <sputnik13> thanks
[05:53:35] <Boomtime> heh
[05:54:54] <ianblenke> sputnik13: Eventually Apple is going to merge iOS and OS/X and go entirely ARM for macs. We're all mostly running on borrowed intel time until then ;)
[05:58:13] <sputnik13> ianblenke: arm can't keep up with intel on single threaded performance, so I think it's questionable whether that day will really come, and good luck getting enterprises to switch... that's where a great majority of the money still is
[06:00:25] <sputnik13> besides, intel isn't exactly sitting still with low power atoms... I like arms for what they are right now, but my quad core cortex-a15 can't hold up to a nearly 7 year old core 2 duo just running linux + openbox
[06:00:36] <ianblenke> true. here's to hoping.
[06:00:55] <sputnik13> not even talking about compiz and all that, just openbox with conky
[06:02:06] <sputnik13> ianblenke: I'm with you there, I think it would be great if they pulled it off, but my latest experience trying to use a linux desktop environment has me doubting
[06:03:29] <ianblenke> It's unfortunate that Gnome4 and KDE5 are so horrible.
[06:04:07] <sputnik13> I rather like openbox, crunchbang has made me a convert
[06:04:44] <sputnik13> I still use osx for most of my work, but crunchbang would be hands down my first choice for a linux desktop env
[06:52:16] <fusillicode> hi guys
[06:52:54] <fusillicode> quick question: does mongoid supports the overriding of a relation?
[06:53:43] <fusillicode> or better: can I alias a relation that I have defined in a parent in a subclass?
[06:55:32] <fusillicode> I mean, if I create a relation in a parent class and I want that this relation shouldn't be explicitly used in a subclass but can be used through an alias how can I do it?
[07:03:52] <Boomtime> @fusillicode: you will be lucky to get a response here, try #mongoid or #ruby since that is where your question is relevant
[07:04:49] <fusillicode> Boomtime: thanks for the hint, I'll try in those channels :)
[07:05:00] <fusillicode> Cheers ;)
[09:18:54] <oznt> hi
[09:19:14] <oznt> does somebody here use mongodb on debian?
[09:35:52] <vrkid> hi, is it possible to setup mongodb (2.6.4 enterprise) to authenticate against PAM on a RHEL 6.5?
[14:44:07] <oznt> hi guys, how do I stop a master in a replica set? even if this master has no secondaries?
[15:13:22] <Sagar> Hello, can anyone help me what could be wrong?
[15:13:22] <Sagar> http://pastie.org/9559112
[15:15:11] <kali> Sagar: you're aware mongodg-10gen is for old 2.4 packages ? you want mongodb-org for 2.6
[15:15:11] <cheeser> looks like maybe you have another package installed that owns that file path
[15:15:47] <Sagar> so what should i do?
[15:16:04] <Sagar> since i want the latest version 10gen 2.0.6 is old i think
[15:18:07] <cheeser> 2.0.6 is crazy old
[15:18:30] <Sagar> yeah. i need the new one
[15:18:49] <cheeser> remove the old. install the new. ?
[15:21:47] <Sagar> also
[15:21:47] <Sagar> http://pastie.org/9559137
[15:25:08] <Sagar> cheeser: http://pastie.org/9559144 && http://pastie.org/9559137
[15:28:12] <cheeser> yes, i saw those. i'm not much of a debian guru so I don't know what else to tell you.
[15:32:35] <shingshang> ahem, gentlemen, how does one move from a mongodb to parse.com's or heroku?
[15:32:41] <shingshang> can someone point me to the right direction?
[15:34:51] <ayprograms> hi everyone this id my first time here. just started a project with mongodb on java
[15:36:11] <ayprograms> i have this problem of checking if a query returns no value with the java driver for mongodb, i keep having this null pointer exception
[15:40:41] <Sagar> How can i disable annonymouse login for users?
[15:44:33] <cheeser> ayprograms: pastebin your code.
[15:45:38] <ayprograms> cheeser: i am using this function
[15:45:42] <ayprograms> public boolean checkEmail(User u) { DBObject query = BasicDBObjectBuilder.start() .append("email", u.getEmail()).get(); DBObject data = this.col.findOne(query); if (data == null) { return false; } else { return true; } }
[15:45:50] <cheeser> pastebin, please.
[15:45:58] <EmmEight> seriously pastebin come on
[15:45:58] <cheeser> hard to read code in irc like that.
[15:46:09] <ayprograms> sorry
[15:46:40] <Sagar> also how can i change the password and username of admin
[15:47:47] <cheeser> Sagar: http://docs.mongodb.org/manual/tutorial/change-user-password/
[15:47:55] <cheeser> http://docs.mongodb.org/manual/tutorial/add-user-administrator/
[15:48:05] <Sagar> cheeser i have 2.0.6
[15:48:07] <Sagar> -org
[15:48:11] <cheeser> ok.
[15:51:48] <Sagar> Sorry losing connection
[15:52:06] <Sagar> cheeser: how can i disable anon login and change admin pass?
[15:52:29] <ayprograms> cheeser: i just did, what do u need to view the code?
[15:52:47] <cheeser> ayprograms: the url would help
[15:52:58] <cheeser> Sagar: those docs cover user administration
[15:53:12] <Sagar> but what for 2.0.6?
[15:53:27] <ayprograms> cheeser:http://pastebin.com/22ULuEpL
[15:54:34] <cheeser> Sagar: no idea. that's a bit too old.
[15:54:52] <Sagar> how can i upgrade to 10gen from 2.0.6 on debian wheezy?
[15:55:32] <cheeser> this maybe: http://docs.mongodb.org/manual/release-notes/2.4-upgrade/
[15:55:35] <cheeser> ayprograms: and the problem is what?
[15:56:48] <ayprograms> cheeser: i get null pointer exception from the if() conditoin checking if the result is null
[15:57:48] <cheeser> no, you don't.
[15:58:13] <cheeser> that line can't get an NPE
[15:59:23] <wayne> how would i query documents that have a key called "field"?
[15:59:38] <cheeser> depends on what you're trying to do.
[15:59:46] <wayne> e.g. {field: "one"}, {field: "two"} should both turn up in my query
[15:59:57] <wayne> i don't care what the values are
[16:00:05] <cheeser> db.collection.find({field : "some value"})
[16:00:23] <wayne> wouldn't that only return documents with field set to "some value"?
[16:00:30] <cheeser> yes, it would.
[16:00:36] <cheeser> you just want them to *have* the field?
[16:00:42] <wayne> i want to be agnostic of the values
[16:00:43] <wayne> yes.
[16:00:49] <cheeser> $exists
[16:01:06] <wayne> so
[16:01:16] <wayne> db.col.find({field: "$exists"})?
[16:01:47] <Derick> db.co.find( { field: { $exists: true } } );
[16:02:55] <Sagar> Derick: how can i disable anon login in mongo 2.0.6 and change pass of user admins or add any user admin
[16:16:00] <Sagar> Failed to connect to: mongo.mindfreakers.net:27017: Connection refused
[16:16:02] <Sagar> ?
[16:20:17] <Sagar> Failed to connect to: mongo.mindfreakers.net:27017: Connection refused
[16:20:17] <Sagar> ?
[16:20:28] <sputnik13> Sagar: what about it
[16:20:43] <sputnik13> you might have better luck if you actually asked a question
[16:20:45] <Sagar> server not running
[16:20:54] <Sagar> let me check the logs
[16:22:44] <Sagar> sputnik13: http://pastebin.com/11AsVPkn
[16:24:27] <sputnik13> line 13 says it all
[16:24:41] <sputnik13> it can't get the lock, check that path
[16:24:55] <sputnik13> make sure it's writable by whatever user you're running mongo as
[16:28:31] <Sagar> sputnik13: http://pastebin.com/qejey5ir
[16:28:39] <Sagar> server now runs still getting connection refused
[16:28:58] <sputnik13> see line 36
[16:29:03] <sputnik13> it's binding to 127.0.0.1
[16:35:30] <Sagar> Great worked thanks :)
[16:35:50] <sputnik13> yw
[16:41:03] <Sagar> sputnik13: how can disable anon login to mongodb?
[16:43:28] <cheeser> http://docs.mongodb.org/v2.4/core/access-control/
[16:43:53] <sputnik13> aww, I was just about to paste the lmgtfy link
[16:46:01] <cheeser> :D
[16:50:52] <ayprograms> cheeser: thanks i figured out the problem
[16:51:14] <ayprograms> used another method
[16:53:25] <balfour> Anyone here use mgo? Having a hard time putting together a between query. since the bson.M is a map[string] I can't have both $gt and $lt for the field key
[17:39:52] <_trev> Hi all. Can someone tell me if 'covered queries' using find will remain covered if I used findOne instead? Additionally, is performance increased/decreased?
[17:45:17] <rmkbow> quick question, how do I find the currently set balancing window for a mongoshard setup? db.locks.find( { _id : "balancer" } ).pretty() gives me a "when" but I want to know the start and stop times?
[17:46:32] <_trev> scratch that looks like findOne works fine,,though I still wonder if it's more performant
[17:56:56] <diegoaguilar> Hello I really need urgent help to secure my mongodb server
[17:57:13] <diegoaguilar> I need to avoid remote connections except for two password secured databases
[17:58:19] <haploid> firewall
[18:02:05] <cheeser> firewall + auth should cover it.
[18:09:41] <tjbiddle> Morning all. I'm having some trouble with the Ruby 1.11.1 mongo driver. I only have one version of ruby installed, 1.8.7, and i'm calling the correct binary. I'm using irb and when I require 'mongo' it works fine, but when I `include Mongo` it says uninitialized constant Mongo
[18:40:18] <willkara> Hey guys and gals. I have a question about the usage of bulk operations. I am logging sessions for an app to the database as a logging application and I can easily create them (just a bunch of bulk inserts) but the problem I am having is updating them to set another field when the session is over. Each record in the sessions collection has a startTime and endTime field. When the sessions ends I need to update the endTime field.
[18:40:50] <willkara> Is there a way to have bulk updates like the inserts with "initializeUnorderedBulkOperation()"
[19:19:22] <EricL> If I have 3 replicas in a shard in AWS us-east1{a,b,e}, do I need to have an arbiter?
[19:19:43] <EricL> It would seem to me that if I lost 1 of the SECONDARY machines, I would end up with a leader election problem.
[20:01:37] <taxen> Hey everyone
[20:01:39] <taxen> Which mongodb driver should I pick to use with Node.js?
[20:03:49] <cheeser> mongoose, yeah?
[20:04:03] <cheeser> or this: http://docs.mongodb.org/ecosystem/drivers/node-js/
[20:06:43] <taxen> yeah Mongoose seems best
[20:07:08] <taxen> could you point me to a good tutorial for getting started with that and Express 4?
[21:16:12] <sailias> is there some magic setting to make mongo not slow down on inserts? 10 concurrent connections, each doing 100 inserts 10 times. So a total of 1000 inserts, the CPU goes to 100% on all cores, and they freeze and end up taking 70 seconds to complete each 100 inserts
[21:16:28] <sailias> db lock percentage is < 0.5%
[21:42:37] <BlakeRG> is it possible to run three instances of a config server on the same machine just on different ports?
[21:42:54] <crunch-choco> i would like to like table user to table company, i m used to do it with id and foreign key with SQL. what should it look like with mongo?
[21:45:46] <saml> hello, db.docs.find(...).count() is really slow on secondaries. but real fast on primary. indexes are same. waht's wrong?
[21:45:50] <saml> mongod 2.6
[22:23:44] <fels_zh> hi - anyone here use c# ?
[23:05:35] <MTaco> Hello, anyone have experience using NumberInt() or NumberLong() in MongoDB with Node.js? When I try to use these functions I'm getting a not defined error, any advice?
[23:06:27] <pomke> Hello! I have an object with dates { dates : [day1, day2, day3,...], ...} And I'd like to find all of these objects where ALL days in the dates Array are earlier than today
[23:06:42] <pomke> so, all dates have passed
[23:06:55] <pomke> I'm not sure how best to structure a query like that
[23:09:34] <Boomtime> @MTaco: sorry, i am not very familar with Node.js, however, the Mongo shell is a javascript interpreter so you can use it to test your queries/code there first
[23:16:04] <Boomtime> @pomke: i can't think how to do that with a query, but you can do it with aggregation: http://docs.mongodb.org/manual/reference/operator/aggregation/allElementsTrue/#exp._S_allElementsTrue
[23:17:39] <Boomtime> you'd need to do some chicanery before and after to wind/unwind the array
[23:24:27] <MTaco> @Boomtime: I tried using MongoShell.. but it continues to say NumberInt() is not defined. I'm using require('mongodb'), anything else required to import that function?
[23:26:19] <pomke> MTaco: http://mongodb.github.io/node-mongodb-native/api-bson-generated/long.html
[23:26:50] <pomke> use that for NumberLong
[23:27:04] <pomke> and use javascript's 'Number' type for NumberInt
[23:29:05] <Boomtime> NumberInt should be defined
[23:29:17] <Boomtime> what version of the shell?
[23:30:02] <Boomtime> please just paste NumberInt at a shell (just that) and copy to here what it says