PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Wednesday the 7th of September, 2016

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[02:25:57] <virtualsex> hi
[02:35:25] <Boomtime> hi there
[02:44:26] <virtualsex> if i have one master, 3 slaves, no need arbiter?
[02:50:26] <joannac> that's an even number, so you need an arbiter
[02:51:44] <virtualsex> how about 1 master 2 slaves
[02:52:11] <joannac> that's an odd number, so you don't need an arbiter
[02:53:55] <virtualsex> how many do i need if that's my case? two shards,2 slaves each, 3 config server, 2 mongos?
[02:54:05] <virtualsex> how many machinese
[02:54:31] <joannac> that's not a useful question to answer without knowing load and.or machine specs
[02:54:55] <virtualsex> just for testing purpose
[02:55:02] <joannac> if you're not planning to use it heavily, or you ahve a huge machine, then 1. At the other end of the scale, 11
[02:55:08] <joannac> 11 machines*
[02:55:10] <virtualsex> we have mysql and replication
[02:55:34] <virtualsex> why 11
[02:55:46] <virtualsex> 2+2+3+2=9
[02:55:47] <joannac> 2 shards, 1 master and 2 slaves aeach = 6
[02:55:49] <joannac> 3 config servers
[02:55:51] <joannac> 2 mongoS
[02:56:35] <virtualsex> shouldn't config server be with mongodb or mongos
[03:09:39] <joannac> no. mongos should go on application servers. everything else should be on dedicated hardware
[03:10:01] <joannac> (again, unless your machines are large enough to house multiple processes)
[03:45:24] <kevc> can anyone explain why there's an admin database on my replica set, and it's different from the admin database seen via mongos?
[03:47:09] <Boomtime> @kevc, admin is where user credentials are kept, along with certain other internal items
[03:47:23] <Boomtime> it is replicated in a replica-set, but not distributed
[03:47:48] <Boomtime> it can legitimately be different between different shards and/or the cluster as a whole
[03:47:59] <Boomtime> the cluster user credentials are stored in the admin database in the config servers
[03:48:41] <Boomtime> it is rare to need any users beyond monitoring and backup type roles at the shards
[03:53:17] <kevc> sure, it's monitoring that's the consideration here, some users needs to connect to the replica set directly to run rs.getStatus()
[03:53:44] <kevc> so mongos uses configdb/admin whereas each replica set has their own admin database
[03:54:36] <Boomtime> right
[03:55:19] <kevc> great, that makes sense, thanks for the clarification!
[03:57:20] <Boomtime> you should set roles that limit those users to what you expect them to need -- don't allow any writing or they could really screw stuff up
[11:48:05] <Epoc> Hello
[11:50:50] <Epoc> i'm new on MongoDB... i'm trying to understand how permission works. I created a new database, named "test1", on the db test1 i create a user "test1user" with dbAdmin on test1, readWrite on test1, userAdmin on test1
[11:51:49] <Epoc> now, i'm connecting to mondogb with noSQL Manager for MongoDB, if i try to connect as test1user to db test1 i get back an errour that says
[11:51:53] <Epoc> Command listDatabases failed: not authorized on admin to execute command { listDatabases: 1 }.
[11:52:05] <Epoc> what i miss?
[11:59:14] <Epoc> please, some one can help me ?
[12:03:58] <Derick> Epoc: Annoyingly, I can't find this in the documentation.
[12:04:43] <Derick> Epoc: oh: https://docs.mongodb.com/manual/reference/built-in-roles/#clusterMonitor
[12:04:58] <Derick> apparently you need the clusterMonitor or clusterAdmin roles applied
[12:04:58] <Epoc> Hi Derick
[12:05:16] <Epoc> really? i have just a standalone service
[12:06:10] <Derick> "Cluster Administration Roles¶
[12:06:11] <Derick> The admin database includes the following roles for administering the whole system rather than just a single database. These roles include but are not limited to replica set and sharded cluster administrative functions."
[12:06:15] <Derick> so yes, really.
[12:07:16] <Epoc> mmm i get back an error
[12:07:44] <Epoc> "role" : "clusterManager", "db" : "test1user"
[12:08:13] <Derick> I don't think you set these on a db?
[12:08:25] <Epoc> sorry it was
[12:08:30] <Epoc> "role" : "clusterManager", "db" : "test1"
[12:08:35] <Epoc> Command updateUser failed: No role named clusterManager@test1
[12:08:52] <Derick> which mongodb version are you using?
[12:09:47] <Epoc> 3.2
[12:10:36] <Derick> instead of "db: test1, try "cluster": true
[12:10:48] <Derick> but I have to admit, I can't find these things in the docs either
[15:13:36] <siyfion> Can anyone shed some light on my error: "MONGODB | SSL handshake failed. MongoDB may not be configured with SSL support."
[15:14:09] <siyfion> I'm using the latest mongo ruby driver 2.2.7, along with a Compose.io Mongo DB configured with SSL support.
[15:14:27] <siyfion> With a URI like: mongodb://<user>:<password>@aws-eu-west-1-portal.0.dblayer.com:15131/labellogiclive?ssl=true
[15:20:28] <StephenLynx> can you connect using ssl using the terminal?
[15:44:01] <siyfion> On my machine? Or the EB instance?
[15:46:40] <cheeser> yes
[15:46:41] <cheeser> :)
[15:46:46] <siyfion> When I try the details on my machine I get --->
[15:46:51] <siyfion> MongoDB shell version: 3.2.9
[15:46:51] <siyfion> connecting to: aws-eu-west-1-portal.2.dblayer.com:15131/admin
[15:46:51] <siyfion> 2016-09-07T16:36:05.859+0100 W NETWORK [thread1] SSL peer certificate validation failed: unable to get local issuer certificate
[15:46:53] <siyfion> 2016-09-07T16:36:05.933+0100 E QUERY [thread1] Error: Authentication failed. :
[15:46:53] <siyfion> DB.prototype._authOrThrow@src/mongo/shell/db.js:1441:20
[15:46:55] <siyfion> @(auth):6:1
[15:46:55] <siyfion> @(auth):1:2
[15:47:07] <Derick> siyfion: it's better to use pastebin.com or something similar
[15:47:12] <siyfion> Whoops... meant to gist that
[15:47:20] <siyfion> Wrong Ctrl-V :/
[17:03:45] <jokke> hello
[17:04:33] <jokke> is it possible to use the aggregation framework to calculate say the average of values inside nested documents which are elements of an array?
[17:05:24] <jokke> something like this { _id: ..., values: [ { sub_id: ..., value: 15 }, ... ] }
[17:05:55] <jokke> i think this is possible by using sub_id in the _id for the group stage
[17:06:58] <jokke> but as soon as i have something like this { _id: ..., foo_values: [ { sub_id: ..., value: 15 }, ... ], bar_values: [ { sub_id: ..., value: 20 }, ... ] } things get really complicated
[17:07:03] <jokke> if not impossible
[17:12:12] <StephenLynx> yeah, it gets tricky
[17:12:15] <StephenLynx> and possibly slow.
[17:12:21] <StephenLynx> but you can do it with unwind.
[17:12:23] <jokke> dang
[17:12:28] <jokke> i can?
[17:13:39] <jokke> i mean, yeah that works for the first document
[17:14:04] <jokke> but i wouldn't know how for the second one
[17:14:51] <StephenLynx> wat
[17:15:49] <jokke> do i unwind both arrays subsequently?
[17:15:57] <jokke> and then group by what?
[17:17:05] <StephenLynx> you got multiple sub-arrays?
[17:18:06] <jokke> yeah as pointed out by my example: foo_values and bar_values
[17:18:37] <jokke> in this case it wouldn't make sense to split it up into two, but it does when they need different accumulators
[17:18:46] <jokke> (sum vs avg for example)
[17:20:01] <jokke> if this is impossible to do i will just store different types of values in different collections
[17:21:00] <jokke> unwinding multiple times gives me every permutation of the values which is kinda overkill :D
[17:23:45] <jokke> mh that sucks... lookup supports unsharded collections only so storing in multiple collections isn't an option here either... :/
[17:26:41] <jokke> i guess i really have to revert to map reduce
[17:28:55] <jokke> or i put them all into a single array and add somekind of type field which i can check with $cond
[17:30:08] <jokke> but that would need a nested $cond for more then two types :/
[19:49:27] <JFlash> hi ppl from the Mongo planet
[21:48:13] <tpayne> can someone confirm or deny that mongodb full-text search supports partial searching
[21:55:33] <tpayne> shit
[21:55:45] <tpayne> guess it's back to elasticsearch
[23:38:38] <spacecrab> yay! i managed to set up my replica set from code and it was awesome