PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Wednesday the 12th of June, 2019

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[03:04:05] <g33kyboi> Hi, I was wondering if it is safe to run `db.adminCommand({setParameter: 1, featureCompatibilityVersion: '3.6'})` on a production instance of mongodb
[17:13:29] <DevilTiger> i had installed mongodb a while ago on my debian system and to my knowledge it was using /var/lib/mongodb for storing data (default setting). came back to try and work on the project again and run mongod and getting errors about /data/db not existing. i'm confused on why its trying to look there for data when nothing has told it to do so
[17:16:33] <DevilTiger> seems like running mongod with the --dbpath flag pointing to /var/lib/mongodb works as intended but i know for a fact i was never running the db with that command before, simply mongod. wonder what the dillyo is
[17:21:16] <GothAlice> DevilTiger: Are you positive you weren’t invoking mongod via system init.d scripts? E.g. /etc/init.d/mongod start, or “service start mongod”, or … — the default has not changed: https://docs.mongodb.com/manual/reference/configuration-options/#storage.dbPath
[17:21:54] <DevilTiger> GothAlice: i bet that's what i was doing, sec
[17:23:49] <DevilTiger> GothAlice: hmm, maybe not. attempting service mongod start fails (i'm assuming due to data path not existing)
[17:24:21] <GothAlice> Alternatively, I was throwing out generic commands that might not relate to your OS in any way. ;P
[17:24:53] <GothAlice> Hit ^R (control+r) and type “start”, press ^R repeatedly to continue searching your command history backwards. :)
[17:26:33] <DevilTiger> all i see are the commands i've ran today. is there a way to see verbose output of service start
[17:27:46] <GothAlice> DevilTiger: Depends. “dmesg” will get you the kernel startup messages. Otherwise you’ll need to dig through /var/log/messages (usual location, i.e. syslog) or /var/log/current/everything (metalog).
[17:28:00] <DevilTiger> ugh
[17:29:55] <GothAlice> Er, metalog’s path might actually be /var/log/everything/current. Damn dyslexia. XP
[17:30:24] <DevilTiger> i don't see anything in /var/log/messages. i don't know regex foo to be searching honestly
[17:30:44] <DevilTiger> has to be a better way to see why a service failed...
[17:31:05] <GothAlice> Yup, look at the service logs.
[17:31:13] <DevilTiger> i thought i just did
[17:31:30] <GothAlice> ls /var/log — is there a directory dedicated to mongo, mongod, or mongodb?
[17:32:53] <DevilTiger> WiredTiger error (13) [1560360433:326959][1556:0x7fdb1d869080], wiredtiger_open: __posix_open_file, 715: /var/lib/mongodb/WiredTiger.turtle: handle-open: open: Permission denied Raw: [1560360433:326959][1556:0x7fdb1d869080], wiredtiger_open: __posix_open_file, 715: /var/lib/mongodb/WiredTiger.turtle: handle-open: open: Permission denied
[17:33:09] <DevilTiger> i am running these commands as root
[17:36:09] <GothAlice> DevilTiger: That doesn’t mean the service isn’t immediately dropping root, because running services as root persistently is literally the worst idea in the world. For example, the output of “id mongodb” on one of my servers identifies that that’s a real user:
[17:36:25] <GothAlice> uid=102(mongodb) gid=198(mongodb) groups=198(mongodb)
[17:36:39] <GothAlice> Thus data files on that machine need to be owned by that user and no other.
[17:37:48] <DevilTiger> i don't understand what you're trying to tell me.
[17:39:01] <DevilTiger> currently running mongod as a plain old user with --dbpath starts fine. anything else falls flat on its face. i'm attempting to move this from a VM on my home network to my actual server so i'm just confused on how automating the service would be done as service mongodb start fails
[17:40:41] <DevilTiger> i apologize but your explanations are a bit over my head
[17:50:17] <DevilTiger> maybe since i originally ran it with simply mongod as user and the db data was created with those permissions now that i'm trying to run service start it's failing. idk
[18:04:08] <DevilTiger> ended up just adding mongodb to crontab @reboot. def not the right way but ¯\_(:/)_/¯