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

    MeshCental 2 Config File Issues

    IT Discussion
    meshcentral meshcentral 2 lets encrypt dashrender
    6
    30
    2.3k
    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.
    • D
      Dashrender
      last edited by

      Here is my current config.json
      8df5a373-bd1f-4383-92de-0fed13421496-image.png

      Here is the directory listing from /opt/meshcentral/meshcentral-data
      04a0c402-8f51-42a7-ac83-2b86083431fc-image.png

      here is the error in /opt/meshcentral/stdout.txt when I load MC
      ERROR: Unable to parse /opt/meshcentral/meshcentral-data/config.json.
      79dce82a-edab-4e16-a63b-71f8a2b14caa-image.png

      S 1 Reply Last reply Reply Quote 0
      • S
        scottalanmiller @Dashrender
        last edited by

        @Dashrender Use cat, not tail, to show us the config.

        D 1 Reply Last reply Reply Quote 1
        • D
          Dashrender @scottalanmiller
          last edited by

          @scottalanmiller said in MeshCental 2 Config File Issues:

          @Dashrender Use cat, not tail, to show us the config.

          Thanks

          8b3ab83c-30a5-4e18-b5cf-2571fa4de224-image.png

          S 1 Reply Last reply Reply Quote 0
          • S
            scottalanmiller @Dashrender
            last edited by

            @Dashrender Extra comma at the end before the final brace.

            O D 2 Replies Last reply Reply Quote 0
            • O
              Obsolesce @scottalanmiller
              last edited by

              @scottalanmiller said in MeshCental 2 Config File Issues:

              @Dashrender Extra comma at the end before the final brace.

              They look the same to me, in this case. But yeah, cat for this purpose 100%.

              1 Reply Last reply Reply Quote 0
              • D
                Dashrender @scottalanmiller
                last edited by Dashrender

                @scottalanmiller said in MeshCental 2 Config File Issues:

                @Dashrender Extra comma at the end before the final brace.

                Yep, that was it.. now I get
                and error use --cert to setup the default server name ...

                7510b7e6-ef5f-40c2-8654-6899fba12d5b-image.png

                I notice it's commenting on LAN mode - but my config has WANonly listed

                1 Reply Last reply Reply Quote 0
                • D
                  Dashrender
                  last edited by Dashrender

                  The WAN mode might be a case problem, from the manual

                  d5a79b74-9680-4598-a17f-45bb45b21dee-image.png

                  in looking through the documentation - I've now found this option referenced three ways
                  WANonly/wanonly/Wanonly
                  I'm wondering if it should be WANOnly - cap the whole acronym and the first letter of the second word.

                  1 Reply Last reply Reply Quote 0
                  • D
                    Dashrender
                    last edited by

                    OK Changed the caps in WANonly to Wanonly and no change - still reports at LAN mode

                    1 Reply Last reply Reply Quote 0
                    • D
                      Dashrender @Dashrender
                      last edited by

                      @Dashrender said in MeshCental 2 Config File Issues:

                      OK weirdness - I followed the instructions to make mcstart and mcstop.. yet mcstop doesn't work... but if I type it in by hand

                      sudo ./pkill -f node_modules/meshcentral

                      it does kill it.
                      here is the ls -l
                      ccaba972-0387-48ec-9454-e7932a3a5a5d-image.png

                      OK found my issue here - type-o, I had mode instead of node in my command. that's working now.
                      But I still have the cert error when starting MC.

                      J 1 Reply Last reply Reply Quote 0
                      • J
                        JaredBusch @Dashrender
                        last edited by

                        @Dashrender said in MeshCental 2 Config File Issues:

                        • type-o, I

                        wtf

                        1 Reply Last reply Reply Quote 1
                        • D
                          Dashrender
                          last edited by

                          OK I think I know why WANOnly isn't working - because MC doesn't think I have a cert name specified.

                          I started the process manually adding a --cert command and this is what I get.

                          1d53903b-2b3b-43c5-a5c2-798e2fc8ffcd-image.png

                          Notice the --cert error is still there - now the question is, WHY?

                          1 Reply Last reply Reply Quote 0
                          • D
                            Dashrender
                            last edited by

                            OK - FINALLY - it's working!!!!

                            As part of my troubleshooting, I added "Cert": "host.domainname.com", back to the config.json (which got rid of the associated error message) now to see if it will work without it.

                            1 Reply Last reply Reply Quote 0
                            • D
                              Dashrender
                              last edited by

                              I know others are saying that

                               "Cert": "host.domainname.com",
                              

                              isn't needed in the config.json file, but mine wouldn't pull an LE cert until I added it.

                              Here is my config.json

                              {
                                "__comment__" : "This is a sample configuration file, edit a section and remove the _ in front of the name. Refer to the user's guide for details.",
                                "settings": {
                                  "Cert": "mc.beyondxxxxxxx.com",
                                  "RedirPort": 80,
                                  "MaxInvalidLogin": { "time": 10, "count": 10, "coolofftime": 10 },
                                  "Wanonly": true
                                },
                                "letsencrypt": {
                                  "email": "itadmin@myxxxxxx.com",
                                  "names": "mc.beyondxxxxxxx.com",
                                  "rsaKeySize": 3072,
                                  "production": false
                                }
                              }
                              
                              1 Reply Last reply Reply Quote 0
                              • D
                                Dashrender
                                last edited by

                                @Ylian
                                Any thoughts on why my system is demanding having the "cert": line added?

                                I did do a startup based on the install instructions

                                 node ./node_modules/meshcentral --cert example.servername.com
                                

                                Does that put the hostname somewhere other than the config.json?

                                1 Reply Last reply Reply Quote 0
                                • 1
                                • 2
                                • 2 / 2
                                • First post
                                  Last post