Mongodb not working
-
@dunlix I believe
/data/db
is just the default placeholder, so that is why it is trying to access it. You've executedmongod
on its own with no flags, so it assumes the default config options, since it doesn't know where to locate the config file at/etc/mongod.conf
That said, on Ubuntu the logs are kept at
/var/log/mongodb/mongodb.log
Can you
tail -F /var/log/mongodb/mongodb.log
and then in another terminalsudo systemctl start mongodb
? -
@dunlix said in Mongodb not working:
I looked around and realized that it wasn’t loading the confit file or something,
Hmmm..... I wonder... Reaching here but perchance might your mongod.conf file have become corrupted in some manner? You said all you did was a system upgrade and that should not have touched mongod.conf on a running system. But one never knows....
Also, along related note, mongod.conf is ASCII text only. No UTF-8. So if your text editor somehow slipped a little utf-8 in there during some edit, but you did not reboot until the update, and then/now mongod can no longer read/load mongod.conf? Maybe, just maybe?
But mainly in the main, need to confirm mongod is indeed listening on localhost port 27017.
-
@gotwf said in Mongodb not working:
But mainly in the main, need to confirm mongod is indeed listening on localhost port 27017.
Yes it is cause when I start it the right way I only specify the dbpath and NodeBB can connect right away.
-
@dunlix It would be beneficial to confirm APT-Sources, e.g.;
APT-Sources: http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4/main amd64 Packages Description: MongoDB shell client
Note the repo.mongodb.org bit above. Preferential to use mongo built pkgs if available. And they should be for Ubuntu. But maybe not set as default? So just confirm this bit for me whilst at it, eh?
-
-
@macfan said in Mongodb not working:
@julian wouldnt be easier for nodeBB to just switch from this shitty DB engine to something more " modern "?
Hmm....
-
What would you propose?
-
Got code?
-
-
NodeBB supports postgresql.
-
@pitaj said in Mongodb not working:
NodeBB supports postgresql.
And, despite the above saga, Mongo itself was pretty groovy until someone got the bright idea to relicense it under SSPL. This has not affected me so much but seems to have hit a sore spot with various package managers.
-
@gotwf said in Mongodb not working:
Hmm....
- What would you propose?
- Got code?
- Something SQL maybe? Like mysql? I would touch nothing thats licensed on
SSPL
- What kind of code?
-
@macfan said in Mongodb not working:
@gotwf said in Mongodb not working:
Hmm....
- What would you propose?
- Got code?
- Something SQL maybe? Like mysql? I would touch nothing thats licensed on
SSPL
As mentioned above, NodeBB supports PostgreSQL. A far superior RDBMS to MySQL, imho, btw.
- What kind of code?
Code requisite for "porting" nodebb db backend to whatever your dream data store may be.
I, too, am none too keen on SSPL. While I am sensitive to both sides of this issue, in reality the SSPL affects me personally minimally. Meanwhile, MongoDB does a kick ass job. Hence I am electing an "If it ain't broke, don't fix it" posture.
That said, next NodeBB deployment will likely take a closer look at PostgreSQL.