PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Tuesday the 29th of July, 2014

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[00:23:54] <a|3xx> hi
[00:24:10] <a|3xx> is it possible to completely turn off authentication temporarily?
[00:24:37] <joannac> sure. restart everything without --auth
[00:27:53] <a|3xx> joannac, i have noauth=true in config file
[00:31:39] <joannac> a|3xx: but you think auth is still on?
[00:33:05] <a|3xx> its telling me authentication failed when i try to use another database
[00:33:45] <a|3xx> gawd auth is broken in mongodb
[00:37:04] <joannac> a|3xx: could you elaborate?
[00:37:26] <a|3xx> either i am having bugs or horrible design flaws
[00:38:02] <a|3xx> i added a user to admin db and granted all the admin roles
[00:39:03] <a|3xx> but when i try to connect using a new database i created, it gives me auth failed error, looks like it is looking for my user inside this new db
[00:39:21] <joannac> did you specify autheticationDb
[00:39:38] <joannac> or whatever it's called in whatever driver you're using?
[00:40:16] <a|3xx> wtf is this "authenticationDb" concept so foreign to the idea that db engine has a single database of users
[00:41:24] <joannac> in 2.4, no
[00:41:31] <joannac> users are stored per database
[00:41:40] <a|3xx> i am using 2.6
[00:42:23] <a|3xx> i am using php with connection string "mongodb://user:password@host/mynewdb"
[00:43:25] <joannac> then don't specify "mynewdb"
[00:44:14] <a|3xx> well the design of this system sucks
[00:47:54] <joannac> because you explicitly told your client to authenticate against the wrong database? okay then...
[00:48:37] <a|3xx> well i didn't mean to, i just meant that this should be the database that i need to be using
[00:48:55] <a|3xx> for queries, not for auth
[00:48:57] <joannac> to my knowledge, you specify the database after you connect, in PHP
[00:49:27] <a|3xx> this is very confusing, no?
[00:50:36] <joannac> For someone who's coming from another driver where you *do* specify the database you want in the connection string, sure
[00:52:24] <joannac> I think all the mongodb drivers separate "getting a connection" from "specifying the database you want to query"
[00:52:29] <joannac> but don't quote me on that
[01:07:59] <a|3xx> joannac, thanks for your tip
[02:17:54] <regreddit> I'm totally lost on aggregation $group-ing by multiple properties: [{user:123,status:1},{user:123,status:2},user:123:status:1}] - how can I group by user, then by status, with a sum of each status? so in this example:
[02:17:58] <regreddit> { "_id" : {"user" : 123 },"status" : [{ "status" : "1", "total" : 2 }, { "status" : "2", "total": 1 }]}
[02:48:34] <rh1n0> Im trying to get MMS to work but no matter what i do it i cannot get my node to send any data. Log says it thinks there is another daemon running? there isn't.
[03:01:01] <regreddit> rh1n0, how long has the agent been running?
[03:45:23] <Zane> Is there a guide somewhere that teaches you how to design mongodb schema?
[03:47:30] <Zane> nevermind*
[04:02:34] <rh1n0> regreddit sorry just now saw your post - its been running for a few days
[04:30:25] <joannac> rh1n0: PM me your group name and I'll ahve a look
[04:30:53] <rh1n0> joannac ok thanks
[09:57:21] <weebl> hey guys, what role do i need for executing serverStatus : 1 command
[09:58:24] <rspijker> weebl: clusterMonitor
[09:58:34] <weebl> ty
[13:01:33] <rasputnik> trying to get a sharded setup firewalled. do the mongocs need to talk to anything but each other? i know the mongos instances speak to them, but they don't need connectivity to the replica sets that make up the shard, right?
[13:06:54] <techfreak> sup guys
[13:07:10] <techfreak> -1406639082 secs (-390733.08 hrs) behind the primary
[13:07:13] <techfreak> is it okay?
[13:08:04] <techfreak> and replica stuck at STARTUP2
[13:10:09] <rspijker> techfreak: I doubt your oplog will cover that...
[13:10:18] <rspijker> furthermore, I doubt your time is set correctly
[13:10:39] <techfreak> rspijker: both at same timezone
[13:11:24] <rspijker> do they both have the same time?
[13:16:45] <techfreak> rspijker: yep
[13:17:19] <rspijker> then check if your oplog covers it, if not, resync
[13:17:38] <techfreak> rspijker: source: <MASTER>:27017
[13:17:38] <techfreak> syncedTo: Tue Jul 29 2014 17:14:19 GMT+0400 (MSK)
[13:17:38] <techfreak> -1406639659 secs (-390733.24 hrs) behind the primary
[13:17:38] <techfreak> source: <SLAVE>:27017
[13:17:38] <techfreak> syncedTo: Thu Jan 01 1970 04:00:00 GMT+0400 (MSK)
[13:17:39] <techfreak> 0 secs (0 hrs) behind the primary
[13:17:44] <boombaloo> is it possible to configure replicaset directly in mongodb config file/
[13:17:56] <boombaloo> or does the daemon have to be started with --replSet NAME
[13:18:15] <boombaloo> Iguess what im asking is, is there any replset config directive in mongo config file ?
[13:18:18] <rspijker> boombaloo: it can go into the config
[13:18:37] <rspijker> boombaloo: docs.mongodb.org/manual/reference/configuration-options/
[13:18:59] <boombaloo> rspijker: cheers, I'll have a look
[13:19:02] <techfreak> rspijker: any advice?
[13:19:33] <rspijker> techfreak: what does rs.status() give you on the primary
[13:19:39] <rspijker> btw… is this master and slave what you put in there?
[13:19:45] <rspijker> or is this old-ass master-slave replication style?
[13:21:17] <techfreak> rspijker: {
[13:21:17] <techfreak> "_id" : 7,
[13:21:17] <techfreak> "name" : "<SLAVE>:27017",
[13:21:17] <techfreak> "health" : 1,
[13:21:17] <techfreak> "state" : 5,
[13:21:18] <techfreak> "stateStr" : "STARTUP2",
[13:21:18] <techfreak> "uptime" : 202,
[13:21:19] <techfreak> "optime" : Timestamp(0, 0),
[13:21:19] <techfreak> "optimeDate" : ISODate("1970-01-01T00:00:00Z"),
[13:21:20] <techfreak> "lastHeartbeat" : ISODate("2014-07-29T13:17:29Z"),
[13:21:20] <techfreak> "lastHeartbeatRecv" : ISODate("2014-07-29T13:17:27Z"),
[13:21:21] <techfreak> "pingMs" : 0
[13:21:21] <techfreak> }
[13:21:25] <techfreak> rspijker: i have arbiter
[13:21:37] <techfreak> rspijker: just using common words ;)
[13:22:22] <cheeser> techfreak: use a pastebin next time, please
[13:22:31] <techfreak> np pal
[13:23:54] <rspijker> anything in the logs techfreak ?
[13:24:16] <boombaloo> rspijker: so adding replication.replSetName = "myname" into mongo config file should do the trick
[13:24:32] <rspijker> boombaloo: assuming 2.6+, yes
[13:24:47] <boombaloo> is it different for earlier versions ?
[13:25:12] <rspijker> boombaloo: it is, the YAML config style was introduced in 2.6 iirc
[13:25:14] <techfreak1> rspijker: sorry
[13:25:30] <rspijker> boombaloo: in earlier versions it’s still possible, just a different syntax for the cfg
[13:25:32] <techfreak1> rspijker: git connection problem. you wrote something?
[13:25:40] <techfreak1> got*
[13:25:44] <rspijker> techfreak1: what do the logs say?
[13:26:01] <rspijker> techfreak1: startup2 should normally be temporary, it should go to either secondary or recovering
[13:26:02] <techfreak1> rspijker: on "slave"?
[13:26:05] <rspijker> yeh
[13:26:29] <boombaloo> rspijker: where can i find older docs ?
[13:26:45] <boombaloo> docs.mongo will always take me to 2.6
[13:27:03] <rspijker> boombaloo: the page has options in the bottom left hand corner
[13:27:09] <rspijker> if you click that you can select the version
[13:27:33] <boombaloo> would be better to put them on top imho
[13:28:22] <rspijker> well.. it says mongodb manual <version> top left. If you click that version, the options thing also expands...
[13:28:23] <techfreak1> rspijker: nothing unusual. a lot of connection info. also i have a 160G db. maybe i just need to wait?
[13:28:27] <boombaloo> how long has 2.6 been out ?
[13:28:30] <rspijker> but, apparently it’s not clear enough :)
[13:28:34] <rspijker> for a while now, few months
[13:28:43] <rspijker> think they are up to 2.6.3 or something by now
[13:29:03] <rspijker> techfreak1: well… I would normally expect it to go to recovering, meaning it’s actually synching stuff
[13:29:14] <boombaloo> i think we'll go with 2.4 then
[13:29:33] <techfreak1> rspijker: thanks a lot man. i'll wait
[13:29:49] <techfreak1> rspijker: my first replica so i little nervous
[13:29:53] <rspijker> boombaloo: 2.6 is stable, it has quite a lot of improvements, I would actually advise going for that instead
[13:30:22] <boombaloo> btw
[13:30:26] <rspijker> techfreak1: well, good thing is that with replicas you can’t really destroy anything :)
[13:30:37] <boombaloo> you said the config file is YAML ?
[13:31:08] <rspijker> on 2.6 it is, yes
[13:31:16] <rspijker> well, YAML-based
[13:47:04] <boombaloo> this is abnormal... http://pastebin.com/MH4qG4r1
[13:47:17] <boombaloo> its configured to listen on ALL IPs yet it binds to localhost
[13:47:21] <boombaloo> i tried to restart it
[13:47:29] <boombaloo> but it ignores the config file uhh
[13:50:46] <rspijker> boombaloo: are you actually telling it to use the cfg file?
[13:51:01] <rspijker> and I’m not sure whether 0.0.0.0 means all IPs as it usually does
[13:51:04] <boombaloo> I HOPE SO :-) /usr/bin/mongod --config /etc/mongod.conf
[13:51:29] <rspijker> ok, and what are you saying in the cfg file?
[13:51:44] <boombaloo> what I just posted in the pastebin above
[13:51:52] <boombaloo> http://pastebin.com/MH4qG4r1
[13:52:16] <rspijker> and what would you actually like it to bind to if not localhost?
[13:53:02] <boombaloo> err, ALL IPs ?
[13:53:10] <boombaloo> 0.0.0.0 means all IPs
[13:53:46] <rspijker> not necesarilly
[13:53:51] <rspijker> try specifying it
[13:54:19] <boombaloo> I want it to bind to all ips
[13:54:20] <boombaloo> simples
[13:54:43] <boombaloo> like when I say 0.0.0.0 in Postgres nginx or apache conf it binds to all ips on given port..
[13:55:07] <boombaloo> I mean all IPv4 IPs
[13:56:46] <boombaloo> like honestly this is crazy :-)
[14:01:19] <kees_> boombaloo, maybe is has anohter config it reads from?
[14:02:26] <kees_> besides; maybe try it with the bind_ip config commented out
[14:23:44] <kkspy> Hello. I am using latest stable mongodb (2.6.3) and I have a collection with 35k objects in it. Simple query db.jobs.find({status:'a'}).explain() shows 'nscanned: 5277' and the query takes a while.
[14:24:41] <kkspy> Of course I have db.jobs.ensureIndex({status:1}) and explain() says 'cursor: BtreeCursor status_1'
[14:24:57] <kkspy> Please give me any direction.
[14:25:06] <Derick> how many distinct values for status do you have?
[14:25:27] <kkspy> Just a few, let me check
[14:25:33] <Derick> that's the thing
[14:25:42] <kkspy> [ "a", "s" ]
[14:25:45] <Derick> an index for a field with (say) 3 distinct values doesn't help a lot
[14:26:11] <kkspy> There are two distinct values…
[14:26:18] <Derick> yeah, so even worse
[14:26:46] <kkspy> But why does mongodb scan those objects?
[14:26:54] <Derick> it needs to read those documents
[14:27:03] <Derick> apparently you have 5277 documents with status=a
[14:27:12] <Derick> can you poste the whole explain() output in a pastebin?
[14:27:18] <kkspy> 10 sec
[14:27:33] <kkspy> http://bpaste.net/show/SGtcPj8fxlc7wgU4MWAf/
[14:30:24] <kkspy> I'm not getting why mongodb needs to read those documents. MySQL works fine in the same situation.
[14:33:50] <BurtyB> kkspy, to me it looks like you're asking it to return the whole document so it's going to need to read them to be able to return them?
[14:34:14] <kkspy> BurtyB: how about returning a cursor? :)
[14:39:04] <kkspy> BurtyB: Oh, I think I got it. Explain() forces it to read documents immediately.
[14:40:17] <kkspy> But why do they come into nscanned? Nscanned means number of checked documents AFAIK.
[15:19:44] <uf6668> hi folks
[15:19:54] <uf6668> can anyone tell me how to gain exclusive access to a db please?
[15:20:09] <uf6668> I want to prohibit anyone else from reading/writing
[15:30:51] <Nodex> there are various authentication things available and user access control uf6668
[15:45:52] <uf6668> Nodex: not access control, actual spinlock
[15:46:06] <uf6668> I want to keep others from read+writing while I'm writing
[16:10:35] <boombaloo> mongodb main process (12213) terminated with status 1 uhh
[16:10:38] <boombaloo> what is that ?
[16:11:59] <boombaloo> I basically can't start mongo because exit status 1 - but that's all I know because there is not hing else in the logs
[16:12:20] <redsand_> boombaloo: strace -f it
[16:12:25] <boombaloo> :-)
[16:12:27] <boombaloo> nice
[16:12:29] <boombaloo> haha
[16:12:38] <boombaloo> well im starting it from upstart
[16:12:46] <boombaloo> and id have to know the PID
[16:12:56] <boombaloo> but it crashes so fast that i cant really catch it
[16:13:01] <boombaloo> im not that fast :-)
[16:13:08] <Nodex> check the logs
[16:13:33] <boombaloo> Nodex: there is nothing in them
[16:13:37] <boombaloo> and even this is in syslog
[16:13:59] <boombaloo> no trace in mongodb.log
[16:14:08] <boombaloo> id LOVE to check the logs :-)
[16:14:15] <Nodex> spawn it on the shell without your startuper of choice
[16:14:42] <Nodex> "startuper" is a trademark btw
[16:15:21] <boombaloo> ok will try that noq
[16:15:24] <boombaloo> sec
[16:15:52] <boombaloo> when I run /usr/bin/mongod --config /etc/mongod.conf
[16:15:55] <boombaloo> it just hangs
[16:16:05] <boombaloo> netstat does not show any output
[16:16:20] <boombaloo> as like its efo NOT binding to any IP
[16:16:28] <boombaloo> it just hangs
[16:17:17] <Nodex> very strange
[16:17:20] <boombaloo> yep
[16:17:27] <Nodex> can you strace that command?
[16:17:28] <boombaloo> totally weird...
[16:17:55] <Nodex> I had a problem similar in the ubuntu kernel before
[16:18:24] <boombaloo> loving this...stracing mongo
[16:19:07] <boombaloo> not really sure what should I be looking for
[16:19:23] <boombaloo> there is HUGE amount of select(10, [8 9], NULL, NULL, {0, 10000}) = 0 (Timeout)
[16:19:57] <Nodex> I can't recall where my problem was, it turned out that I had to run it as root from the terminal to even get it to run properly for some strange reason
[16:20:08] <Nodex> using --fork, even upstart wouldn't start it properly
[16:20:26] <boombaloo> oh my
[16:20:30] <boombaloo> mongo... :-)
[16:20:49] <boombaloo> this is really bad
[16:21:45] <Nodex> it was down to the kernel in the end. Reinstalled the system and it was fine
[16:23:15] <boombaloo> hahaa
[16:23:18] <boombaloo> brilliant :-)
[16:23:28] <boombaloo> let's all of us reinstall kernels...because Mongo
[16:23:35] <boombaloo> sorry Nodex had to make fun of that
[16:23:37] <boombaloo> seriously...
[16:23:43] <boombaloo> im running this on Ubuntu LTS
[16:23:51] <boombaloo> and would expect mongo to RUN
[16:23:57] <boombaloo> on LTS
[16:26:09] <sasi_> hey
[16:26:26] <Nodex> that's what I ran it on. it was OVH's messed up kernel, not really Mongo's fault in the end
[16:26:31] <sasi_> is there any limit on string length of a property mongo can store?
[16:26:41] <sasi_> db.configItemsTest.insert( { "_id" : "apnscertificate", "_class" : "com.airwatch.chat.domain.ConfigurationItem", "properties" : { "certificate" : "MIIMiwIBAzCCDFIGCSqGSIb3DQEHAaCCDEMEggw/MIIMOzCCBr8GCSqGSIb3DQEHBqCCBrAwggasAgEAMIIGpQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQYwDgQIJbzcs5ZZxWYCAggAgIIGeNAYALYOVLeBCQmOhB6B6jAN7Un4Nd+u/NQIDmo8aSKCkfo6G/dmaIGtm7w2P25a131Aa0+obSjN+SkcUwjvPFQjMUjN//QlwH8VLsPD65npEHbj7JTaE/8+i1gxH5dIYb4FBkiiw/MKQwWQt0vo
[16:26:43] <boombaloo> Nodex: butI'm running base Ubuntu LTS
[16:26:45] <boombaloo> no magic
[16:26:55] <sasi_> I am trying to insert this and mongo goes crazy
[16:26:56] <Nodex> boombaloo : So was I
[16:27:02] <Nodex> and I am not saying my problem is the same as yours
[16:27:04] <sasi_> it works if i change certificate to something smaller
[16:27:09] <boombaloo> hmm
[16:27:14] <Nodex> sasi_ : only that the string is UTF-8
[16:27:38] <Nodex> and it's less than 16mb as that's the document length
[16:27:40] <Nodex> + limit
[16:27:41] <sasi_> Pardon me, but is the certificate I am trying to insert UTF-8 encoded?
[16:28:39] <Nodex> sasi_ : I don't know, it's not my certificate
[16:28:56] <sasi_> Well, thank you
[16:28:57] <sasi_> :)
[16:29:48] <Nodex> looks base64 encoded to me so it should be in the UTF-8 range
[16:35:37] <boombaloo> like what in goodness name does TERMINATED WITH STATUS 1 MENA
[16:35:38] <boombaloo> mean
[16:35:49] <boombaloo> thats a simple question
[16:40:22] <boombaloo> Nodex: you know what the prolem was ?
[16:40:26] <boombaloo> permissions...
[16:40:44] <boombaloo> somehow upstart seems to set /var/libmong to root.root
[16:40:59] <boombaloo> id expect mongo 10gen install to sort this out...
[17:21:38] <mikebronner> im new to MongoDB, so please bear with me. I'm looking to combine a find() query with an aggregate() query, is this possible? specifically i would like to return the distance between each record and a given coordinate. I have the two queries running seperately with no issue, but I need to combine the results, so as to report the distance in the find query as well, or vice-versa
[17:21:38] <mikebronner> get the where clauses added to the aggregate query
[18:50:33] <huleo> guys, quick one: can I sort by creation date without creating additional fields? meaning, creation date is in _id already
[18:50:45] <huleo> hmm
[18:51:15] <huleo> I'm using mongoose; maybe sorting is its own feature, not mongodb one...sorry if that's the case
[23:18:05] <huleo> err guys, array stuff...{ friends: [ ObjectId, ObjectId ] } - now we have something else, let's say a book, { author: ObjectId }
[23:18:38] <huleo> how can I get all books whose author is in array of "friends"?