PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Thursday the 12th of December, 2019

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[09:39:24] <john_89> Hello, I am using docker in combination with rocketchat. The problem is when I run the container I get this error:not master and slaveOk=false I tried to solve the issue with rs.slaveOk() command in the mongo shell, but I get the same error. So now I am trying to add the master with --master option here (because it says not master in the error):
[09:39:25] <john_89> rocketchat-mongo mongod --master --replSet rocketchat-repl-set But the problem is, now the --master is not longer supported. What can I do if the rs.slaveOk() command from stackoverflow does not work?
[11:02:55] <john_89> Sorry, but has this irc channel also a discord channel? I think I am not going to get the answer here.
[12:59:16] <john_89> hello, anyone?
[14:45:57] <john_89> is now anyone here?
[14:47:13] <GothAlice> People are always here; I was here the last time you asked. Alas, not everyone can help with every specific problem, and “docker… combination with…” is the opposite of a MCVE (minimum, complete, verifiable example) to assist with, and notably be able to reproduce or remotely diagnose.
[14:47:54] <GothAlice> john_89: In your situation, master/slave went away *many* versions ago. Migrating from that type of setup to a modern replica set I would see as an opportunity to “start from scratch” again, allowing compaction of the dataset during transfer to the new cluster. But that’s me.
[14:50:23] <john_89> Thanks, GothAlice does a discord/slack channel exists? To use instead of this irc channel?
[14:51:20] <GothAlice> john_89: I do not know. Back in the day, I was a moderator here, then I nearly died, came back, and the channel isn’t officially used any more. They appear to have focused on utilizing JIRA for support.
[14:51:59] <GothAlice> One of the more notable “shocks” (sudden unexpected changes to reality) upon rousing from my coma after brain surgery.
[14:52:10] <GothAlice> (For reals, there.)
[14:52:57] <john_89> I hope you are OK now.
[14:53:36] <GothAlice> Surgeon passed by my hospital bed, flipped a page on his clipboard, squeezed my big toe while muttering, “you’re cured”, then literally aimlessly wandered off. ;)
[14:53:42] <GothAlice> Superglue: the best invention of WWII.
[14:54:01] <GothAlice> (Also for reals. Medically referred to as “embolization”. ;)
[14:56:52] <GothAlice> http://s.webcore.io/2b0H3g453w2q ← apologies for the horrible “preview page” this uses these days. I referred to it as my “flying sphagetti monster”. (Looks scarier; it was actually on the frontal surface, not embedded within.)
[14:58:02] <GothAlice> But yeah, for the regulars who might be lurking, that’s why I disappeared for a few months (from IRC completely) and for a year or two from supportive/productive chatting. ^_^;
[14:58:23] <john_89> What is this, a brain tumour?
[14:58:47] <GothAlice> https://en.wikipedia.org/wiki/Arteriovenous_malformation or AVM
[14:59:24] <john_89> oh
[15:00:07] <GothAlice> Fun fact: these generally are only discovered after someone dies for another reason, post-mortem. They’re rare, in the order of 1% of people have them and 1% of those end up developing a problem (numbers pulled from bum), however, in a weird twist of fate, one of my highschool friends died on the pitcher’s mound… just dropped dead instantly, while standing there between pitches, from this.
[15:00:34] <GothAlice> A number of famous sportspeople have had this.
[15:02:13] <GothAlice> Mine ruptured three years ago after a DVT, or deep-vein thrombosis broke off a clot which travelled to my lung. Blood thinner treatment for the clot let the blood vessel cluster burst.
[15:03:00] <GothAlice> Pro tip, all you desk jockies: stand and have some ambulatory motion for at least five minutes of each hour. Sitting can literally kill you.
[15:04:33] <kali> GothAlice: i actually had a trobosis and lung embolism a few weeks ago
[15:04:46] <GothAlice> :o !
[15:04:57] <kali> GothAlice: on blood thinners right now
[15:05:16] <GothAlice> kali: I hope you have recovered as well as I seem to have, or better, actually, given I’ve had two seizures since initial discovery and treatment. XP
[15:06:34] <kali> GothAlice: well, i still have a casted foot (that's what gave me the blood clot in the first place), but the lung feels fine now
[15:06:53] <GothAlice> kali: I’m going to be on Kepra (moving off of Dilantin come January due to the whole osteoporosis side-effect) for the rest of my life to prevent seizures due to malformation caused by growth around the knot of vessels, and on Coumadin (blood cell on blood cell thinner) for the rest of my life. My afternoon set is a fist full of pills, including a full gram of calcium. T_T
[15:07:48] <GothAlice> Like, you could use my afternoon set as 12 gague buckshot if you tried. ;P
[15:09:15] <kali> GothAlice: well, with no other unforeseen complication i should be on my two feet and off treatments in a few weeks, so after the big scare a few weeks ago, i'm feeling quite lucky
[15:10:33] <kali> thanks, and back :)
[15:10:35] <GothAlice> Reminders of mortality SUCK.
[15:11:17] <GothAlice> A rare demonstration in my memory of a truly life- and perspective-changing event. :/
[15:13:21] <GothAlice> (Waking up not where you last remember being, unable to talk due to a tracheotomy… is… absolutely terrifying.) :(
[15:14:12] <kali> yeah, well, i can only imagine, my thing never got close to that in scaryness
[15:25:03] <john_89> Sorry to interupt. https://stackoverflow.com/questions/8990158/mongodb-replicates-and-error-err-not-master-and-slaveok-false-code How can I write the command rs.slaveOk() in the secondary mongod node? Maybe I was writing to the primary?
[15:27:25] <kali> rs.slaveOk() still works AFAIK
[15:27:38] <kali> and both nodes should accept it
[15:27:55] <kali> the master will just ignore it
[15:28:19] <kali> s/master/primary/
[15:29:01] <john_89> Hmm, but I get the same error, maybe I need to add the command in js?
[15:31:11] <kali> i don't think i have ever played with the old master/slave setup... it was already obsolete when i started it, and i have been here for nearly a decade
[15:32:45] <GothAlice> My earliest setups, very earliest, used it. Circa 2.0/2.2.
[15:33:33] <GothAlice> But once election-based primary selection replica sets became available, I immediately jumped over to that.
[15:34:32] <GothAlice> (Spinning up a thousand AWS nodes in a replica set, and kill -9’ing random kvm processes—whole virtual machines—while under strenuous load, and being able to kill almost 60% before the load tasks began noticing issues was impressive.)
[19:28:38] <b44> Does MongoDB have a better solution for this?
[19:28:40] <b44> I use JSONB in Postgres to store json data, with a structure does not fit into a pre-defined database schema. The disadvantage of JSONB is, that its nested elements are schema-less (=> e.g. references with foreign keys are hard to keep consistent)
[19:29:42] <GothAlice> “References… keep consistent.” b44: I’m not sure if you’ve looked into it, but MongoDB is not relational, and /can’t possibly/ keep data referentially consistent in that way.
[19:30:23] <GothAlice> Fundamentally inappropriate use, by the sound of it. :/
[19:30:55] <b44> GothAlice: So, when using MongodB, the application level would have the responsibility for consistency in a scenario like above?
[19:32:10] <GothAlice> The developer has the responsibility to write, algorithmically, data modification processes which are atomic, maintain consistency, or, if absolutely desired, can implement two-phase commits with a bit of a dance. (Though there are real multi-document transactions, now, so use them. ;)
[19:33:22] <GothAlice> E.g. exploit the ever living carp (mmm, fish) out of atomic “update-if-not-different” (“compare and swap”) capabilities, where an update can be intimately tied to a precursor query expression.
[19:33:24] <b44> GothAlice: I see... but that implicates the same state as using JSONB (in postgres) then
[19:34:53] <b44> as last fallback solution, before "giving up" from your side, GothAlice?
[19:35:08] <GothAlice> Similar to a client of mine who used PHP’s serialize() and stored SQL records that were essentially single column serialized BLOBs. Impossible to update any record without a precursor SELECT. Wanted to take him out back and shoot him like ol’ ‘yeller.
[19:35:23] <b44> or as "white flag" from the postgres community, GothAlice?
[19:35:38] <GothAlice> I do not understand your last two statements.
[19:37:29] <GothAlice> https://gist.github.com/amcgregor/4207375 ← an example of a system/process requiring strict locking guarantees, utilizing atomic compare-and-swap to ensure the lock actually behaves like a lock. Without the need for any transactions.
[19:37:32] <b44> GothAlice: ...do you mean Postgres introduced JSONB, because they acknowledged schema-less documents of MongoDB are superior to Postgres?
[19:37:47] <GothAlice> b44: Absolutely not. That’s quite the phrase to put in my mouth.
[19:38:09] <GothAlice> Also, MongoDB being “schema-less” is a bit of a myth / common misconception.
[19:38:16] <b44> Okey :)
[19:38:25] <GothAlice> https://docs.mongodb.com/manual/core/schema-validation/ ← really.
[19:39:10] <GothAlice> I’m almost in love with the validation document approach; it’s way, way more powerful than SQL schemas. By Romulus.
[19:40:10] <GothAlice> b44: There is no doubt that Pg felt community pressure to bow to the “NoSQL trend”, though.
[20:05:40] <b44> Gracie GothAlice!, I'm checking it