PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Tuesday the 12th of July, 2016

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[06:34:23] <sumi> hello
[06:50:47] <Boomtime> hi sumi
[06:51:56] <Zelest> morning
[09:57:37] <thapakazi> hi there kurushiyama
[10:00:41] <thapakazi> I am learning by doing the ssl configuration setup for mongodb, till now I am happy with generating and starting mongod with ssl config enabled, following this: https://docs.mongodb.com/manual/tutorial/configure-ssl/ and I am stucked, how do I configure ssl like generating client.pem (if I should do it)... In my instinct, I should be putting some client.pem stuffs (I don't know how to generate one) to my mongoid.yml
[10:00:42] <thapakazi> config. I am trying requireSSL
[10:05:58] <kurushiyama> thapakazi Out of my scope, usually I have closed networks for MongoDB.
[10:10:19] <thapakazi> hey kurushiyama, what does your name implies, its so unique 😄
[10:10:30] <thapakazi> excuse me
[10:11:15] <kurushiyama> thapakazi It is Japanese, as you might have figured, and roughly translates to "mountain of pain"
[10:12:17] <thapakazi> are you from Japan ? 😲
[10:25:41] <thapakazi> Anyof us here use ssl with mongo kindof setup ? please guide me via (if any)
[11:09:58] <kurushiyama> thapakazi No, I am German
[11:10:22] <kurushiyama> thapakazi and a wee bit Japanophile ;)
[11:10:51] <Derick> I'm so going tall you Mountain-of-Pain from now on ;-)
[11:11:02] <Derick> to call*
[11:12:01] <Zelest> </3 Japan :(
[11:12:57] <Derick> why :( ?
[11:13:26] <Zelest> beacuse their lack of love for the oceans :(
[11:55:57] <obiwahn> hi do i have to reset the cursor in wiredtiger when i search for a key in a table?
[12:13:21] <kurushiyama> obiwahn Uhm, what?
[12:31:15] <alexandernst> I have 2 collections and I want to get some documents that should contains fields from both collections. That's why I'm using $lookup
[12:31:51] <alexandernst> $lookup by itself works fine, it returns all the objects from both collections, but as soon as I add another stage to the pipeline, I get only 1 object in the result. Why is that?
[12:36:02] <obiwahn> kurushiyama: i wonder if i have to reset the cursor every-time manually.
[12:38:51] <kurushiyama> obiwahn Why would you? A query returns a cursor. This cursor always refers to the same result set. So yes, if you want to (re)iterate over the same _result_ set, you need to reset it. If you want to include all changed/added and exclude all deleted documents, you should start a new query.
[12:43:38] <obiwahn> so the position of the cursor has no effect on the set key?
[12:43:41] <obiwahn> cursor->set_key(cursor, "foo");
[12:43:55] <obiwahn> or search
[12:44:10] <kurushiyama> obiwahn Uhm, PHP?
[12:44:14] <obiwahn> c
[12:44:21] <obiwahn> http://source.wiredtiger.com/2.8.0/cursor_ops.html
[12:44:21] <kurushiyama> o.O
[12:45:15] <Derick> obiwahn: it's probably better if you email the mongodb-dev google groups list
[12:45:29] <kurushiyama> obiwahn Maybe I do not get what you want to achieve...
[12:46:49] <Derick> obiwahn: https://groups.google.com/forum/#!forum/mongodb-dev
[12:48:58] <jayjo> I'm trying to use mongodb connection string... how can I specifiy my pem file to establish this ssl connection?
[12:49:29] <Derick> which driver?
[12:50:04] <jayjo> mongobi connector
[12:51:38] <Zelest> Derick, what os do you use btw? on your private computer that is
[12:52:10] <Derick> Zelest: I'm on Debian unstable
[12:52:25] <Derick> jayjo: hmm, in that case. I don't know :-/
[12:52:53] <Derick> jayjo: let me check
[12:54:10] <Derick> jayjo: https://docs.mongodb.com/bi-connector/faq/#how-do-i-use-tls-with-the-bi
[12:55:06] <jayjo> I had tried that but I thought the options werent standard connection string params, let me try again
[12:55:29] <Derick> the second example in that section ought to work
[12:56:12] <Derick> ssl_ca_certs=/certs/ca.pem being the important bit
[12:56:15] <Zelest> Derick, ah, what laptop do you use? (if any)
[12:56:24] <Derick> Zelest: lenovo T410 right now
[12:57:42] <Derick> jayjo: or perhaps ssl_certfile
[12:57:57] <Derick> jayjo: AFAIK, you can use all the ones that the PyMongo string understands: https://api.mongodb.com/python/current/examples/tls.html
[12:59:03] <Derick> Zelest: why are you asking?
[13:00:11] <Zelest> my/his
[13:00:36] <Derick> ah
[13:00:43] <Derick> I'd get a newer Thinkpad now though
[13:00:59] <Zelest> ah
[13:01:24] <Derick> the t410 is about 3½ years old
[13:01:39] <Zelest> yeah, looking at one of the X1 Carbon's
[13:01:47] <Derick> probably the t460p
[13:01:56] <Zelest> i wish there was a better graphic though :S
[13:02:04] <Zelest> graphic card*
[13:02:18] <jayjo> I'm running this exact command: mongobiuser create domouser mongodb://<user>:<password>@<db_url>:<port>/<dbName>?authSource=admin&ssl=true&ssl_certfile=/etc/ssl/mongodb.pem and get the output "Enter password: " and when I enter it it says command not found
[13:03:06] <Derick> jayjo: you did fill in the <user> bits with your own, right?
[13:03:23] <jayjo> yes I did - so I guess not *exact*
[13:04:50] <Derick> command not found
[13:04:51] <Derick> hmm
[13:04:54] <Derick> I don't know - sorry
[13:05:10] <jayjo> did you get the same result?
[13:05:36] <Derick> jayjo: I don't have it installed
[13:17:08] <jayjo> Ok I will pivot away from the bi connector for a little bit until I can get a hold of someone at mongo. I have a quick question about the pipeline aggregation... the "_id" field is required in the $group. What is its purpose?
[13:17:43] <jayjo> is this the BY in sql?
[13:18:00] <cheeser> what's the problem?
[13:18:06] <cheeser> and did you file a support ticket?
[13:18:09] <jayjo> with the bi connector or aggregation?
[13:18:14] <cheeser> bi connector
[13:19:00] <jayjo> not yet - I wanted to be sure it wasn't found elsewhere first
[13:19:27] <Derick> jayjo: the _id field is the value you are grouping on. It's the name of the "bucket" you're collecting results in.
[13:31:55] <jayjo> so it is kind of the BY in GROUP BY. I'm trying to group this on "_t", it looks like "_id" is telling it _how_ to group it, but there's no reference to any of the fields.
[13:31:58] <jayjo> https://bpaste.net/show/d614924682f8
[13:32:40] <Derick> what are you trying to group on?
[13:33:12] <Derick> day?
[13:33:44] <Derick> but your input data's fields doesn't link into the aggregation
[13:58:18] <jayjo> Derick: sorry I lost my connection - the field I'm trying to group on is "_t", but I want to group each day, and it is an epoch timestamp
[13:58:44] <Derick> but it's stored as a string?
[13:59:27] <Derick> If you can change that to an ISODate, it's not difficult
[14:00:19] <jayjo> OK I'll focus on that first
[14:01:10] <Derick> aggregate( [ { $group: { _id: { $dateToString: { format: "%Y-%m-%d", date: "$_t" } }, count: { $sum: 1 } } ] );
[14:01:15] <Derick> as an example
[14:25:19] <jayjo> Trying to convert the field to an ISODate, and modified some code that kurushiyama provided as a template. Here is this bpaste: https://bpaste.net/show/72a15d3a8fae But using the mongo shell and specifying the js file doesn't run anything and provides no output (from the console.log() statement)
[14:25:36] <jayjo> I thought using the shell would pass the db variable automatically, is that correct?
[14:26:13] <Derick> jayjo: they are not numbers, they were strings (in your original paste)
[14:26:38] <kurushiyama> jayjo well, I would not trust that. nothing easier than adding a "use <dbname>"
[14:27:55] <Derick> jayjo: as for your db issue: https://docs.mongodb.com/v3.2/tutorial/write-scripts-for-the-mongo-shell/#differences-between-interactive-and-scripted-mongo
[14:28:18] <Derick> kurushiyama: use "name" doesn't work in scripts
[14:28:35] <kurushiyama> @Derick Uhm, I usually c&p those oneshots
[14:28:54] <Derick> kurushiyama: copy and paste, yues
[14:29:06] <Derick> but not when you give the script as argument to the command line
[14:29:31] <kurushiyama> @Derick Aye. Did not really read that part ;)
[14:44:22] <edrocks> kurushiyama: do you know if wired tiger is supposed to use lots of virtual memory?
[14:44:51] <kurushiyama> edrocks Yes, it does.
[14:44:58] <cheeser> the preference is to keep as much in memory as possible
[14:45:23] <edrocks> like using 250GB when I only have around 100GB in data+indexes?
[14:45:28] <kurushiyama> iirc, up to 85% of physical, and as much virtual as possible.
[14:45:33] <kurushiyama> edrocks Depends on your indices
[14:46:05] <edrocks> kurushiyama: at least I'm getting some use out of my ram :)
[14:46:29] <kurushiyama> edrocks A text index over all fields can become quite fast. And yes, that is the idea – there is no good reason to have unused RAM.
[14:46:41] <kurushiyama> s/fast/large/
[14:47:06] <edrocks> kurushiyama: well that would explain things. I made a text index on all of the address related fields for north america from osm
[14:47:22] <kurushiyama> edrocks ... ;P
[14:47:35] <cheeser> haha. that'd do it.
[14:47:51] <kurushiyama> edrocks And then, there is stemming and whatnot...
[14:49:21] <kurushiyama> edrocks I used bleve for search. More granular, lightning fast.
[14:49:55] <edrocks> kurushiyama: does bleve work with that much data?
[14:50:21] <kurushiyama> edrocks There are bolt databases exceeding 1TB. Go figure.
[14:50:30] <kurushiyama> edrocks ;)
[14:50:37] <edrocks> interesting
[15:21:40] <jayjo> because $ is a reserved operator, does it reference the intermediate or original document with $field only in group aggs?
[15:22:22] <Derick> intermediate
[15:22:40] <Derick> ie - it gets updated after each pipeline step
[15:23:10] <jayjo> and that's its sole purpose - to access the previous pipeline doc?
[15:23:11] <jayjo> alright got it
[15:33:56] <crised> Is firebase db based on mongodb or something like this?
[15:40:10] <cheeser> nope
[16:10:25] <crised> cheeser: Do you know which is the most similar db engine to firebase? Please don't tell me offtopic :)
[16:12:30] <cheeser> 1. i don't. 2. offtopic? :D
[16:12:39] <crised> :-D
[16:25:07] <jayjo> so I've found an error here - quite unfortunate. ISODate(doc["_t"]*1000) is giving February 25, 1389 6:00 PM. for example. Using new Date(doc["_t"]) gives 'Tue Jul 12 2016 11:11:48 GMT-0500 (CDT)'
[16:25:24] <jayjo> the latter is correct
[16:27:05] <jayjo> should I not use ISODate() and just use the javascript Date()
[18:40:14] <jfhbrook> so, uhh, funny question: I need to test what happens with my app when mongo starts rejecting reads/writes, like what would happen during a reelection process. Is there a good way to duplicate this on my local without too much heartache (ie, not creating a cluster)?
[18:41:18] <cheeser> https://github.com/10gen/mongo-orchestration
[18:44:44] <jfhbrook> I, uhh
[18:44:46] <jfhbrook> that's *half* an answer
[19:59:11] <n1colas> Hello
[20:40:57] <rangergord> I have a question about the AGPL license. I'm selling an embedded device that internally runs MongoDB for storage (the whole thing runs Ubuntu). Is this allowed under the AGPL, without requiring me to open-source my application code?
[20:42:29] <rangergord> a copyright notice would explain the MongoDB license (and other FOSS tools), and include an offer to distribute source code. This is enough for normal GPL, but I don't know about AGPL.
[20:42:40] <cheeser> 1. you really should have a lawyer if you're selling things. 2. you can *use* mongodb however you'd. however, if you're modifying it or extending it in any way, that'd potentially be a licensing issue.
[20:43:25] <rangergord> cheeser: no mongo modification whatsoever. But the one difference compared to most scenarios, is that instead of the *user* installing Mongo, I did it ahead of time, and it's part of the OS image of the device
[20:43:51] <rangergord> device that I then sell to them (while clearly stating FOSS usage and providing source code for that)
[20:43:52] <cheeser> ianal, but that should be fine. honestly, hire legal counsel.
[20:44:10] <cheeser> a few hundred dollars and you should have the answers you need.
[20:44:47] <rangergord> k
[20:45:32] <rangergord> is there a particular FOSS-savvy lawyer you recommend I contact? since it's a general question, not specific to any jurisdiction
[20:45:43] <cheeser> nope
[20:45:58] <cheeser> except maybe my cousin Vinny
[20:46:23] <rangergord> that's for modern youtz.
[20:46:36] <cheeser> did you just say youtz?
[20:46:44] <cheeser> god that scene still kills me.
[20:47:17] <rangergord> sorry, youththththszzzz
[20:47:39] <rangergord> it's a great movie, stands the test of time
[20:47:44] <rangergord> unlike a lot of old comedies
[20:48:58] <cheeser> indeed