PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Friday the 3rd of October, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:22:27] <unholycrab> whats the least destructive way to change the hostnames in a replica set config?
[00:22:34] <unholycrab> rs.reconfig will cause an election
[00:22:50] <unholycrab> the members will be the same, but i want to change the hostnames that refer to them
[00:26:10] <Boomtime> the replica-set configuration determines how the members communicate - if you change those names then you change the way they communicate
[00:26:29] <unholycrab> okay. i want to swap out ther hostnames with the ip addresses of the instances
[00:28:52] <joannac> that's a step backwards in my opinion
[00:29:25] <joannac> but you're not going to get around a reconfig and a stepdown
[00:32:36] <unholycrab> AWS intenral hostnames are no more intersting than ip addresses
[00:32:42] <unholycrab> and they are having DNS problems right now
[00:32:46] <unholycrab> its a useless layer
[00:33:23] <unholycrab> unless you know something that i dont
[00:35:26] <Boomtime> are the IPs static?
[00:36:20] <unholycrab> the internal hostname is tied to the intenral ip address, and we don't have our own DNS layer
[00:38:13] <skot> There are two hostnames for aws hosts and one is tied to the dhcp address, so don't use that one.
[00:57:00] <unholycrab> skot: you are referring to the extenal vs internal hostnames
[00:57:07] <unholycrab> which are tied to the external/internal ip addresses
[04:14:53] <nobody2> hello i have a question about installing mongodb on centos. im a total noob. but i have followed instructions on official web-site. they didnt help me. so here i am. can anybody help me?
[04:15:46] <Boomtime> hi there
[04:16:04] <Boomtime> what did you have trouble with when following the instructions?
[04:16:30] <Boomtime> also, please confirm you mean these instructions: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux/
[04:16:32] <nobody2> mongod doesnt works - doesnt exists
[04:17:08] <nobody2> yes i confirm that i have tried that about dozen times
[04:18:21] <Boomtime> you used yum to do the install?
[04:18:27] <Boomtime> what was the result
[04:18:52] <nobody2> yes i did
[04:18:55] <nobody2> result was
[04:19:01] <nobody2> wait a moment...
[04:20:26] <nobody2> Packages skipped because of dependency problems:
[04:20:26] <nobody2> mongodb-org-2.6.1-2.i686 from mongodb
[04:24:08] <joannac> nobody2: erm, that says the package was skipped being installed
[04:24:23] <joannac> nobody2: it should say further up what dependencies are problematic
[04:24:34] <nobody2> so does that mean it is already istalled?
[04:24:53] <nobody2> joannac
[04:24:54] <nobody2> mongodb-org-mongos-2.6.1-2.i686 from mongodb
[04:24:54] <nobody2> mongodb-org-server-2.6.1-2.i686 from mongodb
[04:24:54] <nobody2> mongodb-org-shell-2.6.1-2.i686 from mongodb
[04:24:54] <nobody2> mongodb-org-tools-2.6.1-2.i686 from mongodb
[04:25:26] <Boomtime> what is your yum install command-line?
[04:25:26] <joannac> nobody2: how about you *pastebin* everything between your command, and the next shell prompt
[04:26:19] <nobody2> ok joannac
[04:26:21] <cheeser> hey there joannac
[04:26:26] <joannac> cheeser!
[04:26:41] <nobody2> sudo yum install -y mongodb-org-2.6.1 mongodb-org-server-2.6.1 mongodb-org-shell-2.6.1 mongodb-org-mongos-2.6.1 mongodb-org-tools-2.6.1
[04:26:53] <nobody2> Boomtime
[04:27:00] <Boomtime> did you intend to install 2.6.1?
[04:28:10] <nobody2> no
[04:28:22] <Boomtime> @nobody2: it appears you are just copying the commands from the tutorial without reading the surrouding text
[04:28:30] <Boomtime> that will go badly
[04:29:20] <nobody2> errr...yes that was my bad
[04:29:41] <Boomtime> the content of your "/etc/yum.repos.d/mongodb.repo" appears to also be wrong
[04:29:58] <nobody2> i tried both options
[04:30:14] <Boomtime> you need to try the right option
[04:30:25] <Boomtime> one will work, the other will die horribly
[04:31:18] <nobody2> also i should say: before trying official instructions i have just entered: "yum install mongodb"
[04:31:52] <nobody2> also due to some stupid filters pastebin doesnt work on my ISP :\ joannac
[04:35:53] <nobody2> https://titanpad.com/UmcxpshHEO - i tried to install it in that way also
[04:38:36] <nobody2> it seems like i have all mongodb expect mongod service
[04:40:08] <joannac> can you just follow the official instructions, and paste what you get in titanpad?
[04:40:49] <nobody2> ok joannac
[04:40:59] <joannac> well, follow the parts of the official instructions that aply to 64-bit
[04:41:08] <joannac> since I think that's what you're on?
[04:45:08] <nobody2> joannac i have 32bit system
[04:47:05] <Boomtime> wow, really? what hardware?
[04:48:10] <joannac> okay, follow the 32-bit steps then
[04:48:31] <joannac> and you're not going to get very far with a 32-bit system, but if you're only testing then i guess it's fine
[04:52:27] <nobody2> joannac Boomtime im just trying to test it on this server - not a big project though. Here is my steps. I couldnt get to run part so it is short. https://titanpad.com/UmcxpshHEO
[04:53:17] <nobody2> also it is a VPS - so you should expect so much from it, aside for a testing purposes
[05:20:16] <nobody2> thanks anyway
[05:57:03] <jekle> is it a bad idea to exclude /var/lib/mongodb/journal from nightly backups?
[05:57:35] <Boomtime> depends how your backup is done
[05:57:42] <Boomtime> how do you do your backup?
[05:58:09] <jekle> Boomtime: I plan to use mongodump
[05:58:47] <jekle> Boomtime: I have a very small database. just a few megabytes
[05:59:28] <jekle> and my tiny vps where mongodb is running only have 2gb remote backup space
[06:00:46] <Boomtime> you mongodump from a running instance?
[06:01:09] <Boomtime> i.e you don't use the --dbpath option, your mongodump conects to your database and dumps directly
[06:01:29] <Boomtime> would that be a true statement?
[06:02:06] <jekle> Boomtime: I launch my first mongo based app on monday morning. so this sort of things I try to figure out in the next days :)
[06:03:34] <jekle> is it okay to dump from a running instance? ( I should read the docs on that :D
[06:03:47] <Boomtime> yes, you should do that
[06:08:47] <jekle> Boomtime: ok now I understand your statement above. if I want to backup from a running instance dbpath is not my friend.
[06:09:29] <Boomtime> neither is --journal
[06:09:42] <Boomtime> mongodump from a running instance is what you want
[06:10:11] <jekle> yup!
[06:10:25] <jekle> so, if I do sane backups with mongodump I can ignore the whole /var/lib/mongodb in my nightly system backup
[06:10:52] <Boomtime> sounds right
[06:11:11] <jekle> thanks for the input! :)
[06:11:22] <Boomtime> be aware that mongodump does not produce a snapshot in time - writes that occur while running may or may not be in the result
[06:11:42] <jekle> thats okay to our business
[06:13:29] <jekle> no critical writes during app runtime. the data is populated periodically in special process
[06:13:39] <Boomtime> perfect
[06:14:33] <jekle> but I will keep that in mind. because I will build more critical apps with mongodb. I love it.
[06:41:16] <hydrajump> hi I need some advice. I'm taking over a mongodb install which is a 3 node replica set version 2.4.4
[06:42:13] <hydrajump> the devs don't want to update yet to 2.6.4 but they want me to move the current database to new ec2 instances which are dedicated.
[06:43:30] <hydrajump> I'm thinking about creating 3 new ec2 instances, installing 2.4.4 on each one and adding them to the currennt replica set. Once the new ones have the data replicated I will terminate the 3 old ones. Any gotchas I should be aware of?
[06:44:00] <hydrajump> Do the 3 news instances need to be setuo exactly like the old ones other than same mongodb version?
[06:45:07] <Boomtime> you should use the latest 2.4.x, which is 2.4.11, this is compatible with your version, requires no upgrade procedure but has a tonne of bugfixes
[06:47:07] <hydrajump> Boomtime: hi really devs are very concerned about things breaking with current version of mongoose etc. So nothing between 2.4.4 and 2.4.11 that devs would need to address?
[06:48:35] <Boomtime> none that i know of
[06:49:42] <joannac> put it this way, there are definitely replica set issues present in 2.4.4, that are fixed in 2.4.11
[06:51:10] <hydrajump> joannac: ok i want to move to 2.6.4 but as devs are concerned about code changes they need to make I've said I'll stick with 2.4 for now. I wasn't aware that 2.4.11 would not require code changes,
[06:54:17] <hydrajump> joannac: is my proposed method of moving the db to the 3 new mongodb instances correct?
[07:30:02] <kakashi_> Hi, I have a question about mongos.
[07:30:46] <kakashi_> our mongos will be deleted by OOM-killer regularly, how can I solve this problem
[07:30:49] <kakashi_> thanks...
[07:33:35] <Boomtime> you have a pagefile?
[07:34:19] <Boomtime> also, run this at a console: db.runCommand( { serverStatus: 1, workingSet: 1 } )
[07:34:29] <Boomtime> and how much physical RAM do you have?
[07:34:57] <Boomtime> sorry, run this at a *mongo shell*: db.runCommand( { serverStatus: 1, workingSet: 1 } )
[07:35:19] <Boomtime> also, please confirm, do you mean "mongoS" process, or "mongoD" process?
[07:35:48] <kali> yeah.
[07:37:52] <kakashi_> mongos~
[07:37:54] <kakashi_> not mongod
[07:38:04] <Boomtime> huh, really? that is usually hard to do
[07:38:20] <kakashi_> I saw the memory usage get higher and higher, finally it will be killed by OS
[07:38:54] <Boomtime> it will likely be too many operations/cursors running
[07:39:07] <Boomtime> how much memory before it is killed?
[07:39:30] <kakashi_> let me check...
[07:39:31] <Boomtime> do you run a lot of queries/aggregations that involve sorting?
[07:39:48] <Boomtime> memory, just an estimate will be fine
[07:42:12] <kakashi_> 30gb resident...
[07:42:36] <Boomtime> wow
[07:42:53] <Boomtime> what version?
[07:43:17] <kakashi_> 2.4.8
[07:44:11] <Boomtime> ok, you want to check the logs for long running ops
[07:44:32] <Boomtime> also, while it is operational, use db.currentOp() to look for long running ops
[07:56:20] <kakashi_> but my question is memory usage becomes higher and it finally consumes all the memory and be killed.
[07:56:39] <kakashi_> but I don't check the currentOP...
[07:59:51] <Boomtime> you will need to, to diagnose what operations are consuming memory in mongodb
[08:02:07] <kali> you should also start graphing the memory usage to try and find a pattern: is it a slow increase, or does it comes in jumps
[08:02:38] <kali> that will also allow you to know you're about to be killed, and run a currentOp() at that particular time
[08:14:37] <kakashi_> it's a slow increase
[08:15:56] <kakashi_> thanks a lot~ I would try to diagnose what operations makes mongos killed
[08:17:19] <kali> how much time does it take to reach the killing point ? minutes ? hours ?
[08:20:41] <kakashi_> one month
[08:33:43] <sabri_> Hello!! I have a problem with a query in mongoDB. I have an embedded document Message like this
[08:33:53] <sabri_> MESSAGE document {     _id: object id,     text: String,     createdAt: Date,     sender: String,     votes: { _id              relevance              verification              category              author            } }
[08:34:28] <sabri_> So a message has an array of votes
[08:34:35] <hydrajump> how do I specify mongodb-org-server-2.4.11 when using yum install? I get an error that the package is not available
[08:36:02] <sabri_> A relevance vote can have this 3 value: High Medium Low
[08:37:43] <sabri_> I would extract only messages which have more "high" votes
[08:40:39] <richthegeek> sabri_: you can get all "high" messages using the aggregation framework, particularly taking a look at $unwind
[08:42:26] <sabri_> Is it possible use the aggregation framework also with Doctrine MongoDB?
[08:42:31] <richthegeek> I don't know
[08:43:15] <richthegeek> although actually looking at your data more, thats not the answer
[08:43:22] <richthegeek> are the votes stored as subdocuments?
[08:43:50] <sabri_> yes
[08:44:08] <richthegeek> you can select using $size
[08:44:18] <richthegeek> but you can't sort using $size, unless you go back to the aggregation framework
[08:44:33] <richthegeek> so it really depends on how you want to define "high"
[08:45:54] <richthegeek> I expect you'll need to use aggregation in combination with $unwind, $project->{$cond, $sum}, $match, $sort
[08:46:40] <richthegeek> the "easiest" way to do this is to denormalize the value of votes cast to a sortable/selectable value onto the root document
[08:46:50] <richthegeek> ie, do that when votes are cast, rather than selecting later
[08:48:25] <sabri_> I would count "high" votes, "medium" votes and "low" votes for each message and then I would select only messages that have received a number of "high" votes greater than "medium" votes and "low" votes
[08:52:02] <hydrajump> i fixed my issue
[09:05:15] <richthegeek> sabri_: something like this shhhoooould work http://pastie.org/private/icyuznmwktirxqzsnitxtw
[09:06:23] <richthegeek> although it will fail when the number of high/medium votes are equal on an object, so switch some of them to $gte depending on what weighting you'd prefer
[09:10:35] <tjap> I have an issue with a failed migration of chunks between shards
[09:10:46] <sabri_> richthegeek_: thank you very much!! Only a question: How I can write the query?
[09:10:51] <tjap> anyone willing to point me in the right direction?
[09:12:34] <tjap> 2014-10-03T00:19:07.682+0100 [conn97] moveChunk migrate commit not accepted by TO-shard: { active: true, ns: "dbname.content", from: "shard3/mongo-shard3-repl1:27018,mongo-shard3-repl2:27018", min: { _id: ObjectId
[09:12:34] <tjap> ('4f79879b0cf23516915b205d') }, max: { _id: ObjectId('4f7987a40cf23516915b4309') }, shardKeyPattern: { _id: 1.0 }, state: "fail", errmsg: "", counts: { cloned: 0, clonedBytes: 0, catchup: 0, steady: 0 }, ok: 0.0
[09:12:34] <tjap> } resetting shard version to: 0|0||000000000000000000000000
[09:13:02] <tjap> this is in the mongodb.log of the TO shard
[09:13:45] <tjap> it does not resolve by it self since it will retry and exit with the same error
[09:15:19] <sabri_> richthegeek_: So i can insert the conditions inside the db.dbname.find()?
[09:39:00] <richthegeek> sabri_: no, this is the aggregation framework
[09:39:06] <richthegeek> db.dbname.aggregate()
[09:41:39] <richthegeek> whilst that's definitely something that works, it'll be pretty slow on larger datasets so don't do it live if you expect it to be done more than once a second or something
[09:42:07] <richthegeek> better to project those fields on-insert or use a cronjob to $out that pipeline into somewhere on a regular basis
[09:44:15] <Lope> I'm having an issue updating multiple documents in the console. When I run this db.replaceTeam.update({s:'a'},{$set:{c:0}},{$multi:true}); it says: WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 0 })
[09:44:41] <Lope> but db.replaceTeam.find({s:'a'}).count(); is 67
[11:07:55] <Sjimi> Is there a possibility to check if an array contains one or more from an array? ($all is used to check if all the elements are in the array, I need the opposite)
[11:17:44] <kali> Sjimi: $any ?
[11:38:32] <Sjimi> kali nope does not seem to exist?
[14:37:13] <krion> hi
[14:57:03] <shin__> Hi if I do an update via mongo shell, how can I print out WriteResult.nModified?
[14:57:26] <shin__> i do something like var result = db.books.update(
[14:57:33] <shin__> but result is undefined
[15:04:38] <shin__> ...oh it's because my client isn't 2.6
[15:55:45] <akp> how would one do a monogo->find(array(clause))->count() ?
[15:56:13] <akp> i want to do a search and get the count for the search, is this possible?
[16:28:18] <loincloth> aloha
[16:28:42] <loincloth> i'm using Mongoid and want to filter what attributes make it to JSON... is defining #as_json the best way for that?
[16:35:35] <loincloth> or as_document?
[16:42:12] <krion> hello
[16:42:34] <krion> i want to do a cleanup of replicaset
[16:42:40] <krion> i'm hitting 90% storage usage
[16:43:16] <krion> i heard that i can delete all files and let him rebuild from master
[16:44:47] <kali> krion: yes. just stop the secondary that is filling up, remove everything from its dbpath, and start it again
[16:45:20] <kali> krion: reference here: http://docs.mongodb.org/manual/tutorial/resync-replica-set-member/
[16:45:52] <kali> krion: http://docs.mongodb.org/manual/tutorial/resync-replica-set-member/#automatically-sync-a-member more specifically
[16:48:36] <krion> http://docs.mongodb.org/manual/tutorial/resync-replica-set-member/
[16:48:40] <krion> too late ;)
[16:48:53] <krion> alright...
[16:50:01] <krion> kali: no need to remove from rsConf ?
[16:50:12] <krion> as i read
[16:50:24] <krion> just stop, rm, start
[16:50:27] <kali> nope. just stop, rm everything under dbpath, and start
[16:50:31] <krion> kali: thanks
[16:50:33] <kali> and wait.
[16:50:44] <krion> alright
[16:51:15] <krion> i read a bit more on "primary" "secondary" too, because i've to do it on both shard/replicaset
[16:53:18] <kali> just do it one at a time and make sure you have fully recovered before moving on the the next replica. do the secondaries first, then step down the remaining primary, stop it, rm, start
[16:54:01] <kali> you can do both shards in parallel, just be carfull not to break two nodes from the same RS at the same time
[16:58:29] <krion> kali: alright, thanks :)
[16:58:40] <krion> it's a bit hard for a first attempt at mongodb ;)
[16:58:57] <krion> s/hard/hard introduction/
[17:02:59] <kali> krion: it's more frightening than dangerous. just be careful. you'll find out mongodb is much more admin friendly than most relational dbs
[17:32:21] <znn> i have a json file, and i want to store it in mongodb
[17:32:35] <znn> are there instructions somewhere for teaching me how to do this with pymongo?
[17:33:39] <znn> mongoimport may be what i'm looking for though
[18:27:42] <huleo> hi
[20:33:42] <feathersanddown> guess what..... I rebooted , reenter application and now I can login into application
[20:33:51] <EmmEight> http://homestarrunner.com/fisheyelens.html
[20:41:27] <deanclkclk> hello folks
[20:41:33] <deanclkclk> what could be causing this issue?tail -f ~/workspace/mongo/mongoArb.log ************* Thu Oct 2 09:02:41.058 [initandlisten] exception in initAndListen: 12596 old lock file, terminating Thu Oct 2 09:02:41.058 dbexit: Thu Oct 2 09:02:41.058 [initandlisten] shutdown: going to close listening sockets... Thu Oct 2 09:02:41.058 [initandlisten] shutdown: going to flush diaglog... Thu Oct 2 09:02:41.058 [initandlisten] shutdown: going to close sockets..
[20:42:36] <deanclkclk> my arbiter isn't running
[20:42:37] <deanclkclk> anyone?