Skip to content

NodeBB Mess / Mongo DB

Solved Configure
  • Hi,

    Basically my nodebb installation I felt was a mess…Nothing was installing and so I decided to make a clean install. I thought that i had cleared mongodb but i am now thinking not properly.

    I ran use nodebb and then db.dropDatabase(); I had problems deleting the user nodebb also.

    Anyway I tried to reinstall but all traces of the old install was still there on the page. Not the browser as cleared all and tried others. Tried upgrading it but nothing was happening…all a mess 👎

    I am here. Deleted the nodebb folder and then tried again to db.dropDatabase(); in mongo. But i do that and get success but when i run show dbs nodebb is still there. 0.00 in it but still there. Is it traces of that db that is messing with the page? Showing parts of the old stuff? I cannot delete that mongo db. Do i have to delete user too? Don’t think that would matter but the db for sure i guess?

    Thanks guys.

  • @phenomlab Hi, yes i selected the db first.

    I have software also on the GUI that can delete and drop the db. A few seconds later when i refresh the db is back again.

    I tried all again and on ./nodebb setup it gets worse. I created the user again (with admin) Only thing i cannot start fresh is the db itself.

    2022-08-18T15:56:38.659Z [3984] - warn: NodeBB Setup Aborted.
     MongoServerError: Authentication failed.
        at Connection.onMessage (/home/smiley/nodebb/node_modules/mongodb/lib/cmap/connection.js:210:30)
        at MessageStream.<anonymous> (/home/smiley/nodebb/node_modules/mongodb/lib/cmap/connection.js:63:60)
        at MessageStream.emit (events.js:375:28)
        at processIncomingData (/home/smiley/nodebb/node_modules/mongodb/lib/cmap/message_stream.js:132:20)
        at MessageStream._write (/home/smiley/nodebb/node_modules/mongodb/lib/cmap/message_stream.js:33:9)
        at writeOrBuffer (internal/streams/writable.js:358:12)
        at MessageStream.Writable.write (internal/streams/writable.js:303:10)
        at Socket.ondata (internal/streams/readable.js:726:22)
        at Socket.emit (events.js:375:28)
        at addChunk (internal/streams/readable.js:290:12)
    

    I have nothing there so destroying it all and starting again is no problem but I need to remove all traces and from mongo too.

    ####QUICK UPDATE### I just rebooted my machine and have managed to dlete the db and the user…I will try and install again and see if i get this error.

  • @Sampo2910 Did you do it via the below method ? If you didn’t select a database first, then the drop doesn’t normally succeed.

    > use nodebb; 
    > db.dropDatabase();
    
  • @phenomlab Hi, yes i selected the db first.

    I have software also on the GUI that can delete and drop the db. A few seconds later when i refresh the db is back again.

    I tried all again and on ./nodebb setup it gets worse. I created the user again (with admin) Only thing i cannot start fresh is the db itself.

    2022-08-18T15:56:38.659Z [3984] - warn: NodeBB Setup Aborted.
     MongoServerError: Authentication failed.
        at Connection.onMessage (/home/smiley/nodebb/node_modules/mongodb/lib/cmap/connection.js:210:30)
        at MessageStream.<anonymous> (/home/smiley/nodebb/node_modules/mongodb/lib/cmap/connection.js:63:60)
        at MessageStream.emit (events.js:375:28)
        at processIncomingData (/home/smiley/nodebb/node_modules/mongodb/lib/cmap/message_stream.js:132:20)
        at MessageStream._write (/home/smiley/nodebb/node_modules/mongodb/lib/cmap/message_stream.js:33:9)
        at writeOrBuffer (internal/streams/writable.js:358:12)
        at MessageStream.Writable.write (internal/streams/writable.js:303:10)
        at Socket.ondata (internal/streams/readable.js:726:22)
        at Socket.emit (events.js:375:28)
        at addChunk (internal/streams/readable.js:290:12)
    

    I have nothing there so destroying it all and starting again is no problem but I need to remove all traces and from mongo too.

    ####QUICK UPDATE### I just rebooted my machine and have managed to dlete the db and the user…I will try and install again and see if i get this error.

  • Well no idea…after rebooting machine several times and several times of doing the same thing…( at least I think it was lol 🙂 ) Here w are again.

    Fell free to purge this post as it serves no purpose other than reminding of my own mistakes haha… Sorry for the fuss but really dont know what happened.

    2022-08-18 19_21_51-Home _ NodeBB.png

  • @Sampo2910 That looks like an authentication issue - is the password correct - can you provide the command you used to create the database ?

    Should be something like

    db.createUser( { user: "sudonixtest", pwd: "lkjklj9995485469dffgkjk-201x", roles: [ { role: "readWrite", db: "sudonixtest" }, { role: "clusterMonitor", db: "admin" } ] } )
    

    m

  • @Sampo2910 said in NodeBB Mess / Mongo DB:

    ####QUICK UPDATE### I just rebooted my machine and have managed to dlete the db and the user…I will try and install again and see if i get this error.

    🙂 That sounds like a database deadlock. If you have records in use, then of course, the drop will fail unless it’s forced.

    Glad to hear it’s sorted.

  • @phenomlab What amazes me and this is pretty much everytime with NodeBB haha. The VERY FIRST THING I try to do…Just makes me feel stupid. Surely this cant be just me haha.

    2022-08-18 19_40_07-Extend _ Plugins _ NodeBB Admin Control Panel.png

  • @Sampo2910 🙂 You’ll get that error if the .json file isn’t updated for latest release compliance - but you can still install from the CLI by using npm install nodebb-plugin-whateveritis

  • phenomlabundefined phenomlab has marked this topic as solved on

Did this solution help you?
Did you find the suggested solution useful? Why not buy me a coffee? It's a nice gesture, and a great way to show your appreciation 💗

  • Fixed background to nodebb forum

    Solved Configure
    25
    4 Votes
    25 Posts
    1k Views

    @Panda said in Fixed background to nodebb forum:

    Chatgpt told me the ::before method.

    Go figure 😛

  • 2 Votes
    3 Posts
    149 Views

    Ah silly me, thanks for finding that!

  • Composer options on nodebb

    Solved Configure
    8
    3 Votes
    8 Posts
    285 Views

    @Panda You should be able to expose the CSS for these using F12 to get into console

    3591518c-e3a3-4ada-a43c-6b32a5e0359c-image.png

    a2b8ed46-4157-4ff2-85f0-576543380107-image.png

    That should then expose the element once selected

    89d9c545-a47a-40d1-98f4-80cf3b958e8f-image.png

    Here’s the below CSS you need based on the screenshot provided.

    .composer .formatting-bar .formatting-group li[data-format="picture-o"], .composer .formatting-bar .formatting-group li[data-format="spoiler"] { display: none; }
  • 0 Votes
    2 Posts
    130 Views

    @mventures the swatch feature you refer to isn’t a NodeBB plugin, but a utility that I wrote that handles this. It is available for v2 (as you can see here) but I’ve stopped developing and releasing the code because it has been entirely rewritten to work for v3.

    If you’d like the code, this is possible, but you’ll need to upgrade to v3 first.

  • 0 Votes
    5 Posts
    192 Views

    @mventures Yes, exactly. The other icon will restart NodeBB whilst the first icon I referenced will rebuild (recompile) it.

    The huge strength of NodeBB over Flarum (for example) is that the code is precompiled, and called once at boot. PHP’s code has to repeatedly reload code from source making it much slower.

  • 1 Votes
    6 Posts
    186 Views

    Up to you really 🙂

  • Viewing Permission.

    Solved General
    33
    12 Votes
    33 Posts
    2k Views

    @phenomlab

    Ah Mark you are a star. Thank you very much. I just logged on and seen someone had worked their magic 🙂

    Again it is very much appreciated.

  • Configure SMTP for Nodebb

    Solved Configure
    14
    5 Votes
    14 Posts
    773 Views

    @marusaky based on the work completed thus far (in relation to PM exchanges), I’m going to mark this completed. Sending email from the server itself works fine without issue, and DNS appears to be clean (valid SPF, DMARC, and DKIM records).

    It appears that only Gmail marks incoming messages from your domain as spam - perhaps because of the domain age, which there is nothing we can do to prevent this. Mail delivery to all other domains appears to work fine in al of my tests.