PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Friday the 2nd of October, 2015

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[05:12:05] <Lope> I'm trying to start mongodb as the mongodb user, but after I run this command it's running as root (as seen in htop) DAEMONUSER=mongodb /usr/bin/mongod --fork --port 27017 --dbpath /var/lib/mongodb
[05:12:52] <Lope> It seems like I can't use `su mongodb -c ...`
[05:16:29] <Lope> when I try running it with su, it doesn't even run at all, does not even make a log file.
[05:16:35] <Lope> No error either.
[05:32:17] <ocx> is it ok to run mongo 2.6?
[05:32:45] <ocx> 2.6.11
[05:32:51] <ocx> is it a stable release?
[05:37:48] <Boomtime> @ocx: yes
[05:38:19] <Boomtime> 2.6.11 is the current stable release for the 2.6 branch; https://www.mongodb.org/downloads#previous
[05:39:31] <Lope> I noticed the mongodb user's shell is /bin/false. that must be why I can't run mongod as mongodb user with su.
[05:49:44] <ocx> i installed 3.0.6
[06:03:04] <synthetec> hi
[06:03:14] <synthetec> does it matter which mongo instance is the primary for system profiling
[06:26:16] <Boomtime> @synthetec: profiling is a local function, it applies only to the member you enabled it for, so... yes? i suppose
[06:26:43] <Boomtime> or are you talking about enabling profiling via cloud manager?
[06:47:49] <synthetec> its okay
[06:47:50] <MadWasp> if I wanna do mongodb mapreduce with MongoDB but MongoDB doesn’t offer all the functions i need, would you recommend writing everything in JS or take some MapReduce framework?
[06:47:54] <synthetec> i;ll figure it out
[06:48:24] <MadWasp> lol, a lot of mongodb in that sentence :D
[09:03:33] <spydon> How do I search objectId's through casbah? I have tried .findOne(MongoDBObject("_id" -> new ObjectId(id))) but it comes back empty even though the objectId exists
[09:04:12] <spydon> The MongoDBObject looks like this when printed in scala: { "_id" : { "$oid" : "560bee5a42fd695da76330ec"}}
[09:05:01] <spydon> And in the database it looks like: { "_id" : ObjectId("560bee5a42fd695da76330ec"), "id" : 666, "filename" : "test" }
[12:47:00] <BadHorsie> I want to do find operations over the output of rs.status(), how can I do this ? My main interest is recognizing the PRIMARY, was goal is something like rs.status().aggregate({$unwind:"$members"}).find({"stateStr":"PRIMARY"},{name:1})
[12:47:19] <BadHorsie> s/was goal/my goal
[12:47:47] <deathanchor> BadHorsie: you want to find the primary or test if the machine you are is it?
[12:48:25] <BadHorsie> deathanchor: the second one :)
[12:48:40] <deathanchor> db.isMaster()
[12:48:50] <BadHorsie> The hell Niko? I'm Seb haha
[12:49:03] <deathanchor> Hola amigo!
[12:49:16] <BadHorsie> Good to see you man!
[12:49:48] <BadHorsie> I'm playig around with puppet and mongo, repl set not doing it for me today :P
[12:50:43] <deathanchor> db.isMaster().ismaster on the machine will return true or false depending if it is primary or not
[13:29:56] <supersym> why on earth would one disallow using comments in a mongo js script? What is the use of that other than pissing off users and frustrating part of the documentation effort (and yes I know, there are yet another 3,4,5 convoluted forms appearantly making up for that by moving it into some dictionaries)
[13:30:26] <m0rpho> hi there! I have a collection where I save millions of links in the form of "http://www.link.com/path_fragment1/path_fragment2/file.html" How can I group all linkss by hostname or hostname+path_fragment1 ?
[13:30:45] <m0rpho> is that even possible with mongodb?
[13:30:51] <m0rpho> link group by regex?
[13:30:55] <m0rpho> like*
[13:31:40] <supersym> m0rpho: there probably are a -few- ways to pull that off but far from being a seasoned mongo developer, I'd have to check
[13:32:52] <m0rpho> hi supersym, thanks for your response? do you have any keyword for me what to search for? maybe map/reduce? but i'd like to do it in realtime if possible
[13:33:09] <m0rpho> *!
[13:33:11] <deathanchor> supersym: you can comment just use //
[13:33:33] <supersym> deathanchor: ah... so it is the * that is pissing it off... ><
[13:33:45] <deathanchor> supersym: I have used /* */ also
[13:34:14] <supersym> multiline?
[13:34:18] <deathanchor> yes
[13:34:36] <supersym> is there is a switch I am missing when running a .js file against mongo (shell)?
[13:35:11] <supersym> I keep running into E QUERY SyntaxError: Unexpected identifier at foo.js:8
[13:35:46] <deathanchor> how are you running it?
[13:36:00] <deathanchor> I just do: mongo myscript.js
[13:36:40] <supersym> right... now it does. Ok then it must be the `use <db>` statement? I guess this isn't shellscript anymore or?
[13:37:47] <deathanchor> supersym: you can't use mongodb shell helper commands in the JS
[13:37:52] <supersym> indeed running the file is no problem, piping via stdin it does choke... but ok
[13:38:10] <supersym> Right, so I was mixed up then, in those files I'll need to connect to a driver and the whole shebang
[13:38:22] <supersym> that does explain it
[13:38:44] <supersym> deathanchor: thanks for helping me sort that out :)
[13:38:55] <deathanchor> supersym: you don't need a driver
[13:39:09] <deathanchor> let me dig up an example
[13:39:15] <supersym> Im a bit confused as to the nature of those '.js' files then
[13:39:25] <supersym> cheers
[13:39:47] <deathanchor> supersym: here's a simple one that lists dbs https://gist.github.com/deathanchor/461baaee48ac569445c4
[13:39:59] <supersym> thanks
[13:40:05] <deathanchor> all the helper commands have actual mongodb js versions
[13:41:08] <supersym> aha
[13:43:14] <supersym> m0rpho: you mention a lot of records right? As I read, a regex based operation with $group would be very slow though and map reduce probably is your best bet here
[13:43:32] <supersym> http://stackoverflow.com/a/17493547 should contain info on one possible approach
[13:47:24] <m0rpho> supersym: thanks! ill try it :)
[14:27:42] <Gioia> the latest mongodb upgrade broken my heroku server and I’m beating my head against the wall to figure out how to fix it. Something about updating my updating my authSchema..but I’m unable to do so
[14:28:41] <Gioia> when i run the ‘db.getSiblingDB("admin").runCommand({authSchemaUpgrade: 1 });’ command I get an error about not being admin
[20:28:40] <nixfreak> I'm using scrapy with mongodb and scrapy says its writing to the database I specified
[20:29:07] <nixfreak> but when I look at the collections using mongo shell I'm not seeing anything
[20:29:32] <nixfreak> my data is located /opt/data/db and I have multiple files in there
[20:30:04] <nixfreak> file.1 is 64mb so why can't I see these documents in mongo?
[20:33:48] <cheeser> 64mb might just be preallocated space.
[20:34:03] <cheeser> confirm that your db and collection names are correct
[20:34:56] <nixfreak> ok anything else if they are correct ?
[20:35:12] <cheeser> check for errors in logs, etc.
[20:37:26] <StephenLynx> use show databases on the terminal
[20:37:39] <StephenLynx> then use show collections on the databases
[20:51:18] <nixfreak> I'm stumped , mongodb logs just show the connectino
[20:51:20] <nixfreak> connection
[20:51:29] <nixfreak> so nothing writing to it
[20:51:51] <nixfreak> scrapy says item pipeline is working though
[20:53:18] <cheeser> does scrapy actually use mongo or is that something you have to wire up manually?
[20:54:01] <nixfreak> you have to create what is called a pipeline then connect it
[20:54:06] <nixfreak> so manually
[20:54:21] <cheeser> cool. so your pipeline is likely not doing what you think it's doing.
[20:54:31] <nixfreak> probably
[21:12:45] <stevenk1> question: I am trying to delete an entry. db.mycollection.remove({“_id”:theid}) , but it doesn’t go away. db.mycollection.find({“_id”:theid}) still finds the object. (using mongo —shell)
[21:13:37] <stevenk1> I did receive: writeResult({ "nRemoved" : 1 }), although now if I run it again, I get writeResult({ "nRemoved" : 0 })
[21:22:48] <stevenk1> is there some sort of commit that I’m missing?
[23:09:48] <spellett> sounds right to me. i can't remember does the index on _id enforce uniqueness? if not, is it possible that you had two records with the same _id?
[23:10:24] <spellett> that being said, that wouldn't jive with the response from the second remove as that should also indicate 1 removed
[23:17:08] <blizzow> My replica set secondaries in one of my shards started acting super weird this morning. They have started to fall way behind. I was worried that it was a network/disk issue, but I created a file of random digits (dd if=/dev/urandom of=/var/lib/mongodb/randoms.txt bs=1M count=1024) and rsynced that from my primary to my secondary nodes. rsync -avP user@primary:/var/lib/mongodb/randoms.txt ./ transferred the file over in about 17 seconds. The lag on my
[23:17:21] <blizzow> Anyone have an idea what I should look at?
[23:20:17] <blizzow> Since I now have so much lag (~6000 seconds) I can't change primaries.
[23:21:05] <Boomtime> @spellett: _id is unique
[23:21:18] <Boomtime> it is also immutable
[23:21:37] <Boomtime> required, immutable, unique
[23:21:48] <Boomtime> the only field (currently) that is
[23:30:16] <spellett> @blizzow: how big is your oplog window?
[23:30:38] <blizzow> spellett: I think I'm around 24 hours.
[23:30:49] <blizzow> spellett: I think that's the default.
[23:31:39] <blizzow> I didn't put anything in mongod.conf re: the oplog.
[23:36:49] <blizzow> transfer rates speeds between the two secondaries runs a constant 60-70MB/s.
[23:41:13] <spellett> I think I had read about a similar problem that dealt with the oplog window so my best guess would be to check around the documentation for that. Sorry I can't be more help, good luck.
[23:48:50] <blizzow> Anyone have an idea how I'd clear my oplog? I don't see anything in the documentation about doing so.
[23:51:21] <Boomtime> huh? why would you want to do that?
[23:52:09] <Boomtime> @blizzow: do not clear your oplog, in fact, don't touch it at all, replication assurances rely on it verbatim
[23:55:13] <blizzow> Boomtime: I've got to figure something out. I don't think this replication lag issue is going away. :( I see this... https://jira.mongodb.org/browse/SERVER-18908