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 💗

  • NodeBB: Favicon upload issue

    Solved Configure
    12
    3 Votes
    12 Posts
    359 Views

    @phenomlab I am on a Mac, so I used the “Option + Command + I”, and then performed the steps. It loaded my favicon! I checked on Firefox which I haven’t used before, and it showed my favicon also! That’s fantastic and thank you for the help!

  • 0 Votes
    2 Posts
    136 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.

  • Podcast Share NodeBB

    Solved Configure
    15
    4 Votes
    15 Posts
    485 Views

    @cagatay You could experiment with nodebb-plugin-ns-embed but I expect the x-origin tag on the remote site to prevent playback.

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

  • 1 Votes
    2 Posts
    340 Views

    @Hari this helped

  • NodeBB metadata

    Solved Configure
    4
    2 Votes
    4 Posts
    368 Views

    @phenomlab said in NodeBB metadata:

    @jac Are you sure ?

    https://www.google.co.uk/search?q=site%3Astockportcounty.fans&sxsrf=AOaemvLwnaZL-PliU_2dBOg_Eo1pMVhBjg%3A1638982328139&source=hp&ei=uOKwYeatBcOsad3yp7AE&iflsig=ALs-wAMAAAAAYbDwyLBSDcG5XYoFCKwQFhgz94wTxOcV&ved=0ahUKEwjm6dX71NT0AhVDVhoKHV35CUYQ4dUDCAk&uact=5&oq=site%3Astockportcounty.fans&gs_lcp=Cgdnd3Mtd2l6EAM6BAgjECc6CwgAEIAEELEDEIMBOg4ILhCABBCxAxDHARCjAjoRCC4QgAQQsQMQgwEQxwEQowI6BQguEIAEOggIABCABBCxAzoFCAAQgAQ6CAguELEDEIMBOgsILhCABBDHARCvAToICC4QgAQQsQM6BQgAELEDOgsILhCABBDHARDRAzoLCAAQgAQQsQMQyQM6BQgAEJIDUABYySZg0CdoAHAAeACAAW2IAa0NkgEEMjMuMpgBAKABAQ&sclient=gws-wiz

    Fair enough 🤪🤪😁.

  • 3 Votes
    4 Posts
    443 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.