ERROR: Unable to parse config.json #6658
-
I've had my MC running for a couple of years now (docker on Ubuntu 22.04). I upgraded it this morning to version 1.1.36. The upgrade went fine. But I noticed something when I started it up. I started it with "docker compose up -d && docker compose logs -f" so I could monitor for any issues. And then I noticed that although it starts and seems to run just fine, I get about 14 of these notices: mcentral | ERROR: Unable to parse /opt/meshcentral/meshcentral-data/config.json. I have run my json through a validator (jsonlint and vscode) and both seem to think the json is just fine. However, VSCode reports the schema is wrong and unreachable. "Unable to load schema from 'http://info.meshcentral.com/downloads/meshcentral-config-schema.json': getaddrinfo ENOTFOUND info.meshcentral.com." I have attached my config.json (private data obfuscated). Anyone have any idea what is causing those "Unable to parse" errors? I realize that my system is working as expected but having those errors lets me know that "something" is not quite right and I would love to solve it. |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 7 replies
-
That schema is an old one and no longer accessible |
Beta Was this translation helpful? Give feedback.
-
Thanks @si458 , I updated to json you provided but it still shows the following message: "Unable to parse content from 'https://github.com/Ylianst/MeshCentral/blob/master/sample-config.json': Parse error at offset 6." And my Meshcentral still gives those "mcentral | ERROR: Unable to parse /opt/meshcentral/meshcentral-data/config.json" on starting MeshCentral up as well. |
Beta Was this translation helpful? Give feedback.
-
Ah I see.. Thank you. Yes, I have changed the schema to "https://raw.githubusercontent.com/Ylianst/MeshCentral/master/meshcentral-config-schema.json" and now VSCode no longer reports any problems with the config.json file. However, I do still get 13 of the following error messages when starting up MeshCentral. "ERROR: Unable to parse /opt/meshcentral/meshcentral-data/config.json." But they clearly are not "critical" errors because MC starts and runs and "seems" fine. Its just drives me nuts that something things something is wrong with that file and I can't tell what it is. Is there any easy way to find out what the messages are referring to? |
Beta Was this translation helpful? Give feedback.
-
I'm not sure how there could be another instance running. Basically as I have been testing this, I run "docker compose stop", make any adjustments to the config.json, (or none at all) then I run docker compose up -d && docker compose logs -f". But it does make me wonder if it is picking up from a previous run somehow. So I will try stopping the container and then rebooting and then starting the container just to see. |
Beta Was this translation helpful? Give feedback.
-
Its pretty straight forward.
|
Beta Was this translation helpful? Give feedback.
-
See below. Sanitized of course..
|
Beta Was this translation helpful? Give feedback.
-
Let me correct that and give it another try. |
Beta Was this translation helpful? Give feedback.
-
That solved it! You sir, are a GENIUS! Honestly, I don't know how I messed that up. |
Beta Was this translation helpful? Give feedback.
Only thing I can think of is a few of ur true/false values are set as strings using speech marks
"
and they should be without them,Also the num of hours in backup is again in speech marks and should just be a number