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 💗

  • 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; }
  • NodeBB v3 Quick reply

    Solved Configure
    4
    2 Votes
    4 Posts
    170 Views

    here is the link: https://app.transifex.com/nodebb/nodebb/translate/#tr

  • NodeBB: Consent page

    Solved Configure
    16
    4 Votes
    16 Posts
    557 Views

    @DownPW I still do not see any issues.

  • 0 Votes
    6 Posts
    220 Views

    @mventures You’d need to connect to the server and execute it directly - not on your local terminal. Review the guide below, which will show you how to gain access via SSH to your server

    https://docs.ovh.com/gb/en/dedicated/ssh-introduction/

    Once you have access, you’ll need to navigate to the actual folder where NodeBB is installed

    You’ll then need to change to the directory as shown below

    /home/unbuntu/nodebb

    fdffe673-bf63-4b6d-a728-5506fddc1aff-image.png

    In most cases, initial access takes you to the root of the file system. You can always issue pwd in a Linux terminal which will show you the Present Working Directory. From there, you can issue the command

    cd /home/ubuntu/nodebb

    Once in the NodeBB directory, you’d use the below commands

    ./nodebb stop git fetch && git checkout develop && git reset --hard origin/develop ./nodebb upgrade ./nodebb start

    Line 1 stops the NodeBB instance
    Line 2 gets the latest files from GIT (repository) and then checks out the development branch. It then resets the version you are using to the development branch ready for v3
    Line 3 Runs the upgrade once the new branch is set, and code pulled
    Line 4 Restarts the NodeBB instance after the upgrade has completed

    Note that when you restart NodeBB and log back in, things will look very different to what you had in v2.

  • 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.

  • nodebb loading emojis

    Solved Configure
    16
    1 Votes
    16 Posts
    461 Views

    @DownPW sure. Let me have a look at this in more detail. I know nginx plus has extensive support for this, but it’s not impossible to get somewhere near acceptable with the standard version.

    You might be better off handling this at the Cloudflare level given that it sits in between the requesting client and your server.

  • Adding fileWrite to nodebb code

    Solved Configure
    16
    5 Votes
    16 Posts
    586 Views

    @eveh this might be a question for the NodeBB Devs themselves. In all honesty, I’m not entirely sure without having to research this myself.

  • 3 Votes
    4 Posts
    438 Views

    @cagatay same here. Was previously an IONOS user, but moved to Hetzner to realise both savings and performance increase and have never looked back.