Searching the code repository for source of error message

Is there a way to search the code base on Mercurial for text strings? Or is the recommended approach to download the source and run a local text search?

I have an error message that’s been posted in the forums before, but without a posted resolution. So I thought I would dig into the code base to see where the error messages are coming from.

I have a setup where multiple Orthancs are running independently, acting as DICOM nodes for different research groups. Some can see each other (by way of DicomModalities settings in the configuration), but for the most part, access to any given Orthanc is limited by a small number of nodes in DicomModalities settings.

Periodically, I will see a train of “Receiving Association failed: Unrecognized PDU Type: ##” messages in the logs of several of the Orthancs, all with very similar time stamps.

My thought was that a misconfigured node (or someone) might be probing the network for connections. That someone might even be me! I have scripts on cron jobs to periodically scrape the log files to report status. Perhaps there is some aspect of my script that is failing.
Otherwise, I don’t understand why these unrelated Orthancs independently generate these error messages at the same time.

How would I go about digging into the code base to search for the routine that generates these error messages? Should I download the code or is the repository searchable?

Thanks,
John.

Hi John,

There is indeed no code search interface in the Mercurial server so your only option is indeed to clone the repo locally and browser the code in your favorite IDE or text editor.

To clone the repo:
hg clone https://orthanc.uclouvain.be/hg/orthanc/ (we have just changed the HG server url).

HTH,

Alain

Thanks for the confirmation, Alain.

In the mean time, since I’m running this in Docker, I had a mismatch between Orthanc log times and the time on the external host. I fixed the internal local time so that it matches my host machine time. That should make it easier for me to tell whether these errors are occurring at the time of scheduled cron jobs or not.

John.