PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Sunday the 17th of April, 2016

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[05:50:07] <mylord> how do i find where a substring occurs?
[06:18:22] <kurushiyama> mylord: What exactly do you mean? Please be more specific.
[06:19:04] <mylord> nvm, got it: db.chat.find(“text”:/.*find this.*/)
[06:20:04] <kurushiyama> mylord: well, that only tells you _that_ "find this" occurs in "text", but not where... But obviously I got the question wrong ;)
[06:21:21] <kurushiyama> mylord: judging from the command, however, you might want to have a look at text indices: https://docs.mongodb.org/manual/core/index-text/
[06:40:53] <Tachaikowsky> Hey how to write a mongodb query for nodejs such that I only find those entries that are inserted after a cutoff date
[06:52:53] <kurushiyama> Tachaikowsky: can't help you much with node, but in shell it would be db.yourcoll.find({date:{$gt:cutoff}}), for {…,date: new ISODate()} docs.
[06:53:25] <Tachaikowsky> Okay I decided to add date field while inserting
[06:54:36] <kurushiyama> As shown above. Should be straightforward, then. As for node: Sorry, no node on my side.
[14:05:53] <the_drow> How do I decrement a counter atomically using Mongoid?
[14:46:57] <StephenLynx> hey, any reason the default init script wouldn`t use the settings at /etc/mongod.conf
[14:46:59] <StephenLynx> ?
[14:47:42] <StephenLynx> I just made a clean install on a VM and if I manually run mongod pointing to these settings, it works fine
[14:48:18] <StephenLynx> but if I try to start the service, all goes to hell and it complains it can`t find the data/db directory, even though the directory pointed on the settings is var/lib/mongo
[15:35:18] <StephenLynx> clean VM install
[15:35:20] <StephenLynx> no cigar
[15:35:25] <StephenLynx> I still can`t start the damn service
[15:35:42] <StephenLynx> the service md5 matches the one in my server that is working fine
[15:39:05] <StephenLynx> and I rebooted my laptop by accident instead of the VM
[15:54:28] <StephenLynx> GothAlice, you there?
[15:58:20] <StephenLynx> if I run mongod -f /etc/mongod.conf it runs fine. it seems my service isn`t informing mongod of where to find the settings
[18:50:10] <kurushiyama> StephenLynx: Solved?
[18:50:47] <StephenLynx> nope
[18:50:57] <StephenLynx> I am just praying it never happens on a server.
[18:51:17] <StephenLynx> because the only way I got it to work was to manually start mongod and informing the path to the conf file
[18:52:10] <kurushiyama> StephenLynx: OS and version?
[18:52:26] <StephenLynx> centos 7.2
[18:52:40] <StephenLynx> tried with both mongo 3.0 and 3.2
[18:52:46] <StephenLynx> tried with a clean VM too
[18:52:55] <kurushiyama> can you shoot the service file somewhere?
[18:53:01] <StephenLynx> hm?
[18:53:05] <StephenLynx> upload it?
[18:53:25] <kurushiyama> Jup. or pastebin it, or sth. Faster than an install from my side ;)
[18:55:32] <StephenLynx> http://pastebin.com/TyNYwxLv kurushiyama
[18:56:24] <StephenLynx> that`s from my server, that is working fine, but the md5 of the VM one matched
[18:58:22] <StephenLynx> double checked, its the same on my VM
[19:00:11] <StephenLynx> i dont think the problem is the init script
[19:01:32] <macwinner> StephenLynx: what issue are you facing? sorry just joined channel
[19:02:01] <StephenLynx> my init script for mongod service doesn't use the settings file at etc/mongod.conf
[19:02:14] <StephenLynx> so it will try to use /data/db to store the db and will fail and wont booth
[19:02:28] <StephenLynx> if I just try to execute mongod it fails.
[19:02:39] <StephenLynx> but when I tell it to use the conf file using -f it works.
[19:03:17] <StephenLynx> so I concluded that is the problem.
[19:03:27] <StephenLynx> funny thing it used to work on my laptop.
[19:03:34] <StephenLynx> then it stopped after an update.
[19:03:48] <StephenLynx> so I uninstalled from my laptop and tried a VM, but it wouldn`t work.
[19:03:58] <StephenLynx> I didn`t get to diagnose on my laptop.
[19:11:20] <kurushiyama> StephenLynx: Hence I wanted to check the init script, in order to make sure we do not have a problem there. Since I know you good enough that you did the usual checks, this is the only way I can see something goes wrong.
[19:12:48] <StephenLynx> daemon --user "$MONGO_USER" --check $mongod "$NUMACTL $mongod $OPTIONS >/dev/null 2>&1"
[19:13:08] <StephenLynx> if the script is working fine, it specifies the options to be used there
[19:13:30] <kurushiyama> StephenLynx: not sufficient ;) In the worst case, all people on 7.2 might have the same problem.
[19:14:09] <StephenLynx> OPTIONS=" -f $CONFIGFILE" and CONFIGFILE="/etc/mongod.conf"
[19:14:16] <StephenLynx> so from what I see here, nothing fishy
[19:14:36] <StephenLynx> however I have no idea what's going on that first line I pasted with daemon
[19:15:08] <StephenLynx> my VM doesn`t even have that command
[19:15:56] <StephenLynx> maybe it's something internal to sysvinit?
[19:17:20] <StephenLynx> if [ -f "$SYSCONFIG" ]; then
[19:18:56] <StephenLynx> I do have a file there, but I tried renaming it and no change
[19:21:01] <kurushiyama> StephenLynx: Strange. Have to recreate that.
[19:23:25] <StephenLynx> go for it. minimal 7.2 install, nothing but mongo from this repository https://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat/
[19:23:36] <kurushiyama> StephenLynx: Urgent?
[19:23:43] <StephenLynx> not at all
[19:23:58] <StephenLynx> I just know I am not going to upgrade any servers until I figure this out.
[19:27:16] <kurushiyama> StephenLynx: So I will do tomorrow. My heir demands some time. Can you pastebin the service file, the config file (anonymized) and the output of "yum list installed"?
[19:27:41] <StephenLynx> you already got the service file though
[19:28:34] <kurushiyama> StephenLynx: Just to double check. If this turns out to be a bug, I want to make double sure that it is reproducaable.
[19:28:55] <StephenLynx> btw, permissions on the service file -rwxr-xr-x. 1 root root
[19:29:08] <kurushiyama> StephenLynx: Like postively sure and negatively sure.
[19:29:24] <StephenLynx> its the same file, you will get the same thing. I know I didn't got a bug on sftp
[19:29:32] <StephenLynx> that would yield the same md5 checksum
[19:30:33] <kurushiyama> lgtm. Minimal or netinstall ISO?
[19:30:54] <StephenLynx> minimal.
[19:31:26] <kurushiyama> StephenLynx: Ok, will try to reproduce.
[19:33:08] <kurushiyama> StephenLynx: one last question: I assume you ran a yum update at some time?
[21:39:49] <damoncasale> I'm trying to do an explain and it's taking forever to even run the explain.
[21:39:53] <damoncasale> What am I doing wrong?
[21:40:10] <damoncasale> I stopped and restarted the Mongo service, even.
[21:40:25] <damoncasale> Doing this:
[21:40:27] <damoncasale> db.listings.aggregate([{$group: {'_id': {AssignedNeighborhood: $AssignedNeighborhood}, 'count': {$sum: 1}}], {explain: true})
[21:40:30] <damoncasale> Ideas?
[21:51:15] <damoncasale> I'm trying to do an explain and it's taking forever to even run the explain. What am I doing wrong?
[21:51:22] <damoncasale> I stopped and restarted the Mongo service, even. Doing this:
[21:51:24] <damoncasale> db.listings.aggregate([{$group: {'_id': {AssignedNeighborhood: $AssignedNeighborhood}, 'count': {$sum: 1}}], {explain: true})
[21:51:26] <damoncasale> Ideas?
[22:17:15] <damoncasale> Anyone awake?
[22:27:20] <damoncasale> Ugh... I really need help. -_-
[23:50:19] <Streemo> what's the difference between using a geoquery around some coordinate pair, versus using $lte and $gte around the same coordinate pair?
[23:51:10] <Streemo> {latitude: {$lte: lat+dx, $gte: lat-dx}} (and similarly for longitude
[23:51:25] <Streemo> this will find objects within a skewed square region
[23:51:34] <Streemo> how's the performance compared to using a geo query
[23:51:36] <Streemo> ?