[00:39:25] <meye1677> I have a three node cluster: primary, secondary and arbiter. I’ve tested that it fails over correctly and as far as I can tell I have a fully functioning replica set. I am running into trouble connecting to the replica set with the pymongo client though. My replicaset is called ‘rs0’. I can connect to the primary and read data just fine, but when I try to connect to the replica set it times out. i’ve verified I am using pymongo version 3.1.
[00:39:26] <meye1677> and I am looking at docs https://api.mongodb.org/python/3.1.1/examples/high_availability.html. client = MongoClient('52.34.174.116:27017', replicaset='rs0’). What am I missing?
[03:33:38] <Melpaws> i need some schooling. How can import a collection from json into mongodb using ruby? I need to do the equivalent of mongoimport —file name.json .
[03:39:18] <joannac> why does it need to be ruby and not mongoimport?
[03:46:57] <Melpaws> because i'm taking output from a query and saving to json. Adding the new results to the already existing collection
[03:47:50] <Melpaws> *hm not query. I worded that wrong
[03:48:59] <Melpaws> I have a text file with many strings. I am already saving the text -> json (and currently using mongoimport to import into collections). But i'd rather stay in the ruby program if i can.
[06:31:15] <onedr0p> hello, I was wondering if anyone has the time to help a newb with mongodb?
[06:39:08] <onedr0p> I have 2 collections I would like to insert the docs from collection2 into collection1, see my example here: http://pastebin.com/0NP6ezjs
[06:40:13] <onedr0p> At the bottom I have working code to accomplish this, but I would like to know if this is the standard way of handling this situation
[11:01:25] <CreativeWolf> I'm trying to get MongoDB 3.0.6 installed on Ubuntu 15.04 and getting the error "Failed to start mongod.service: Unit mongod.service failed to load: No such file or directory."
[11:01:48] <CreativeWolf> Besides, while installing I see it's installing 2.6.11 - Not sure what needs to be updated.
[11:02:19] <CreativeWolf> Tried following https://rohan-paul.github.io/mongodb_in_ubuntu/2015/09/03/How_to_Install_MongoDB_Iin_Ubuntu-15.04.html and http://askubuntu.com/questions/636119/how-do-i-install-mongodb-3-0-in-vivid - Still no go
[11:02:24] <CreativeWolf> Can someone help please?
[11:03:36] <CreativeWolf> After following the steps mongod --version gives db version v2.6.11
[11:39:00] <serversides> HI there! How to bypass localhost authentication? Also will this be stop outside connections but allow localhost only?
[11:48:56] <StephenLynx> what exactly do you mean?
[11:49:05] <StephenLynx> there is a localhost exception
[13:34:06] <misan> I'm entirely new both to node.js and Mongodb. I'd love to run MongoDB on my local nodeserver and then create databases/collections via web-GUI (preferably also running on Node) Can someone point me to the right tutorials/docs? I can't find anything useful on the official website
[13:35:01] <misan> in times of using mysql, it was really easy just to fire up phpmyadmin and then fiddle around with the databases and tables.. But it is really difficult to get started with node/mongodb
[14:28:39] <maloik> We have a Ruby class using Mongoid that serves as a repo of app wide settings. I just encountered something super weird and unexpected (to me) and now I'm wondering if this is normal at all, and if someone can explain this behavior. Info is here: https://gist.github.com/hannesfostie/f50b7022b4e1bee46e74
[14:28:58] <maloik> What's super weird is that if I quit my console, the original value is back... I'm at a loss for words
[16:05:19] <nerder> i mean i want to update all the documents for the attribute key, and i want it to become something like parent-key, insted of just key as it is now
[16:05:43] <Derick> you can't use other column's values in an update
[16:06:18] <nerder> parent in another attribute into the collection, an example document could be { _id : "1", parent: "foo", key: "bar"} and i want to have { _id : "1", parent: "foo", key: "foo-bar"}
[16:13:30] <Derick> you may laugh, but that's the right answer
[16:14:09] <pchoo> seriously, we've got an app right now where we've been requested to shoehorn some MySQL relational data into separate collections, despite the arguments against it
[16:14:29] <pchoo> and it's horrible, and causing me a massive pain when the ops team change their processes based on that data
[16:14:35] <cheeser> the article is grotesquly wrong, though.
[16:19:46] <pchoo> ok peeps, I've got an interesting question! I've got a lot of documents I want to do some summary on, probably using the aggregation pipeline stuff
[16:21:39] <pchoo> these doc are status counters have two dates on them, and a reference. For each reference there is a new counter every time it enters a new state, which has a start date and the end date is null. The previous counter's end date gets set to the start date of the new counter, and these are used for building a timeline of the doc they relate to
[16:22:10] <pchoo> I now need to do a monthly balance of which docs are in which state
[16:22:23] <Derick> pchoo: better to show examples of these docs
[16:25:29] <pchoo> What I'm looking for is to get a count of all the tickets grouped by status_id, when the starts_at and ends_at straddle an end of month boundary
[16:25:49] <pchoo> i.e. end of each month, for a graph
[16:28:46] <pchoo> I've been able to achieve what I want by iterating over the months and can get the data out that way, but that is x calls to the db. I don't thikn it's possible, but I'm hoping someone in here can prove me wrong :p
[17:01:33] <a-a> can someone here help me with this aggregate query? basically, i'm trying to project new fields using values from a nested doc but the results come back empty: http://pastebin.com/1JU0L2AY
[17:22:59] <kimpalaj1> Probably a silly question, but can't find it in the documentation: Can I enable authentication in order to use the MongoDB shell when I have security.keyFile set?
[17:23:46] <kimpalaj1> Using 2.6. And right now, any user logged in to the Linux box can access the mongo shell
[17:33:54] <StephenLynx> but can it act on the database?
[17:37:47] <kimpalajn> No, you can't do anything unless you authenticate with 'db.auth()'
[17:40:00] <kimpalajn> It's just a silly security thing that I needed documentation for to basically say: Anyone can access the shell, but you need to authenticate to modify database
[18:04:22] <meye1677> I asked this last night, but I am still very stuck and not making progress. I have a replica set working with a primary, secondary and arbiter. I have tested the failover procedure and I am confident things are working correctly. Furthermore I am able to connect to the primary directly and read from it so I know I things are working from that perspective. My problem is I cannot connect to the replica set using pymongo. LIke I said I can connect to
[18:04:22] <meye1677> the primary with client = MongoClient(‘host:port’) syntax but I cannot connect with client = MongoClient(‘host:port’, replicaset=‘foo’). I get “pymongo.errors.ServerSelectionTimeoutError: ip-172-31-32-51:27017: [Errno 8] nodename nor servname provided, or not known,172.31.0.51:27017: timed out,172.31.16.51:27017: [Errno 64] Host is down”
[18:06:59] <meye1677> ah, I just figured out my issue. mixing public and private IP addresses. Sorry for the noise
[18:07:50] <a-a> can someone here help me with this aggregate query? basically, i'm trying to project new fields using values from a nested doc but the results come back empty: http://pastebin.com/1JU0L2AY
[18:36:38] <TechIsCool> so how do I know when a secondary is up to date
[20:03:39] <deathanchor> Like watching sports, Primary is being in the stadium, and secondaries are watching it on TV, you can stream it near live or tivo it and watch later.
[20:05:34] <a-a> what's the best way to migrate data from one collection to another, removing the original record?
[20:06:22] <a-a> I have an aggregation function that works for selecting the records, and I know I can use the $out operator to write the projection to a new collection.
[20:06:39] <a-a> but how do I handle the delete from the original collection?
[20:07:25] <a-a> is this something I should use map/reduce for, or is aggregate in a server script good?
[20:15:03] <ruphin> I have an issue with converting a node to a replica set
[20:15:25] <ruphin> The main problem is this: W NETWORK [HostnameCanonicalizationWorker] Failed to obtain address information for hostname mongo-main-config-1: Name or service not known
[20:16:24] <ruphin> The hostname of the node itself is called `mongo-main-config-1`. There is an entry in /etc/hosts for this hostname. When the mongod instance started it correctly recognised this
[20:16:29] <ruphin> I CONTROL [initandlisten] MongoDB starting : pid=1 port=27017 dbpath=/data/db 64-bit host=mongo-main-config-1
[20:16:47] <ruphin> So I don't understand how the name resolver cannot find an address for that hostname
[20:19:57] <ruphin> Here is a link to the full startup log: https://gist.github.com/ruphin/2dcc6b8ae0760f8b2075
[20:21:00] <ruphin> I don't understand why the node becomes 'REMOVED'. The message is that it cannot find a node to sync from, but it is the only node in the replica set, and it just initialized
[20:21:28] <ruphin> The only hint from the logs is that [HostnameCanonicalizationWorker] failure
[20:45:51] <deathanchor> a-a: why not just read the new collection and delete from the old?
[20:48:21] <deathanchor> ruphin: that looks like you are trying to bring up a configsvr?
[20:48:54] <jtal> any mongoose users know does Schema have to match db exactly? or can i leave stuff out?
[20:51:05] <jtal> I can connect but cant find() any of my documents
[20:51:44] <deathanchor> jtal: example find and doc?
[20:51:59] <deathanchor> also http://alexpusch.github.io/whynomatch/
[20:54:37] <jtal> oh I guess I'm only passing 1 arg to find() in what I pasted but I also tried with {}, {subject:"kvinde"} etc
[20:57:45] <adamo_> Hi there, does someone know how the avgObjSize is calculated when i'm using WiredTiger with compression, is this the compressed value or the real value of the object?
[21:00:54] <serversides> Fresh install of mongodb. Now for some reason its saying. Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused. Using sudo service mongod stop, returns stop: Unknown instance. restart doesnt start anything and cannot access the mongo shell, any reasons why?
[21:01:11] <serversides> Im using ubuntu 14.04 if that helps
[21:02:12] <jtal> what happens when you try to start it?
[21:02:42] <jtal> deathanchor: you see anything obvious?
[21:05:43] <jtal> deathanchor: also I can save() using that same schema... confusing
[21:08:03] <serversides> when I try to start it I get ‘mongod start/running, process 21652’ but it isnt running
[21:08:35] <deathanchor> jtal: Oh I have no idea how mongoose works.
[21:13:30] <Derick> that's the file, or the directory? you need the file name
[21:13:39] <serversides> i followed this guide https://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
[21:13:59] <ruphin> I am having some success now with a mongodump from the old config cluster and mongorestore into a new config cluster, but I have no idea if it will actually work if I bring the cluster up
[21:14:11] <serversides> it was working fine until I restarted it
[21:16:57] <ruphin> If you can give me some pointers in the right direction I can do some testing on my own, I won't hold you reponsible if it doesn't work :p
[21:17:03] <Derick> cheeser: they are actually pretty good
[21:17:22] <cheeser> yeah. i feel bad for having not watched them. but i've been a bit busy.
[21:17:36] <Derick> ruphin: now I think of it, the thing didn't have an upgrade path
[21:17:40] <Derick> just how to start up a new one
[21:20:42] <ruphin> I can't get the nodes to actually join the replica set, they all get removed
[21:21:18] <Derick> ruphin: I'm refering to cheeser' "likely 3.2.1" comment
[21:21:37] <ruphin> Right now I'm having some success with starting a new config cluster, and using mongodump/mongorestore to export the data from my old config cluster to the new one, but I have no idea if it'll work
[21:21:57] <ruphin> Any idea if mongodump/mongorestore on config servers has any consequences?
[21:22:22] <ruphin> And is there an ETA on 3.2.1? :)
[21:25:44] <ruphin> Ok, so one last question: If I create a new config server and just mongodump/mongorestore the contents of the 'config' DB from an existing config server, will that work? Or are there any other things that I have to consider
[21:28:38] <cheeser> i *think* that's the "upgrade" path for now.
[21:28:54] <cheeser> iirc, 3.2.1 will hopefully have a path that doesn't involve downtime.
[21:29:08] <cheeser> but the kernel team couldn't quite deliver that in time for .0
[21:34:10] <ruphin> I don't care about the downtime, as long as it works :)