PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 7th of October, 2012

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:06:44] <aster1sk> My experience tells that the officially supported drivers handle that extremely well.
[00:16:40] <arex\> I'm following the tutorial to set up a Replica Set
[00:17:27] <arex\> When I do rs.add() though, I get this error message "exception: need most members up to reconfigure, nok ok: hostname"
[00:17:42] <arex\> Where hostname is the actual hostname obviously
[00:17:43] <aster1sk> did you rs.initiate()?
[00:17:53] <aster1sk> Or initialise() I forget.
[00:17:55] <arex\> On the primary member, yes
[00:18:14] <aster1sk> Ahh good, so an rs.add("mongo.tld") fails?
[00:18:32] <aster1sk> Have you tried IP (just as a test)?
[00:18:56] <arex\> rs.add("mongo.tld") took a few seconds, then failed the same way
[00:19:11] <arex\> aster1sk, no but i did try to connect to the other members using mongod --host <hostname>
[00:19:15] <aster1sk> You replaced 'mongo.tld' with your actual mongo hostname right?
[00:19:18] <arex\> (which worked)
[00:19:22] <aster1sk> Ahh ok.
[00:19:46] <aster1sk> try rs.add('ip of rs secondary')
[00:20:16] <arex\> aster1sk: Same error
[00:20:22] <aster1sk> Well, that's odd..
[00:20:24] <aster1sk> Oh I know.
[00:20:52] <aster1sk> Could it be your listen address?? Maybe not since you can `which mongo` <IP>
[00:21:12] <arex\> I'm on Windows
[00:21:23] <arex\> By default MongoDB listens to all IPs
[00:21:23] <aster1sk> But if the secondaries are not configured to listen on 0.0.0.0 or the actual interface address then you'll have problems.
[00:21:27] <arex\> Perhaps I'm not following you
[00:21:54] <aster1sk> No I think you are, I hope this is a development machine...
[00:21:58] <arex\> Yes
[00:22:10] <aster1sk> Mongo replicas on windows sounds extremely risky in a production env.
[00:22:14] <aster1sk> Good.
[00:22:35] <arex\> I don't want to get side-tracked, but why? :)
[00:22:48] <aster1sk> tystr: my only experience with mongo is *nix. I have a RS primary / secondary / arbiter in my production env.
[00:23:01] <aster1sk> Across (not recommended) an openvz cluster.
[00:23:26] <aster1sk> arex\: this is a long debate, I could get /kick'd from here for getting into it ;P
[00:23:57] <arex\> Sounds suspicious :D
[00:24:02] <arex\> Anyway...
[00:24:10] <aster1sk> To keep it really light mongo plays nicer with *nix than windows, not to mention all of the other 'risks' running windows in a production environment... but enough of all of that.
[00:24:22] <arex\> I can do mongod --host <secondary> from the primary
[00:24:28] <arex\> So I know I can connect
[00:24:38] <arex\> -d
[00:24:46] <aster1sk> That's extremely odd, what version (I assume 2.2 or latest)
[00:24:52] <arex\> 2.2.0 yes
[00:24:59] <arex\> Clean install yesterday
[00:25:00] <aster1sk> 64 bit?
[00:25:05] <arex\> Yes
[00:25:17] <aster1sk> Usure there's no windows firewall nonsense getting in the way here?
[00:25:42] <arex\> Pretty sure. I've tested the connections
[00:26:02] <aster1sk> pastie.org your error again if you will.
[00:26:17] <aster1sk> I'm in a 60 x 80 screen /irssi console here.
[00:26:20] <arex\> Ok
[00:27:13] <arex\> Well, I can't really
[00:27:17] <arex\> But I can type it
[00:27:22] <aster1sk> Ahh that's fine.
[00:27:41] <aster1sk> Perhaps silly question but are these boxes behind NAT?
[00:27:47] <arex\> "errmsg" : "exception: need most members up to reconfigure, not ok : vuu-pay-devmdb1:27017",
[00:27:57] <arex\> They are on a LAN
[00:28:12] <arex\> (On an ESXi host actually)
[00:28:13] <aster1sk> Is there any data in this DB?
[00:28:16] <arex\> No
[00:28:25] <aster1sk> Meaning can you wipe your db?
[00:28:28] <arex\> Yes
[00:28:32] <aster1sk> Or just set a different path.
[00:28:36] <aster1sk> Then restart mongo.
[00:28:50] <arex\> The client? Or the server? On which machine?
[00:28:51] <arex\> :D
[00:28:55] <joe_p> is the secondary machine running with the --replSet option?
[00:29:11] <arex\> Yes, I have replSet=rs0 in all config files
[00:29:11] <aster1sk> LOL oh I didn't even think of that.
[00:29:28] <joe_p> the log on the secondary should be showing lots of "EMPTYCONFIG" messages in the logs
[00:29:49] <aster1sk> Ill let joe_p take over here.
[00:30:19] <joe_p> thats ok, just making a suggestion - I know nothing about windows
[00:30:25] <arex\> joe_p: You are correct, sir
[00:31:44] <arex\> Uhm, perhaps not.
[00:31:53] <arex\> I only had EMPTYCONFIG on one of the seconday members.
[00:32:35] <arex\> From the mongo console, can I query configuration parameters?
[00:32:43] <arex\> To check :)
[00:35:08] <joe_p> were you getting the EMPTYCONFIG message on the secondary your trying to add? If not restart it and make sure the repliaset is configured to match the master. then try adding it again as a rs member on the primary
[00:35:47] <arex\> joe_p: No it was a secondary I hadn't tried to add yet. I'll check the config files on both the secondaries and restart them.
[00:39:14] <arex\> ok now I have EMPTYCONFIG error messages in both logs
[00:40:35] <arex\> meaning both secondaries
[00:46:52] <arex\> joe_p, aster1sk: ? :o)
[00:49:13] <joe_p> did you try rs.add
[00:50:42] <arex\> yes
[00:50:43] <arex\> same error
[00:51:01] <arex\> no
[00:51:03] <arex\> i was lying
[00:51:08] <arex\> i misspelled the hostname this last time
[00:51:09] <arex\> :)
[00:51:13] <arex\> Worked
[00:51:19] <arex\> Thanks joe_p and aster1sk
[00:51:26] <joe_p> yw
[00:53:33] <arex\> Hmm. I messed that up. I made the arbiter primary, the primary secondary, etc :)
[00:54:21] <arex\> Hoping I can run rs.remove() and it'll be fine
[00:55:56] <arex\> Ouch, guess not
[00:57:23] <arex\> How do I delete a replica set? :D
[01:01:32] <joe_p> rs.conf() shows the configuration, rs.remove("hostname:port")
[01:01:41] <arex\> Yup, I removed the secondaries
[01:01:47] <arex\> What do I do on the primary?
[01:02:10] <joe_p> rs.remove("...")
[01:02:41] <arex\> when I try to remove the primary (itself) it says: can't find self in new replset config
[01:03:18] <joe_p> why are you removing the primary?
[01:03:31] <arex\> Maybe I just use mongo on the correct primary and it'll fix it up when I add the correct secondaries?
[01:03:56] <arex\> joe_p: I was just thinking I should get to a "blank state"
[01:05:24] <arex\> I'm guessing I can just delete the data directories. That should work :)
[01:05:51] <joe_p> easy way to start over, yes
[01:08:19] <arex\> Because actually I want to add a readable secondary and an arbiter instead of two "normal" secondaries
[01:11:32] <arex\> Hm, looks like all secondaries are "readable"
[01:12:11] <joe_p> do you do the arb with rs.addArb
[01:12:59] <arex\> yes, that was my plan
[01:13:25] <arex\> just wondering how to add a readable secondary, but it seems that is not a special setting
[01:13:48] <arex\> (i just set up something similar using sql server)
[01:16:15] <arex\> i guess i just do rs.add("secondary") and rs.addArb("arbiter")
[01:16:22] <arex\> and that's it
[01:21:21] <arex\> joe_p: Is load distributed on the replica members, or is everything happening on the primary until the primary fails? While the primary is working I can offload it by running read-only operations on the secondary, right?
[08:15:29] <tpae> does findOne have better performance than find ?
[08:23:54] <algernon> tpae: it has to return only one document, so even if you only look at network throughput, findOne's still more performant.
[11:22:28] <arex\> So, neither the heartbeat frequency, or the heartbeat timeout period can be configured?
[11:22:48] <arex\> I'm referring to the heartbeat used in a replica set, btw
[12:03:38] <MartinElvar> db.model('Game').game.find({_id : new ObjectID(data.game)}).toArray( function(err, res).. i'm getting toArray doesn't exist, can't i use toArray with mongoose?
[12:05:59] <wereHamster> MartinElvar: does mongoose tell you that you can?
[12:06:57] <MartinElvar> wereHamster: Not exactly, tho i would suppose so, been googling around for a while now, and i can't seem to find a way, to turn my result into a array :/
[12:07:16] <wereHamster> You don't have to google. Just read the docs.
[12:10:13] <MartinElvar> Thank you, that helps a lot :)
[12:10:42] <wereHamster> who would've thought.. reading the documentation is actually useful...
[12:10:46] <arex\> Does anyone know if the replica set heartbeat frequency or timeout period can be configured?
[12:11:06] <MartinElvar> wereHamster: yea, feel the irony :)
[16:51:34] <n4irc> I've installed mongodb for local use on Opensuse 12.2 and localhost:27017 works as expected but I cannot connect my browser to https://localhost:28017/ or http://localhost:28017/ . Any idea how to diagnose/repair this?
[16:55:03] <kali> n4irc: it should be http, not https. are you running with --rest ?
[16:56:03] <n4irc> kali: My distro installs it, we use an /etc/mongodb.conf is there an option there to turn on the restful server?
[16:56:47] <kali> n4irc: it should be there by default, iirc, correctly, but i think there is an option to disable it
[16:57:22] <kali> --nohttpinterface¶
[16:57:37] <kali> forget about --rest
[17:01:24] <n4irc> kali: ps reports: /usr/sbin/mongod --quiet -f /etc/mongodb.conf
[17:01:43] <kali> well, you need to check that mongodb.conf
[17:24:49] <n4irc> kali: Thanks there was a line nohttpinterface = true in the mongodb.conf file, good call!
[18:33:59] <mrpro> hi
[18:34:08] <mrpro> how do i add my own commands to shell
[18:34:21] <mrpro> i need to drop some tables in several DBs once in a while. it would be nice to do it with one command
[19:08:28] <kali> mrpro: http://www.mongodb.org/display/DOCS/Overview+-+The+MongoDB+Interactive+Shell#Overview-TheMongoDBInteractiveShell-.mongorc.js
[20:41:49] <chrisroark> question
[20:43:17] <chrisroark> how would I do something along the lines of 'menu.'+i+'.content' when I'm updating via $set
[20:44:34] <chrisroark> it's giving me 'unexpected +', and if I define the above as a string, it uses the variable name rather than the string
[20:45:21] <chrisroark> but if i use 'menu.0.content', it works fine
[20:48:35] <chrisroark> alternatively, how can i update nested objects?
[21:49:29] <augustl> how do I $push to the filters array in this document? {query: {attrFilters: []}}
[21:49:44] <augustl> {"$push": {query: {attrFilters: "hello, world"}}} errors with "Cannot apply $push/$pushAll modifier to non-array"
[21:51:11] <augustl> {"$push": {"query.attrFilters": "hello, world"}} worked
[21:54:41] <ranman> @augustl: so what is your question?
[22:11:39] <augustl> ranman: as you can see I figured it out :)
[22:11:55] <augustl> ranman: my original question was "how do I $push to the filters array in this document?"
[22:11:56] <ranman> ok good :D
[22:12:16] <ranman> gotta rock that dot notation
[23:57:35] <kevBook> Hi i have sort and limit problem -
[23:58:00] <kevBook> Event.find().sort('start_date').limit(perpage)
[23:58:32] <kevBook> what is happening is : it applies the limit first then sorts the values w/ limited results
[23:58:44] <kevBook> how can i achieve reverse behaviour