PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Monday the 2nd of November, 2015

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[02:07:22] <Ragnar> Hey guys, any of you had experience utilizing mongodb for applications that are still rather relational successfully or not? Any regrets? I like the idea of using mongo for the easy scaling and also using javascript/json across my entire application.
[08:34:03] <someone235> After a restart, mongod says " ERROR: dbpath (/data/db) does not exist." Although I've never had any problem with this before. I've checked in /etc/mongodb.conf and it says: "dbpath=/var/lib/mongodb", and I've checked this directory, and all the files are there as usual
[08:34:31] <someone235> Anyone has an idea what can cause this and how to fix it?
[08:43:01] <joannac> someone235: starting with a different config file?
[08:43:44] <someone235> No, nobbe helped to figure it out. I had no enough space for the journal files
[09:49:07] <Iskandar> hi
[09:50:59] <Iskandar> I want to setup a testcluster and want to run a mongod, config and routing mongo on 1 server. Do I need to install mongodb three times then ? or can i re-use the one mongo instance on that particular machine?
[12:00:02] <alens> hi!
[12:00:28] <asteele> hi
[12:00:49] <alens> My mongodb replica set is running out of space. I removed some colections (backup copy) but the space stay the same
[12:01:08] <alens> now, should i leave it like that so that the app uses the whitespace..or should i shrink it?
[12:13:15] <cheeser> you can compress the db but it'll mean downtime
[12:13:36] <cheeser> so typically you run db.repair() on a secondary and then move your way around the replset
[12:14:53] <alens> @cheeser db.repair() is an offline mode?
[12:19:18] <cheeser> it'll lock the db completely while it works.
[12:25:26] <alens> what is the best practice? if i remove content from the DB its wise to compact, or to leave it as it is?
[13:38:14] <Jumboo> yo, can anyone tell me a good way of find case sensitive value ? i got now fields username and username_lower so i usually get the lower and find by that but is there no other way ... ? i know regex is possible but i wanna go without it
[13:40:44] <cheeser> that's what I do
[14:28:53] <Bodenhaltung> Hi, at the moment i am confused, i want to build a quere in php like "... where foo = bar AND moep = 1 OR ( name = Alice OR name = Bob)". So foo and moep is "must" and name is "can"? Does anyone understand me or am i too confused?
[14:42:26] <Jumboo> why does my update query remove my document ?
[14:46:24] <Jumboo> can i combine $set and $inc together?
[14:59:56] <vfuse> Jumboo: yes
[15:01:12] <Jumboo> vfuse i want to $set view field to 0 if not exists and also $inc it at same time +1
[15:01:50] <vfuse> Jumboo: $inc will create the field if it doesn’t exist
[15:30:54] <Jumboo> vfuse but i need use $set too ? or only $inc is enough ?
[15:31:25] <vfuse> Jumboo: only $inc is enough
[15:31:33] <cheeser> easy to test
[15:32:19] <Jumboo> vfuse somehow it will not create the field ... should i use something in the options like upsert ?
[15:33:16] <Jumboo> vfuse oh no it works creating a NumberLong
[15:38:12] <Bodenhaltung> Or can someone here show me a example php "and" and "or", "or", "or" query?
[15:38:44] <Jumboo> is there a way to convert mongo string to lowercase and compare in find so i don't have to have multiple fields like username: Jako and username_lower: jako
[15:40:18] <vfuse> Jumboo: use $regex
[15:40:43] <Jumboo> vfuse will it not slow my system too mutch ?
[15:41:24] <vfuse> Jumboo: not if the field is indexed
[15:51:44] <Jumboo> vfuse works, can i use it also for arrays ? because i have tags and tags_lower fields which holds arrays of tags used
[15:52:15] <Jumboo> vfuse and i should then use index for the tags field or how
[15:52:32] <vfuse> for searching thru arrays you can use $in
[16:22:53] <Cyric> hey guys im having some problem with the mongohadoop connector while storing the datetime object using the mongostorage()
[16:23:16] <Cyric> is it possible to do so?
[16:32:22] <Cyric> Java.io.IOException: Couldn't convert tuple to bson
[16:32:31] <Cyric> this is the error that i get when i try to do so
[16:35:33] <cheeser> javax.date?
[16:39:18] <Cyric> i do not know
[16:39:27] <Cyric> i am not a java deleveloper
[16:39:41] <Cyric> i just imported the mongohadoop jars
[16:41:16] <Cyric> do you think is a bug?
[16:46:48] <Cyric> http://stackoverflow.com/questions/27641885/cannot-load-dates-into-mongodb-from-apache-pig
[16:46:59] <Cyric> seems the same here but no answers
[16:48:10] <Cyric> how is possible that a so basic function such as inserting a datatime into mongodb doesnt work?
[16:48:26] <Cyric> am i the first one trying to do so?
[16:53:36] <shoshy> hey, i'm using mongodb 3.07 and node.js official driver. When i try to connect (and authenticate) i get "Authentication failed.", code: 18. I've used the connectionStr: mongodb://user:password@server_ip:27017/?authMechanism=SCRAM-SHA-1&authSource=db_name which all the details are right (i'm able to connect using pymongo) . All ports are open.
[16:53:58] <StephenLynx> show me your code
[16:55:30] <shoshy> StephenLynx: just a sec, i'll pastie it
[16:59:24] <shoshy> StephenLynx: http://pastie.org/10524783
[17:18:47] <shoshy> ?
[17:19:16] <StephenLynx> ah yeah
[17:19:22] <StephenLynx> got distracted :v
[17:19:43] <shoshy> np
[17:19:46] <StephenLynx> hm
[17:19:50] <StephenLynx> try without the final part
[17:20:01] <StephenLynx> mongodb://user:password@server_id:27017 just this
[17:22:36] <shoshy> StephenLynx: that worked! so in order to use a specific db name?
[17:22:42] <Ben_1> hi
[17:22:51] <shoshy> btw, that means the documentation is off, as i used it
[17:22:59] <shoshy> as in the example it provided
[17:23:16] <StephenLynx> let me see
[17:23:47] <Ben_1> does somebody know a tutorial how to use mongoDB scaled over several physical machines?
[17:23:47] <StephenLynx> add /dbname to the string
[17:24:15] <shoshy> StephenLynx: when i've done that i receive the auth-faild
[17:24:26] <shoshy> even though i can use that db ... the user credentials are
[17:24:34] <StephenLynx> no, you tried using /?
[17:24:38] <StephenLynx> not /dbname
[17:25:00] <shoshy> StephenLynx: i tried both now
[17:25:11] <StephenLynx> give the latest code.
[17:25:21] <StephenLynx> not the one you pasted before
[17:25:39] <shoshy> roles: [{"role" : "readWrite", "db" : "db_name"},{"role" : "clusterAdmin", "db" : "admin"}] for the user
[17:25:44] <StephenLynx> no
[17:25:49] <StephenLynx> the connection string
[17:25:57] <StephenLynx> on the js code
[17:26:21] <shoshy> url = 'mongodb://user:password@server_id:27017'; and also tried with url = 'mongodb://user:password@server_id:27017/db_name';
[17:26:42] <shoshy> the 1st worked, the 2nd failed with auth failed
[17:26:53] <shoshy> code 18
[17:26:56] <StephenLynx> welp
[17:27:02] <StephenLynx> the second should have worked
[17:27:17] <StephenLynx> IMO, something's up with your permission on the database.
[17:27:21] <shoshy> i pasted the user roles to show that the user should have access t oit
[17:27:36] <shoshy> and i can use the same user with pymongo
[17:27:38] <StephenLynx> I have no experience with auth, so I wouldn't know if that is correct or not.
[17:27:55] <shoshy> StephenLynx: ok, thank you though!
[17:27:56] <StephenLynx> what I can tell you is that the url to connect is right.
[17:28:22] <StephenLynx> https://gitlab.com/mrseth/LynxChan/blob/master/src/be/db.js#L668
[17:28:23] <StephenLynx> here
[17:28:49] <StephenLynx> if you follow the steps, you will see the string I use has the same format as the second one you tried.
[17:29:29] <shoshy> StephenLynx: you're right, but you're aware of this: http://mongodb.github.io/node-mongodb-native/2.0/reference/connecting/authenticating/
[17:29:42] <shoshy> and i'm using mongo 3.07 , with node.js (latest version) .
[17:30:02] <StephenLynx> yeah, I don;t think your versions are the problem.
[17:30:13] <StephenLynx> by latest you mean 4.2.x, right?
[17:30:23] <StephenLynx> because some people install 0.12 from their repos
[17:30:26] <StephenLynx> and think its the latest.
[17:30:48] <shoshy> yes. 4.2.1
[17:31:05] <StephenLynx> ok
[17:31:18] <StephenLynx> from that page, it seems the driver doesn't need you to specify the authentication method.
[17:31:26] <StephenLynx> can you check the driver version on its package.json?
[17:31:50] <Ben_1> does somebody know a tutorial how to use mongoDB scaled over several physical machines?
[17:31:58] <shoshy> StephenLynx: of course!, 2.0.47
[17:32:26] <StephenLynx> yeah, thats right.
[17:32:33] <StephenLynx> try this:
[17:32:47] <StephenLynx> connect to the server from the terminal without authenticating
[17:32:50] <StephenLynx> and try to use the database.
[17:33:41] <StephenLynx> if you succeed: authentication is disabled.
[17:33:44] <shoshy> StephenLynx: how? not sure i understood
[17:33:56] <StephenLynx> you know the terminal client for mongo, right?
[17:33:58] <shoshy> telnet?
[17:34:00] <StephenLynx> no
[17:34:01] <shoshy> ahhhh
[17:34:06] <shoshy> yea
[17:34:16] <StephenLynx> try to use the database from it without authenticating.
[17:34:25] <StephenLynx> from the machine your application is trying to connect.
[17:34:28] <shoshy> just a sec i should have robomongo somewhere
[17:34:32] <StephenLynx> no
[17:34:36] <StephenLynx> use the terminal.
[17:34:38] <shoshy> ahhh ok
[17:34:47] <shoshy> so i'll need to download it...
[17:34:55] <StephenLynx> you dont have it installed?
[17:35:08] <shoshy> not on the machine i'm connecting from. as far as i know.
[17:35:21] <shoshy> and the mongodb node.js isn't the command line.. so.. no. :/
[17:35:38] <StephenLynx> what OS are you using?
[17:35:53] <shoshy> its from an ec
[17:35:55] <shoshy> ec2
[17:35:58] <shoshy> linux
[17:36:08] <StephenLynx> ec2?
[17:36:12] <shoshy> amazon ec2
[17:36:17] <StephenLynx> no, the one you are using
[17:36:20] <StephenLynx> not the server.
[17:36:25] <shoshy> osx
[17:36:36] <StephenLynx> :\
[17:36:54] <StephenLynx> thats bad, though.
[17:36:59] <StephenLynx> because it doesnt have a package manager,
[17:37:46] <shoshy> where do they hide the command shell only... i don't want to install the whole db on the client just to use the command line shell.. arrr..
[17:38:11] <StephenLynx> if you were using linux I would know which thing to install from the repository.
[17:38:24] <shoshy> i am.. the ec2 runs linux
[17:38:35] <StephenLynx> not the server.
[17:38:46] <shoshy> so i have 2 instances. one is mongodb, the other is the client , both are ec2
[17:38:54] <StephenLynx> omg
[17:38:56] <StephenLynx> ok, I get it now.
[17:39:01] <shoshy> :)
[17:39:02] <StephenLynx> you develop though a proxy.
[17:39:05] <StephenLynx> using ssh?
[17:39:07] <shoshy> yep
[17:39:09] <shoshy> through ssh
[17:39:22] <shoshy> i'm NOT trying to connect to the server from my machine.
[17:39:30] <shoshy> that's not my purpose.
[17:39:33] <StephenLynx> ok, what is the distro on the client remote machine?
[17:41:11] <shoshy> "Amazon Linux GNU" 64bit
[17:41:18] <StephenLynx> fuck
[17:41:21] <StephenLynx> I dunno then.
[17:41:53] <StephenLynx> what I think its happening is that authentication is not set on the server.
[17:42:01] <StephenLynx> and then the driver tries to authenticate and fails.
[17:42:09] <shoshy> StephenLynx: what package you'd recommend to test?
[17:42:17] <StephenLynx> the terminal client.
[17:42:19] <StephenLynx> mongo
[17:42:25] <StephenLynx> mongod is the server, afaik
[17:42:32] <shoshy> StephenLynx: so how come i can connect through pyMongo (python) ?
[17:42:35] <StephenLynx> mongo-org is the whole thing.
[17:42:48] <StephenLynx> maybe that driver behaves differently with authentication.
[17:43:06] <StephenLynx> maybe it checks if auth is on or not and just connects if its off.
[17:45:46] <shoshy> StephenLynx: so i tried doing "mongodb://%s:%s@%s/test?authMechanism=.... " iterating all mechanisms
[17:46:42] <shoshy> it failed on all of them basically... when i've put PLAIN i've received "supportedMechanisms: [ 'MONGODB-CR', 'MONGODB-X509', 'SCRAM-SHA-1' ],"
[17:46:59] <shoshy> what's the command to "use db_name" ? once connected
[17:47:04] <shoshy> maybe it's worth trying out
[17:54:04] <shoshy> StephenLynx: i've installed the shell. Followed: https://docs.mongodb.org/manual/tutorial/install-mongodb-on-amazon/
[17:56:06] <shoshy> ok! login failed even through the shell
[17:56:12] <shoshy> Error: 18 Authentication failed.
[17:56:25] <shoshy> with the user name and password. How weird...
[17:57:12] <livcd> hi guys i can't install bson module for node v4.2.1
[18:04:05] <StephenLynx> shoshy yeah, somethin'g with your authentication.
[18:04:16] <StephenLynx> livcd how are you trying to install it?
[18:04:31] <StephenLynx> I remember I had some error on the build when installing the driver, but it would actually work.
[18:04:38] <livcd> StephenLynx: npm install for package.json
[18:05:03] <StephenLynx> and what exactly is the error you get?
[18:05:54] <shoshy> StephenLynx: was able to solve it
[18:06:27] <livcd> StephenLynx: http://fpaste.org/286163/87247144/
[18:06:56] <shoshy> basically i've "re-created".. or ran "db.createUser" again, this time after using "use db_name". and then it all worked. That's weird. because the user was defined with the db "readWrite" roles for that db . But when i first created it , it was after using "use admin".
[18:07:06] <shoshy> anyway. it works
[18:07:27] <shoshy> thanks so much for the help!
[18:07:30] <StephenLynx> np
[18:08:08] <livcd> StephenLynx: i see this on github for bson module https://github.com/mongodb/js-bson/issues/150
[18:08:27] <livcd> but i do not know how to fix it anyway. I tried npm rebuild but that did not help
[18:08:38] <StephenLynx> try using the driver anyway.
[18:08:52] <livcd> StephenLynx: oh well that works but it's using pure js
[18:09:07] <StephenLynx> it is giving you a warning?
[18:09:43] <livcd> http://fpaste.org/286165/46487507/
[18:10:02] <StephenLynx> yeah, that is NOT the same error I had.
[18:11:49] <StephenLynx> ../lib/kerberos.h:5:27: fatal error: gssapi/gssapi.h: No such file or directory
[18:11:49] <StephenLynx> #include <gssapi/gssapi.h>
[18:11:55] <StephenLynx> thats the one I have.
[18:11:59] <StephenLynx> so I don't know.
[18:12:04] <StephenLynx> try installing it separately.
[18:12:10] <livcd> oh i have that one as well
[18:12:27] <StephenLynx> ok, then try this:
[18:12:34] <StephenLynx> install the driver version 2.0.45
[18:13:07] <StephenLynx> and see if you still get both errors.
[18:14:04] <livcd> what driver ? mongodb ?
[18:14:08] <StephenLynx> yes.
[18:16:54] <livcd> doh still the same....
[18:18:38] <StephenLynx> welp
[18:18:41] <StephenLynx> I dunno then.
[18:18:51] <StephenLynx> what OS and node version are you using?
[18:19:16] <livcd> osx and 4.2.1
[18:20:50] <StephenLynx> >osx
[18:20:52] <StephenLynx> its that.
[18:21:53] <livcd> Darwin Kernel Version 15.0.0:
[18:23:59] <StephenLynx> try on a VM running centOS 7.
[20:11:44] <surferdude1> Hello, I accidently deleted /var/log/mongodb and now mongod won't start. any ideas on how to get it working? I tried recreating the directory/log file but it still isnt coming back
[22:05:52] <christo_m> so i get Mod on _id not allowed on production but on development i dont get this error
[22:05:55] <christo_m> whats the issue?
[22:06:09] <cheeser> you can't modify the _id value of a document in the database
[23:22:12] <christo_m> cheeser: but i could do it on my dev machine?
[23:22:14] <christo_m> its the exact same code lol
[23:23:02] <Boomtime> christo_m: you say you can update the _id of a document?
[23:23:15] <christo_m> Boomtime: im saying the exact same code works in dev
[23:23:21] <christo_m> empty collection, adding the same documents.
[23:23:23] <christo_m> doing the same tasks
[23:23:44] <Boomtime> ok, so you have some subtle problem, possibly timing, possible data related
[23:24:11] <Boomtime> but it has nothing to do with being able to change the _id - _id is immutable
[23:26:13] <christo_m> im trying to do a find one and update
[23:26:23] <christo_m> and im doing it by id, but i delete the id in the original req.body
[23:26:26] <christo_m> so im not sure why thats happening..
[23:27:40] <Boomtime> find one then update? why not just update?
[23:29:24] <christo_m> Boomtime: well taht won't fix my problem anyway right
[23:33:52] <Boomtime> if you have a timing problem, then yes
[23:34:38] <christo_m> ohh
[23:34:44] <christo_m> that may be it eh