ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Solved Trying to switch MeshCentral from MongoDB to NeDB

    IT Discussion
    meshcentral 2 meshcentral issues
    1
    5
    915
    Loading More Posts
    • 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.
    • JaredBuschJ
      JaredBusch
      last edited by JaredBusch

      I posted an issues on their github to see if they have a way to handle this.

      https://github.com/Ylianst/MeshCentral/issues/246

      Obviously, I can reinstall.

      This entire thing is a test system, but this database issue could be important, so I asked.

      1 Reply Last reply Reply Quote 4
      • JaredBuschJ
        JaredBusch
        last edited by

        Exported, cleaned up references to mongo and all better. No Mongo.

        Export the database (this uses the running database, so I had to have Mongo fixed)

        cd /opt/meshcentral
        node node_modules/meshcentral --dbexport"
        

        Go in the config file and remove the "mongodb" line(s) in settings

        nano /opt/meshcentral/meshcentral-data/config.json
        

        Restart meshcentral

        systemctl restart meshcentral
        # or
        /opt/meshcentral/mcstop
        /opt/meshcentral/mcstart
        

        Import the database

        cd /opt/meshcentral
        node node_modules/meshcentral --dbimport"
        

        Restart meshcentral

        systemctl restart meshcentral
        # or
        /opt/meshcentral/mcstop
        /opt/meshcentral/mcstart
        
        1 Reply Last reply Reply Quote 4
        • JaredBuschJ
          JaredBusch
          last edited by

          So I resintalled Mongo using this method to get the repo on the system.

          4.0.9 installed. but it will not start.

          [root@mc ~]# systemctl start mongod
          Job for mongod.service failed because the control process exited with error code.
          See "systemctl status mongod.service" and "journalctl -xe" for details.
          
          [root@mc ~]# journalctl -u mongod.service
          >skip reboots, and multiple attempts...<
          May 25 14:21:45 mc.bundystl.com systemd[1]: Starting MongoDB Database Server...
          May 25 14:21:45 mc.bundystl.com mongod[7823]: about to fork child process, waiting until server is ready for connections.
          May 25 14:21:45 mc.bundystl.com mongod[7823]: forked process: 7825
          May 25 14:21:45 mc.bundystl.com mongod[7823]: ERROR: child process failed, exited with error number 1
          May 25 14:21:45 mc.bundystl.com mongod[7823]: To see additional information in this output, start without the "--fork" option.
          May 25 14:21:45 mc.bundystl.com systemd[1]: mongod.service: Control process exited, code=exited, status=1/FAILURE
          May 25 14:21:45 mc.bundystl.com systemd[1]: mongod.service: Failed with result 'exit-code'.
          May 25 14:21:45 mc.bundystl.com systemd[1]: Failed to start MongoDB Database Server.
          
          1 Reply Last reply Reply Quote 0
          • JaredBuschJ
            JaredBusch
            last edited by JaredBusch

            manually executed mongod pointing the DB folder to the meshcentral dat afolder and it all started up

            mongod --dbpath /opt/meshcentral/meshcentral-data/
            

            Then restarted the meshcentral service

            systemctl start meshcentral
            

            But it is like a brand new instance. 😞

            1 Reply Last reply Reply Quote 0
            • JaredBuschJ
              JaredBusch
              last edited by

              Found my data.. Mongo on Fedora 29 put the database in /var/lib/mongodb

              1 Reply Last reply Reply Quote 0
              • JaredBuschJ
                JaredBusch
                last edited by

                Exported, cleaned up references to mongo and all better. No Mongo.

                Export the database (this uses the running database, so I had to have Mongo fixed)

                cd /opt/meshcentral
                node node_modules/meshcentral --dbexport"
                

                Go in the config file and remove the "mongodb" line(s) in settings

                nano /opt/meshcentral/meshcentral-data/config.json
                

                Restart meshcentral

                systemctl restart meshcentral
                # or
                /opt/meshcentral/mcstop
                /opt/meshcentral/mcstart
                

                Import the database

                cd /opt/meshcentral
                node node_modules/meshcentral --dbimport"
                

                Restart meshcentral

                systemctl restart meshcentral
                # or
                /opt/meshcentral/mcstop
                /opt/meshcentral/mcstart
                
                1 Reply Last reply Reply Quote 4
                • 1 / 1
                • First post
                  Last post