Cannot parse *json file after update Orthanc Version

Hello everyone, I have a production instance of Orthanc 1.10 working more than a year in Ubuntu Server 22.04. I only use it for storage, but last month I wanna try to use the tools of OrthancExplorer2 to modify Study Tags Information. So, I mount a virtual machine with the same configuration of my server, and made the upate accord the LSB Binaries Update described in the Orthanc Book. So far, so good, the test environment works fine updated to Orthanc 1.11 version, but when I try to do the same on my server, Orthanc does not start after the update, neither in 1.11 version nor in 1.12. The log file show an error of kind “Cannot parse a Json Document” in the orthanc.json file, but I spend almost half day reviewing the config files and everything seems look good. So, anyone have the same issue?
Here’s the content of the log file, If someone see something I pass, I’ll be very gratefull to know what it is…

W0427 03:19:22.943927 main.cpp:2006] Orthanc version: 1.11.0
W0427 03:19:22.944043 OrthancConfiguration.cpp:107] Scanning folder “/etc/orthanc” for configuration files
W0427 03:19:22.944105 OrthancConfiguration.cpp:56] Reading the configuration from: “/etc/orthanc/worklists.json”
W0427 03:19:22.944296 OrthancConfiguration.cpp:56] Reading the configuration from: “/etc/orthanc/orthanc.json”
E0427 03:19:22.945009 OrthancException.cpp:58] Cannot parse a JSON document: The configuration file does not follow the JSON syntax: /etc/orthanc/orthanc.json
E0427 03:19:22.945124 main.cpp:2063] Uncaught exception, stopping now: [Cannot parse a JSON document] (code 28)

Sounds like you need to look at your *.json config files and look for a syntax error there ?

Are you able to look at all of the files in the etc/orthanc directory and examine them for errors ? It sounds like the orthanc.json one cannot be parsed ? That is often related to an extra comma or a missing comma somewhere or some other syntax error. Orthanc allows those files to not be strict JSON format because you can have comments in there, so they are more like .js files. So, JSON Lint won’t really help find the error unless you remove all of the comments.

/sds

Hey sdscotti, thanks for replay
I already check the *.json config file a few times (in the topic I mentioned that), in fact, before the version update, Orthanc works great with the same file, I backed up this file and use it when update to 1.11 and 1.12 version, in fact, if I downgrade again to 1.10 version, works fine, so I know does not have any sintax error, at least as far as I know, also the majority of options in the config file are default, just change the storage paths for database and files, dicom port transfer from 4242 to 104 and some few things to check dicom comunication and promiscuous mode

Hello,

Please provide your problematic configuration file, otherwise nobody will be able to help you.

Kind Regards,
Sébastien-

Just a random suggestion : maybe check your JSON file in a hex editor. If Windows has been involved somewhere in the process, maybe the so-called BOM bytes have been added to the file (unsure if Orthanc supports them) or (worse, but seen in the field) the file has been changed to UTF-16.

hexdump -C orthanc-config.json

You can also share the file here [after stripping potentially confidential info from it].

I have run into that problem before (stray characters and BOM bytes). If you upload the file we could look at it. Also, maybe confirm that the file that you think your instance is using is actually the one that you think it is ?

Hi everyone, thank’s to all for your help, there’s a comma in the configuration.json file, that for a strange reason, works fine in the previous version, but it is solved now, sorry for the time I make you lost