PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 11th of November, 2012

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:00:32] <oxabhishek> i need help
[00:00:42] <oxabhishek> mongo crashes unknowingly
[00:00:50] <oxabhishek> sometimes during a hard restart
[00:01:00] <ckd> oxabhishek: anything in the logs?
[00:01:08] <oxabhishek> or sometimes due to other process failures
[00:01:10] <oxabhishek> wait
[00:01:17] <oxabhishek> let me paste the logs here
[00:01:52] <ckd> Noooo
[00:01:58] <ckd> pastie.org
[00:02:25] <oxabhishek> ok
[00:02:41] <oxabhishek> but currently its working fine and my logs dont show any previous error msgs
[00:03:18] <oxabhishek> i have searched through all of the possible sites that help with mongo errors
[00:03:20] <oxabhishek> but in vain
[00:03:39] <oxabhishek> rite now its working fine but i am sure after i hard restart my system it will fail
[00:04:03] <ckd> well, whenever it fails, save the relevant logs and come find someone :)
[00:04:19] <oxabhishek> thanks a lot
[00:04:28] <oxabhishek> i find this chat very helpful
[00:04:33] <oxabhishek> i am a new user to this site
[00:04:37] <oxabhishek> will surely come back
[00:04:44] <oxabhishek> thanks again
[00:04:46] <oxabhishek> goodnight
[00:05:24] <oxabhishek> Starting mongod (via systemctl): Job failed. See system logs and 'systemctl status' for details. [FAILED]
[00:05:35] <oxabhishek> this is what i get when i start mongo
[00:05:40] <oxabhishek> sudo service mongod start
[00:05:53] <oxabhishek> but when i type in mongo
[00:05:59] <oxabhishek> i get access to its shell
[00:06:02] <oxabhishek> i dunno the problem
[00:06:05] <ckd> and what shows up in your system logs?
[00:06:16] <oxabhishek> wait let me check
[00:07:16] <oxabhishek> is this the location for the log file : /var/log/mongo/mongod.log ?
[00:07:29] <oxabhishek> i am new to mongo.. i started learning last night itself
[00:07:40] <ckd> usually
[00:07:41] <oxabhishek> i have very little idea about mongo so please help me
[00:07:53] <oxabhishek> ok then i see no error on the log
[00:08:00] <ckd> but look in your syslog, not mongo's log
[00:08:39] <oxabhishek> location?
[00:09:11] <ckd> usually /var/log/syslog
[00:09:15] <oxabhishek> ok
[00:09:36] <oxabhishek> no such file or dir
[00:09:42] <oxabhishek> m on fedora
[00:10:47] <ckd> does fedora have /var/log/messages ?
[00:11:02] <oxabhishek> wait let me check
[00:11:19] <oxabhishek> yes it does
[00:11:25] <ckd> check in there
[00:12:04] <oxabhishek> Nov 11 05:32:26 0xportable mongod[5954]: Starting mongod: forked process: 5964 Nov 11 05:32:26 0xportable mongod[5954]: all output going to: /var/log/mongo/mongod.log Nov 11 05:32:26 0xportable mongod[5954]: [FAILED] Nov 11 05:32:26 0xportable systemd[1]: mongod.service: control process exited, code=exited status=1 Nov 11 05:32:26 0xportable systemd[1]: Unit mongod.service entered failed state.
[00:12:24] <oxabhishek> this is the msg i found for mongod
[00:12:34] <ckd> always paste logs and such to pastie.org
[00:12:38] <ckd> or similar pastebin
[00:12:41] <ckd> never in channel
[00:12:42] <oxabhishek> ok sorry
[00:13:49] <oxabhishek> http://pastie.org/5358279
[00:14:01] <oxabhishek> is this the correct way to share that file?
[00:14:23] <ckd> yep, perfect!
[00:14:38] <oxabhishek> ok so can you help me figure out whats wrong?
[00:15:00] <ckd> so your mongod.log should have more information about why it failed to start
[00:15:35] <oxabhishek> i could not find any more info from that file
[00:15:44] <oxabhishek> anyway thanks a lot
[00:15:56] <ckd> paste whatever's in there from 05:30 and on to pastie
[00:16:03] <oxabhishek> wait
[00:16:36] <ckd> also, it's conceivable that you already have the instance running, so it's failing to launch a second instance on the same port
[00:17:25] <oxabhishek> http://pastie.org/5358293
[00:18:13] <oxabhishek> oh that FUCKIN MAKES SENSE haha
[00:18:17] <oxabhishek> wait a sec
[00:18:59] <oxabhishek> http://pastie.org/5358299
[00:19:13] <oxabhishek> even a restart results in a failure
[00:19:20] <ckd> do a stop
[00:19:29] <oxabhishek> wait
[00:19:47] <oxabhishek> stop says ok
[00:19:52] <silverfix> ckd: thank you man, it works :)
[00:19:57] <oxabhishek> but mongo is still working
[00:20:03] <ckd> silverfix: my pleasure :)
[00:20:56] <ckd> oxabhishek: do a killall mongod
[00:21:04] <oxabhishek> and status says http://pastie.org/5358308
[00:21:07] <oxabhishek> wait
[00:21:24] <oxabhishek> and?
[00:21:50] <ckd> basically, if the mongo shell is able to connect, mongod is already running
[00:22:07] <oxabhishek> it aint able to connect now
[00:22:19] <ckd> ok perfect
[00:22:20] <oxabhishek> so i think i am a foolish fucktard haha
[00:22:29] <ckd> no more foolish than me :)
[00:22:30] <oxabhishek> you are awesome man thanks a lot
[00:22:35] <oxabhishek> 1 more thing
[00:22:42] <ckd> ok, so it's def not running now, are you able to start it up again via service?
[00:22:46] <oxabhishek> i have set sudo chkconfig --levels 235 on
[00:23:01] <oxabhishek> yes i have run the start command
[00:23:05] <ckd> and it works?
[00:23:11] <oxabhishek> the thing is it takes very long time to start
[00:23:17] <oxabhishek> like about 2 mins or so
[00:23:19] <oxabhishek> i dunno y
[00:23:42] <oxabhishek> even with chkconfig and a hard restart it takes time on mongo load before i get the login screen
[00:24:01] <oxabhishek> still trying to start.. i mean the screen freezes trying to start mongo
[00:24:04] <ckd> is your machine slow?
[00:24:06] <ckd> :)
[00:24:31] <oxabhishek> haha i have 2nd gen corei3 with 4gb ram
[00:24:36] <oxabhishek> l3 cache
[00:24:55] <oxabhishek> i dun think this is the min reqmt of mongo or is it? :P
[00:25:24] <ckd> pretty sure you should be fine, but kinda hard to say why anything on your machine is slow
[00:25:34] <oxabhishek> yea man
[00:25:58] <oxabhishek> actually m working on a news aggregator site that my office demands me to work on
[00:26:12] <oxabhishek> the worst thing is i am the only tech guy in the company
[00:26:15] <oxabhishek> and i suck this bad
[00:26:16] <oxabhishek> haha
[00:26:20] <oxabhishek> so you know the status
[00:26:32] <ckd> everybody sucks 'til they don't
[00:26:40] <ckd> also
[00:26:54] <ckd> 10gen just started their Education platform
[00:27:10] <ckd> it's REALLY helpful for learning mongo from the very beginning
[00:27:36] <oxabhishek> i have to manage the ec2 servers, office network infras, develop every client project right from scratch
[00:27:37] <ckd> https://education.10gen.com
[00:27:54] <oxabhishek> oh yea i got hold of this site today itself :)
[00:28:01] <ckd> totally free, and a fantastic way to get started on Mongo
[00:28:13] <oxabhishek> they are taking classes on mongo and giving certifications for 65% above i believe
[00:28:44] <oxabhishek> fuck it failed
[00:28:48] <oxabhishek> i mean that start
[00:29:03] <oxabhishek> but guess what
[00:29:11] <ckd> the process is actually running? :)
[00:29:16] <oxabhishek> mongo is connected
[00:29:17] <oxabhishek> yeas
[00:29:20] <ckd> haha
[00:29:23] <oxabhishek> so what could be the problem?
[00:29:42] <ckd> i suspect it's not a mongo thing but a services thing with your Fedora install
[00:29:47] <oxabhishek> i guess they dun have the [OK] message only for my copy of mongo :P
[00:29:51] <ckd> but I have no idea, I know less than nothing about Fedora
[00:30:03] <oxabhishek> yea that could be possible
[00:30:12] <oxabhishek> i am worse than you bro :)
[00:30:30] <oxabhishek> the only thing i know is networking and programming
[00:30:38] <oxabhishek> nothing about sys admin stuff
[00:30:50] <oxabhishek> but i still have to do those stuff and it kills me everyday
[00:31:46] <oxabhishek> if i may ask where are you from?
[00:31:51] <ckd> Los Angeles
[00:31:54] <oxabhishek> i am from Sikkim
[00:32:10] <oxabhishek> it was a country by itself but now is a part of FUCKIN INDIA :P
[00:32:49] <oxabhishek> and you are a dev??
[00:33:15] <ckd> On my good days
[00:33:27] <oxabhishek> haha so you seem to be much older than me
[00:33:35] <oxabhishek> i am still doing my masters in networking
[00:33:39] <ckd> I might be :)
[00:33:49] <oxabhishek> and working for a startup as a parttime
[00:34:33] <oxabhishek> btw if you have any idea on NLP
[00:34:45] <oxabhishek> do you know where i could start from?
[00:35:30] <ckd> see, yet another thing I know exactly nothing about
[00:35:38] <oxabhishek> haha ok
[00:35:51] <oxabhishek> i guess i have to sleep now
[00:35:57] <oxabhishek> but thanks a lot for your help
[00:36:01] <ckd> you're quite welcome
[00:36:14] <oxabhishek> this will help me sleep peacefully after 36 hours
[00:36:39] <oxabhishek> its 6am here in india
[00:36:44] <ckd> get some sleep!
[00:36:48] <oxabhishek> haha sure thing
[00:36:52] <oxabhishek> catch you soon
[00:36:57] <ckd> later
[00:44:56] <mattbillenstein> joe_p: thanks for that - figured that might be the issue, but I don't see a way to pass slaveOk to copyDatabase either
[00:50:56] <joe_p> mattbillenstein: last time I tired I had to do the clone/copy from the master and had found that note. maybe someone has a way but not one that I had found
[00:51:28] <mattbillenstein> gotcha, thanks
[00:55:04] <mattbillenstein> ahha, this seems ot be doing something: > db._adminCommand({copydb:1, fromdb:'ciddb', todb:'ciddb', fromhost:'173.247.206.179:27017', slaveOk:1})
[02:14:40] <ciupicri> when I run something like col.insert(json.loads(data)) that data is available immediately to other mongodb clients?
[06:08:09] <LouisT> Hi, for some reason i'm having an issue deleting a database and user completely... i'm use "db.dropDatabase()" in test, but the user i created (test) can recreate the database.. i thought the user should be deleted with the database, what am i doing wrong?
[06:31:54] <ckd> LouisT: check the admin db
[06:32:33] <LouisT> ckd: i checked everything, for some reason i had to restart lighttpd... so i must have something configured incorrectly =/
[06:33:09] <ckd> everything's working now?
[07:04:31] <chovy> is it possible to install mongo on mac?
[07:04:54] <ron> sure
[07:05:09] <shesek> Hey all. I have an "places" collection, and "events" collection with a reference to place's _ids and a timestamp. I need to fetch a list of places that has an event that matches some criteria. How should I go about doing something like that?
[07:05:31] <shesek> (that criteria is an event that's upcoming in the next few days, but that's not very relevant)
[07:07:20] <shesek> I see two ways to do that - a. save that data directly on the places collection as I save new events, which I'd prefer to avoid. b. get a list of all places, than filter them with separate queries, which I'd also prefer to avoid
[07:07:29] <shesek> is there any third way using some Mongo magic that I don't know?
[10:35:59] <jammanbo> Can map reduce be used to group documents by some attribute say `type`, so that the output is just { 'type1': [ array of docs of type 1 ], 'type2': [ array of docs of type 2 ], … }?
[10:40:37] <kali> jammanbo: it can, but you can also do that with the aggregation framework, and it is much more efficient
[10:41:17] <jammanbo> kali: Aggregation framework means `group`?
[10:41:53] <kali> nope. it means aggregation framework :)
[10:42:16] <kali> http://docs.mongodb.org/manual/applications/aggregation/
[10:43:35] <jammanbo> Oh now ...
[10:44:24] <jammanbo> I'm coming at Mongo through the Mongoid adapter … I seem to have missed this in the process!
[12:58:54] <jammanbo> So in the aggregation framework, is it impossible to $addToSet the entire document? It seems like I need to reference all the fields explicitly? $addToSet: { someField: $someField, someOtherField: $someOtherField } …
[17:40:41] <sent_hil> My linode server crashed and when it restarted, I tried running "mongo" and I get this: "exception in initAndListen: 10296 dbpath (/data/db/) does not exist, terminating".
[17:41:01] <sent_hil> I did have mongo up and running before, so I guess it was using a diff. dir
[17:41:07] <sent_hil> How do I find that dir?
[17:41:20] <Derick> do you know the name of the database?
[17:41:27] <sent_hil> Derick: yes
[17:41:29] <Derick> then "locate database.1" should find it
[17:42:14] <sent_hil> Derick: damn, it's not able to find it
[17:42:33] <Derick> try: find / -name database.1
[17:42:38] <Derick> that will take ages though
[17:43:44] <sent_hil> Derick: surprisingly no
[17:43:59] <sent_hil> this brings another question
[17:44:09] <sent_hil> why doesn't `sudo service mongodb start` start mongodb instance?
[17:44:31] <sent_hil> err I'm an idiot, the location was in the config file
[17:45:59] <Gargoyle> sent_hil: And the reason it's not starting is probably in the log file! ;)
[17:46:34] <sent_hil> Gargoyle: yep, "Unclean shutdown detected." reading up on recovery docs now
[17:46:38] <sent_hil> thx Derick Gargoyle
[17:54:29] <sent_hil> I'm getting "couldn't open /var/lib/mongodb/db_dev.ns errno:13 Permission denied" when using "sudo service mongodb start", but no errors when starting it manually with "mongodb --dbpath ..."
[17:54:50] <Gargoyle> sent_hil: Ubuntu?
[17:54:54] <sent_hil> Gargoyle: yes
[17:55:33] <Gargoyle> sent_hil: I think mongo runs as the user "mongo", so are the perms OK?
[17:56:34] <Gargoyle> Make that user "mongodb". Permissions on one of my files are: -rw------- 1 mongodb nogroup 16M Nov 10 13:45 gargoyle.ns
[17:57:11] <sent_hil> Gargoyle: I've mine as root (temporarily), shouldn't that work for them all?
[17:58:21] <Gargoyle> No, becuase the service is starting up as the user "mongodb" who can't open the file of you have them as root
[17:58:29] <sent_hil> Gargoyle: changed them to mongodb and it works, thx!
[17:58:48] <sent_hil> ah ok
[18:13:38] <Gargoyle> very lazy web (well, it is sunday evening). How do I run aggregate queries in PHP?
[18:15:20] <Derick> either with runCommand (1.2) or otherwise with aggregate (1.3) : http://docs.php.net/manual/en/mongocollection.aggregate.php
[18:20:07] <Gargoyle> Thanks Derick.
[19:20:36] <Gargoyle> Having brin failure today!
[19:20:40] <Gargoyle> see!
[19:20:43] <Gargoyle> *brain!
[19:23:24] <Gargoyle> How odd!
[19:23:50] <Gargoyle> Do I need to do something specific to get my clone of the php driver to see the RC1 tag ?
[19:24:18] <Derick> "git checkout 1.3.0RC1" should do
[19:24:56] <Gargoyle> Derick: After a "git pull", "git tag -l" does not give me a 1.3.0RC1 tag.
[19:26:27] <Derick> your clone, is it updated from upstream?
[19:27:03] <Gargoyle> It's a clone from the main repo on GH. I didn't make my own fork
[19:27:41] <Derick> oh
[19:27:57] <Derick> shows up for me
[19:28:03] <Derick> git pull --tags ?
[19:28:16] <Derick> git fetch --tags
[19:28:20] <Gargoyle> ahh ha!
[19:28:27] <Derick> dinner, bbl
[19:28:48] <Gargoyle> enjoy
[19:57:45] <mrpro> hi
[19:57:49] <mrpro> when are collection locks coming?
[20:13:09] <coopsh> is there a way to query the state of a replica set member? I'm especially interested if a member is in state "RECOVERING". The server status doesn't contain that information as far as I can see.
[20:15:17] <coopsh> oh, got it: replSetGetStatus
[21:46:46] <teotwaki> Hi, I do realise that I did ask the same question yesterday, but I didn't get a definitive answer. The C++ client is supposed to be licensed under the Apache License, however it appears to be using files from the core MongoDB project, which is AGPL; wouldn't that make the C++ driver (and any code that includes/uses it) AGPL also?
[21:47:51] <Derick> teotwaki: I'm not comfortable answering that question, but let me see what I can find out.
[21:52:01] <teotwaki> Derick: thanks
[21:52:50] <ckd> teotwaki: are those files from the core project covered by Apache or AGPL?
[21:54:45] <teotwaki> ckd: AGPL, I seem to remember, let me clone the repo and double check
[21:54:59] <ckd> teotwaki: Hidden at the bottom of the readme
[21:55:11] <ckd> teotwaki: files under the client dir and other things are actually Apache
[21:55:32] <teotwaki> yes, I see that, but is that *valid*?
[21:55:44] <teotwaki> What I mean by that, the files under those directories are, but not the files they include.
[21:56:03] <teotwaki> which would mean that the files that are included by the c++ client should actually be dual-licensed, depending of the context.
[21:57:08] <ckd> teotwaki: can you give me a specific example?
[21:57:16] <ckd> teotwaki: (I'm curious :) )
[21:57:19] <teotwaki> ckd: just a few moments, still cloning
[22:05:59] <Derick> teotwaki: "we're currently working on our licensing a bit" it seems
[22:06:26] <Derick> not sure how authorative that is - (or helpful)
[22:10:22] <teotwaki> Derick: thanks
[22:11:26] <teotwaki> ckd: got it, dbclient.cpp, dbclientcursor.h, dbclient_rs.cpp, mongo_client_lib.cpp and even examples/mongoperf.cpp use the db/json.h file, which is AGPL licensed.
[22:12:15] <Derick> teotwaki: it's unlikely that we'll cause you troubles for it though
[22:12:40] <teotwaki> Derick: I know, I doubt it could ever even become an issue
[22:13:15] <teotwaki> Derick: considering that what I'm planning is to use the C++ client in an application that never faces the outside world
[22:14:51] <ckd> teotwaki: hah! I was looking at the C driver, didn't realize the C++ driver was part of the server source, so of course you knew about the client dir :D
[22:15:54] <teotwaki> basically, I'm a software architect/lead dev for a voip company, and I'm currently working on a complete overhaul of our mediation part. We've always used MySQL, historically speaking, and reached limits very quickly (usually after a couple of months). Basically, I'm writing a few documents that present MongoDB, mainly due to the replication features, which fit our usage perfectly. I want to cover all bases (technological/leg
[22:15:54] <teotwaki> al) during the presentation.
[22:15:59] <teotwaki> Derick: ^
[22:16:29] <Derick> yeah, sounds like a clever thing to do!
[22:18:31] <teotwaki> I'll keep an eye on future developments and mongodb-dev for the licensing discussions.
[22:49:49] <therealkoopa> Is it possible to run a query that filters on a boolean within a subdocument? There's an array in the document: people: [{name: 'Jim', active: true},...]. And you want to filter the active people
[22:55:36] <ckd> therealkoopa db.blah.find({ "people.active" : true });
[22:55:44] <ckd> err
[22:55:53] <ckd> sorry, missed the array
[22:56:12] <therealkoopa> ckd: Yea, I think it can be done with the new aggregation framework.
[22:56:23] <ckd> oh, you don't need that
[22:56:24] <therealkoopa> But I don't think you can do it with unwind.
[22:56:27] <therealkoopa> I don't?
[22:57:13] <crudson> therealkoopa: {'people.active':true} will work
[22:58:50] <ckd> yeah, that works with arrays
[23:02:12] <therealkoopa> ckd: What if you want it to return the document even if there are no people?
[23:02:18] <therealkoopa> so people: []
[23:02:34] <therealkoopa> Is that still possible?
[23:03:08] <ckd> so you want to get docs with no people or active people, but not documents containing all inactive people
[23:03:25] <ckd> if that's the case, just use the $or operator
[23:03:31] <therealkoopa> Ok
[23:03:42] <therealkoopa> Yea, I just want to remove all inactive people from the array.
[23:03:54] <therealkoopa> This is so trivial in code, but I'd like to see if I can do it in mongo world
[23:04:07] <ckd> oh, i see what you're saying
[23:04:09] <crudson> or just 'people.active': {$ne:false}
[23:04:26] <ckd> you only want to return the subdocument?
[23:06:11] <therealkoopa> No, I want to return the main document, but without inactive people
[23:06:29] <ckd> oh, I see what you're saying
[23:06:34] <ckd> that's a bit more complex
[23:06:52] <therealkoopa> Yea, I thought this was too simple
[23:06:59] <ckd> :)
[23:07:01] <therealkoopa> Do you need to use aggregation
[23:07:28] <therealkoopa> crudson: That doesn't seem to do the trick
[23:07:51] <crudson> yeah only half paying attention, sorry! you want to actually remove elements of the array?
[23:07:56] <therealkoopa> If there is one active/one inactive.
[23:07:58] <therealkoopa> Yea.
[23:08:15] <therealkoopa> I'd like to have the results NOT contain people that are inactive.
[23:09:11] <crudson> aggregation is the way to go then, with $unwind, $match, $group
[23:09:20] <mrpro> when are collection locks coming?
[23:09:30] <therealkoopa> crudson: Okay, I'll try that
[23:09:45] <ckd> yeah, although it maybe better to do that in code
[23:09:59] <therealkoopa> I was thinking about tha.t
[23:10:25] <therealkoopa> I can easily just do people.filter(..) but was thinking it might make more sense for the database server to do it
[23:10:47] <crudson> just depends how many documents or array elements you'll be returning only to get rid of.
[23:11:10] <crudson> for small counts these will not matter
[23:11:22] <therealkoopa> Approx what's small?
[23:11:35] <therealkoopa> ~ thousand, 100K, million?
[23:13:37] <crudson> just ensure you have the right indexes and your query is as specific as it can be. If you have to do some fiddling in code on the results, just ensure you've done the first bit, and then see what the performance is. Do you have an application that returns a million documents in a single query?
[23:14:13] <therealkoopa> Ok, I'll play it. No it's not a million :)
[23:14:44] <ckd> yeah, if you anticipate more inactive than active users, at that scale, you're moving much more data across the wire than you need and then have to process it…. if you're anticipating only a small percentage of of inactive users, then do it in code
[23:25:42] <therealkoopa> Why does the unwind turn people into an object? I'd like to return the document as is, but with just filtered out inactive people.
[23:31:55] <therealkoopa> Oh, you need to group it. COol, thanks!