• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Can't connect to MongoDB

Scheduled Pinned Locked Moved Solved Technical Support
support
10 Posts 3 Posters 223 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • MichaelwuM Offline
    MichaelwuM Offline
    Michaelwu
    wrote on last edited by
    #1

    The problem happened after I reboot my server by using:

    sudo reboot
    

    After I reconnect, I <cd> to the NodeBB dictionary:

    cd /home/NodeBB
    

    And then I input:

    ./nodebb start
    

    截屏2023-06-08 上午1.26.06.png
    And I see the log by typing

    ./nodebb log
    

    I saw this:截屏2023-06-08 上午1.27.27.png

    I type

    mongo
    

    and I met this
    截屏2023-06-08 上午1.28.18.png

    I cannot start my server now ,it is 502
    截屏2023-06-08 上午1.29.00.png

    Who can help me solve it?
    Thanks!

    1 Reply Last reply
    1
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #2

    It sounds like MongoDB was installed but not enabled, so it is not turned on when the server is started.

    Can you try running systemctl start mongod, and then type mongo again to verify that it is working?

    If all's well, then systemctl enable mongod to have it set up to turn on automatically.

    1 Reply Last reply
    0
  • MichaelwuM Offline
    MichaelwuM Offline
    Michaelwu
    wrote on last edited by
    #3

    Returned this @julian
    截屏2023-06-08 上午1.31.31.png
    I have just searched the stackoverflow and tried all the ways.But it still doesnt work...

    I am waiting for the cooldown...
    截屏2023-06-08 上午1.33.38.png

    1 Reply Last reply
    1
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #4

    How did you install MongoDB?

    What is the output of ls /etc/systemd/system/mon*? Perhaps there's a different way to administer MongoDB.

    MichaelwuM 1 Reply Last reply
    0
  • MichaelwuM Offline
    MichaelwuM Offline
    Michaelwu
    wrote on last edited by Michaelwu
    #5

    Returned this @julian
    截屏2023-06-08 上午1.36.41.png

    1 Reply Last reply
    0
  • MichaelwuM Offline
    MichaelwuM Offline
    Michaelwu
    replied to julian on last edited by
    #6

    @julian
    截屏2023-06-08 上午1.42.46.png

    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by julian
    #7

    Then you need to figure out how you installed MongoDB, and turn it on. That's all.

    I can't help you any further because this is a configuration issue, and not with NodeBB itself. Not trying to be mean, I literally just can't help you because I don't know how you set up your server.

    1 Reply Last reply
    0
  • MichaelwuM Offline
    MichaelwuM Offline
    Michaelwu
    wrote on last edited by
    #8

    OK thanks

    1 Reply Last reply
    0
  • PitaJP Offline
    PitaJP Offline
    PitaJ Global Moderator Plugin & Theme Dev
    wrote on last edited by
    #9

    which mongo could help you find it

    MichaelwuM 1 Reply Last reply
    0
  • MichaelwuM Offline
    MichaelwuM Offline
    Michaelwu
    replied to PitaJ on last edited by
    #10

    @PitaJ @julian Thanks A LOT!
    The server is up now, thank you!

    1 Reply Last reply
    0
  • MichaelwuM Michaelwu has marked this topic as solved on

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development