DICOMWEB plugin error

Hello to All,

I met a problem on dicomweb plugin, the orthanc I installed through the command on Ubuntu 18.04 TLS, after I installed the dicomweb and reboot the system, I can’t access the page, the page shown up the error.

Image 2.png

I referred to the resource on the Orthanc website and tried to add the codes into the orthanc.json, but it caused the service to crash.

{
“Name” : “Orthanc”,
[…]
“Plugins” : [
“/usr/share/orthanc/plugins/libOrthancDicomWeb.so”
]
},

“DicomWeb” : {
“Enable” : true, // Whether DICOMweb support is enabled
“Root” : “/dicom-web/”, // Root URI of the DICOMweb API (for QIDO-RS, STOW-RS and WADO-RS)
“EnableWado” : true, // Whether WADO-URI (previously known as WADO) support is enabled
“WadoRoot” : “/wado”, // Root URI of the WADO-URI (aka. WADO) API
“Ssl” : false, // Whether HTTPS should be used for subsequent WADO-RS requests
“QidoCaseSensitive” : true, // For QIDO-RS server, whether search is case sensitive (since release 0.5)
“Host” : “localhost”, // Hard-codes the name of the host for subsequent WADO-RS requests (deprecated)
“StudiesMetadata” : “Full”, // How study-level metadata is retrieved (since release 1.1, cf. section below)
“SeriesMetadata” : “Full” // How series-level metadata is retrieved (since release 1.1, cf. section below)
//“StowMaxInstances” : 10, // For STOW-RS client, the maximum number of instances in one single HTTP query (0 = no limit)
//“StowMaxSize” : 10, // For STOW-RS client, the maximum size of the body in one single HTTP query (in MB, 0 = no limit)
},

Does anyone have experience with it?

Thanks,
Mark

HI

Arent you missing a “/” on “/usr/share/orthanc/plugins/libOrthancDicomWeb.so”

Shouldnt it be “/usr/share/orthanc/plugins/lib**/**OrthancDicomWeb.so”

Image 2.png

Hello,

I think the path for the plugin is correct.

Image 3.png

Mark

guilherm...@gmail.com 在 2020年7月30日 星期四下午6:20:35 [UTC+8] 的信中寫道:

Hello,

First of all, this is not a “crash”, but a 404 HTTP client error, which indicates that you are calling a nonexistent URI in the DICOMweb API:
https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

Please carefully read the reference of the DICOMweb API:
https://www.dicomstandard.org/dicomweb

The “/” URI is not existent at the “/dicom-web/” root of the DICOMweb API in Orthanc, hence the result you observe:

$ curl https://demo.orthanc-server.com/dicom-web/
{
“HttpError” : “Not Found”,
“HttpStatus” : 404,
“Message” : “Unknown resource”,
“Method” : “GET”,
“OrthancError” : “Unknown resource”,
“OrthancStatus” : 17,
“Uri” : “/dicom-web/”
}

Here is a working example (the “/studies” URI corresponds to the DICOMweb QIDO-RS call to return all the available studies):

$ curl https://demo.orthanc-server.com/dicom-web/studies

HTH,
Sébastien-

Hi Sébastien,

I tried to modify the host in the DICOMWEB.json as the screen capture. But the result is the same.

Image 6.png

Image 5.png

Mark

s.jo...@gmail.com 在 2020年8月1日 星期六下午6:08:32 [UTC+8] 的信中寫道:

The “Host” option has nothing to do with your issue.

First, make sure that the DICOMweb plugin is started by inspecting the logs:
https://book.orthanc-server.com/users/support.html

Then, adapt the command I gave above to query your own Orthanc server:

$ curl http://localhost:8042/dicom-web/studies

Sébastien-

I use the path http://localhost:8042/dicom-web/studies on my browser, it would download the studies.mht, and I open the file is void.

I tried to follow the procedure to track and analyze the log, but I freeze on the command ‘sudo -u orthanc /usr/sbin/Orthanc --verbose /etc/orthanc/ > Orthanc.log 2>&1
Image 1.png

How should I go to the next step?

Thank you,
Mark

s.jo...@gmail.com 在 2020年8月4日 星期二上午12:48:11 [UTC+8] 的信中寫道:

What about simply reading the content of the “20200806Orthanc.log” you just created?

You can check the plugin initialization by enabling the verbose mode (check documentation for infos).
After that, you will have something like this in your orthanc console output logs:

image (6).png

Pe joi, 6 august 2020, la 10:58:42 UTC+3, s.jo...@gmail.com a scris:

I am not sure why the log doesn’t create.

Is permission not enough?

Thank you,

Image 2.png

vers...@gmail.com 在 2020年8月6日 星期四下午4:57:50 [UTC+8] 的信中寫道:

You are mixing Windows/Linux, and you are mixing the logs generated by the Windows service from the Osimis installer and the logs generated by the UNIX command-line.

Please carefully follow the instructions from the Orthanc Book:
https://book.orthanc-server.com/faq/log.html#log

Finally, I found the log.

W0806 07:34:51.071936 main.cpp:1297] Orthanc version: 1.3.1
W0806 07:34:51.072142 main.cpp:1145] Performance warning: Non-release build, runtime debug assertions are turned on
W0806 07:34:51.074576 OrthancInitialization.cpp:162] Scanning folder “/etc/orthanc/” for configuration files
W0806 07:34:51.074721 OrthancInitialization.cpp:114] Reading the configuration from: “/etc/orthanc/worklists.json”
W0806 07:34:51.075126 OrthancInitialization.cpp:114] Reading the configuration from: “/etc/orthanc/serve-folders.json”
W0806 07:34:51.075416 OrthancInitialization.cpp:114] Reading the configuration from: “/etc/orthanc/orthanc.json”
W0806 07:34:51.076184 OrthancInitialization.cpp:114] Reading the configuration from: “/etc/orthanc/dicomweb.json”
W0806 07:34:51.076452 OrthancInitialization.cpp:114] Reading the configuration from: “/etc/orthanc/webviewer.json”
I0806 07:34:51.076780 Toolbox.cpp:1271] Using locale: “en_US.UTF-8” for case-insensitive comparison of strings
I0806 07:34:51.077035 Enumerations.cpp:1707] Default encoding for DICOM was changed to: Latin1
I0806 07:34:51.077537 FromDcmtkBridge.cpp:191] Using DCTMK version: 362
W0806 07:34:51.120434 FromDcmtkBridge.cpp:149] Loading the external DICOM dictionary “/usr/share/libdcmtk12/dicom.dic”
W0806 07:34:51.144989 FromDcmtkBridge.cpp:149] Loading the external DICOM dictionary “/usr/share/libdcmtk12/private.dic”
W0806 07:34:51.160280 FromDcmtkBridge.cpp:2075] Registering JPEG Lossless codecs in DCMTK
W0806 07:34:51.160334 FromDcmtkBridge.cpp:2080] Registering JPEG codecs in DCMTK
W0806 07:34:51.176984 main.cpp:670] Loading plugin(s) from: /usr/share/orthanc/plugins/
I0806 07:34:51.177051 PluginsManager.cpp:288] Scanning folder /usr/share/orthanc/plugins/ for plugins
I0806 07:34:51.177139 PluginsManager.cpp:311] Found a shared library: “/usr/share/orthanc/plugins/libOrthancDicomWeb.so”
W0806 07:34:51.209852 PluginsManager.cpp:269] Registering plugin ‘dicom-web’ (version 0.4)
W0806 07:34:51.209938 PluginsManager.cpp:168] Performance warning in DICOMweb: Non-release build, runtime debug assertions are turned on
W0806 07:34:51.210281 PluginsManager.cpp:168] URI to the DICOMweb REST API: /dicom-web/
I0806 07:34:51.210323 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /dicom-web/instances
I0806 07:34:51.210382 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /dicom-web/series
I0806 07:34:51.210435 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /dicom-web/studies
I0806 07:34:51.210486 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /dicom-web/studies/([^/])
I0806 07:34:51.210549 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /dicom-web/studies/([^/]
)/instances
I0806 07:34:51.210607 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /dicom-web/studies/([^/])/metadata
I0806 07:34:51.210663 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /dicom-web/studies/([^/]
)/series
I0806 07:34:51.210719 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /dicom-web/studies/([^/])/series/([^/])
I0806 07:34:51.210784 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /dicom-web/studies/([^/])/series/([^/])/instances
I0806 07:34:51.210844 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /dicom-web/studies/([^/])/series/([^/])/instances/([^/])
I0806 07:34:51.210914 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /dicom-web/studies/([^/]
)/series/([^/])/instances/([^/])/bulk/(.)
I0806 07:34:51.210996 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /dicom-web/studies/([^/]
)/series/([^/])/instances/([^/])/metadata
I0806 07:34:51.211108 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /dicom-web/studies/([^/])/series/([^/])/metadata
I0806 07:34:51.211190 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /dicom-web/studies/([^/])/series/([^/])/instances/([^/])/frames
I0806 07:34:51.211262 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /dicom-web/studies/([^/]
)/series/([^/])/instances/([^/])/frames/([^/])
I0806 07:34:51.211343 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /dicom-web/servers
I0806 07:34:51.211398 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /dicom-web/servers/([^/]
)
I0806 07:34:51.211454 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /dicom-web/servers/([^/])/stow
I0806 07:34:51.211511 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /dicom-web/servers/([^/]
)/get
I0806 07:34:51.211567 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /dicom-web/servers/([^/])/retrieve
W0806 07:34:51.211626 PluginsManager.cpp:168] URI to the WADO-URI API: /wado
I0806 07:34:51.211658 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /wado
I0806 07:34:51.211737 PluginsManager.cpp:311] Found a shared library: “/usr/share/orthanc/plugins/libOrthancWebViewer.so”
W0806 07:34:51.213040 PluginsManager.cpp:269] Registering plugin ‘web-viewer’ (version 2.3)
W0806 07:34:51.213103 PluginsManager.cpp:168] Performance warning in Web viewer: Non-release build, runtime debug assertions are turned on
W0806 07:34:51.213133 PluginsManager.cpp:168] Initializing the Web viewer
W0806 07:34:51.213462 PluginsManager.cpp:168] Web viewer using 2 threads for the decoding of the DICOM images
W0806 07:34:51.213500 PluginsManager.cpp:168] Storing the cache of the Web viewer in folder: /var/lib/orthanc/db-v6/WebViewerCache
I0806 07:34:51.214719 PluginsManager.cpp:172] No change in the versions, no need to clear the cache of the Web viewer
W0806 07:34:51.214954 PluginsManager.cpp:168] Web viewer using a cache of 100 MB
W0806 07:34:51.215028 PluginsManager.cpp:168] Using GDCM instead of the DICOM decoder that is built in Orthanc
I0806 07:34:51.215069 OrthancPlugins.cpp:1111] Plugin has registered a callback to decode DICOM images (1 decoder(s) now active)
I0806 07:34:51.215127 OrthancPlugins.cpp:1013] Plugin has registered a REST callback with mutual exclusion on: /web-viewer/series/(.
)
I0806 07:34:51.215185 OrthancPlugins.cpp:1013] Plugin has registered a REST callback with mutual exclusion on: /web-viewer/is-stable-series/(.)
I0806 07:34:51.215248 OrthancPlugins.cpp:1013] Plugin has registered a REST callback with mutual exclusion on: /web-viewer/instances/(.
)
I0806 07:34:51.215303 OrthancPlugins.cpp:1013] Plugin has registered a REST callback with mutual exclusion on: /web-viewer/libs/(.)
I0806 07:34:51.215356 OrthancPlugins.cpp:1013] Plugin has registered a REST callback with mutual exclusion on: /web-viewer/app/(.
)
I0806 07:34:51.215416 OrthancPlugins.cpp:1038] Plugin has registered an OnChange callback
I0806 07:34:51.215486 PluginsManager.cpp:311] Found a shared library: “/usr/share/orthanc/plugins/libServeFolders.so”
W0806 07:34:51.216157 PluginsManager.cpp:269] Registering plugin ‘serve-folders’ (version 1.3.1)
I0806 07:34:51.216251 OrthancPlugins.cpp:1013] Plugin has registered a REST callback witout mutual exclusion on: /app/plugin-serve-folders.html
W0806 07:34:51.216567 PluginsManager.cpp:168] ServeFolders: Empty configuration file: No additional folder will be served!
I0806 07:34:51.216635 PluginsManager.cpp:311] Found a shared library: “/usr/share/orthanc/plugins/libModalityWorklists.so”
W0806 07:34:51.217281 PluginsManager.cpp:269] Registering plugin ‘worklists’ (version 1.3.1)
W0806 07:34:51.217347 PluginsManager.cpp:168] Sample worklist plugin is initializing
W0806 07:34:51.217592 PluginsManager.cpp:168] Worklist server is disabled by the configuration file
W0806 07:34:51.217681 OrthancInitialization.cpp:998] SQLite index directory: “/var/lib/orthanc/db-v6”
W0806 07:34:51.217974 OrthancInitialization.cpp:1068] Storage directory: “/var/lib/orthanc/db-v6”
I0806 07:34:51.219037 DatabaseWrapper.cpp:307] Version of the Orthanc database: 6
W0806 07:34:51.219096 HttpClient.cpp:686] HTTPS will use the CA certificates from this file: /etc/orthanc/
I0806 07:34:51.219137 HttpClient.cpp:152] Setting the default timeout for HTTP client connections: 10 seconds
I0806 07:34:51.219179 HttpClient.cpp:136] Setting the default proxy for HTTP client connections:
I0806 07:34:51.219218 DicomUserConnection.cpp:1216] Default timeout for DICOM connections if Orthanc acts as SCU (client): 10 seconds (0 = no timeout)
I0806 07:34:51.220514 ServerIndex.cpp:365] Starting the database flushing thread (sleep = 10)
I0806 07:34:51.220688 ServerIndex.cpp:1888] Starting the monitor for stable resources (stable age = 60)
W0806 07:34:51.220723 ServerScheduler.cpp:135] The server scheduler has started
W0806 07:34:51.221359 LuaContext.cpp:103] Lua says: Lua toolbox installed
W0806 07:34:51.221653 ServerContext.cpp:182] Disk compression is disabled
I0806 07:34:51.221709 ServerContext.cpp:530] Storing MD5 for attachments: yes
W0806 07:34:51.221746 ServerIndex.cpp:1403] No limit on the number of stored patients
W0806 07:34:51.222058 ServerIndex.cpp:1420] No limit on the size of the storage area
I0806 07:34:51.222739 DicomServer.cpp:125] Setting timeout for DICOM connections if Orthanc acts as SCP (server): 30 seconds (0 = no timeout)
W0806 07:34:51.223275 main.cpp:862] DICOM server listening with AET ORTHANC on port: 11112
I0806 07:34:51.223333 DicomServer.cpp:62] DICOM server started
I0806 07:34:51.223376 MongooseServer.cpp:1049] HTTP keep alive is disabled
W0806 07:34:51.223468 MongooseServer.cpp:1075] HTTP compression is enabled
I0806 07:34:51.223512 MongooseServer.cpp:948] Starting embedded Web server using Mongoose
W0806 07:34:51.228316 main.cpp:795] HTTP server listening on port: 8042
W0806 07:34:51.228383 main.cpp:682] Orthanc has started
W0806 07:57:03.601061 main.cpp:740] Orthanc is stopping
W0806 07:57:03.793413 main.cpp:800] HTTP server has stopped
I0806 07:57:04.627449 DicomServer.cpp:83] DICOM server stopping
W0806 07:57:04.629230 main.cpp:878] DICOM server has stopped
I0806 07:57:05.349913 ServerIndex.cpp:1932] Closing the monitor thread for stable resources
I0806 07:57:05.350030 ServerIndex.cpp:385] Stopping the database flushing thread
W0806 07:57:05.350704 PluginsManager.cpp:219] Unregistering plugin ‘dicom-web’ (version 0.4)
W0806 07:57:05.350940 PluginsManager.cpp:219] Unregistering plugin ‘serve-folders’ (version 1.3.1)
W0806 07:57:05.351100 PluginsManager.cpp:219] Unregistering plugin ‘web-viewer’ (version 2.3)
W0806 07:57:05.351167 PluginsManager.cpp:168] Finalizing the Web viewer
W0806 07:57:06.477523 PluginsManager.cpp:219] Unregistering plugin ‘worklists’ (version 1.3.1)
W0806 07:57:06.477620 PluginsManager.cpp:168] Sample worklist plugin is finalizing
W0806 07:57:06.477898 main.cpp:1356] Orthanc has stopped

s.jo...@gmail.com 在 2020年8月6日 星期四下午5:19:58 [UTC+8] 的信中寫道:

Here are the important lines of your log:

W0806 07:34:51.071936 main.cpp:1297] Orthanc version: 1.3.1 […]
W0806 07:34:51.209852 PluginsManager.cpp:269] Registering plugin ‘dicom-web’ (version 0.4) […]
W0806 07:34:51.228383 main.cpp:682] Orthanc has started

W0806 07:57:03.601061 main.cpp:740] Orthanc is stopping

This shows the following:

  • Firstly, you are using an extremely old version of Orthanc (1.3.1, where the current version is 1.7.2) and of the DICOMweb plugin (0.4, where the current version is 1.2).
  • Secondly, you have not called “http://localhost:8042/dicomweb-studies” while generating the logs.

Thank you for the analysis. So I need to upgrade or reinstall the version, right?

s.jo...@gmail.com 在 2020年8月6日 星期四下午5:32:20 [UTC+8] 的信中寫道:

It is up to you decide if you want to keep an old version.

All I can say is that the “http://localhost:8042/dicom-web/studies” route works fine, even with Orthanc 1.3.1 and DICOMweb 0.4, as can be seen by using the Docker images:
https://book.orthanc-server.com/users/docker.html

First terminal:

$ docker run --rm -t -i -p 8042:8042 -p 4242:4242 jodogne/orthanc-plugins:1.3.1

Second terminal:

$ curl -u orthanc:orthanc -H ‘Accept: application/json’ http://localhost:8042/dicom-web/studies
[
]

Thank you, I will update the version and see what would happen.

s.jo...@gmail.com 在 2020年8月6日 星期四下午5:49:35 [UTC+8] 的信中寫道:

Hi,

I have reinstalled the Orthanc to 1.7.2 and initialed the environment successfully, but I am not found out the configuration file to adjust the parameters. Here is I turn on the server log.

root@:~# sudo ./Build/Orthanc &
[1] 1942
root@:~# W0807 02:12:23.117118 main.cpp:1625] Orthanc version: 1.7.2
W0807 02:12:23.123250 OrthancConfiguration.cpp:161] Using the default Orthanc configuration
W0807 02:12:23.258353 OrthancInitialization.cpp:293] SQLite index directory: “/root/OrthancStorage”
W0807 02:12:23.281893 OrthancInitialization.cpp:368] Storage directory: “/root/OrthancStorage”
W0807 02:12:23.374064 HttpClient.cpp:1055] HTTPS will use the CA certificates from this file: /root
W0807 02:12:23.404794 LuaContext.cpp:93] Lua says: Lua toolbox installed
W0807 02:12:23.405199 LuaContext.cpp:93] Lua says: Lua toolbox installed
W0807 02:12:23.405322 ServerContext.cpp:390] Disk compression is disabled
W0807 02:12:23.405366 ServerIndex.cpp:1636] No limit on the number of stored patients
W0807 02:12:23.405395 ServerIndex.cpp:1653] No limit on the size of the storage area
W0807 02:12:23.412825 JobsEngine.cpp:272] The jobs engine has started with 2 threads
W0807 02:12:23.414418 main.cpp:1109] DICOM server listening with AET ORTHANC on port: 4242
W0807 02:12:23.414503 HttpServer.cpp:1298] HTTP compression is enabled
W0807 02:12:23.414540 main.cpp:1011] Remote LUA script execution is disabled
W0807 02:12:23.427216 HttpServer.cpp:1205] HTTP server listening on port: 8042 (HTTPS encryption is disabled, remote access is not allowed)
W0807 02:12:23.427314 main.cpp:814] Orthanc has started

Mark Cheng 在 2020年8月6日 星期四下午5:53:33 [UTC+8] 的信中寫道:

Are you using Docker, or did you compile Orthanc from source ?

If you compile from source, you can specify the Config file when starting orthanc from the command line, on LINUX:

/home/sscotti/Desktop/OrthancBuild/Orthanc /home/sscotti/Desktop/OrthancConfigs/Configuration.json --verbose

where the first is the path to the Orthanc executable and the second is the path to the config file and --verbose is for verbose logging.

You can also use an init.d script on LINUX an modify it appropriately for the Config file path, etc.

e.g.

`
#! /bin/sh

BEGIN INIT INFO

Provides: orthanc

Required-Start: $local_fs $remote_fs $network $syslog

Required-Stop: $local_fs $remote_fs $network $syslog

Should-Start: postgresql mysql

Should-Stop: postgresql mysql

Default-Start: 2 3 4 5

Default-Stop: 0 1 6

Short-Description: Orthanc init script

Description: Orthanc - Lightweight, RESTful Vendor Neutral Archive

END INIT INFO

Author: Sebastien Jodogne s.jodogne@gmail.com

Do NOT “set -e”

PATH should only include /usr/* if it runs after the mountnfs.sh script

SDS Added /root/OrthancBuild

#PATH=/sbin:/usr/sbin:/bin:/usr/bin
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/home/sscotti/Desktop/OrthancBuild

You can modify the variables below

DESC=“Orthanc”
NAME=Orthanc

Constants, SDS Edited

#DAEMON=/usr/sbin/Orthanc
DAEMON=/home/sscotti/Desktop/OrthancBuild/Orthanc
LOGDIR=/home/sscotti/Desktop//OrthancLogs
DAEMON_ARGS=“–logdir=${LOGDIR} /home/sscotti/Desktop/OrthancConfigs”
PIDFILE=/run/orthanc.pid
SCRIPTNAME=/etc/init.d/orthanc
#ORTHANC_USER=orthanc:orthanc
ORTHANC_USER=root:root

Load the VERBOSE setting and other rcS variables

. /lib/init/vars.sh

Define LSB log_* functions.

Depend on lsb-base (>= 3.0-6) to ensure that this file is present.

. /lib/lsb/init-functions

I use Ubuntu 18.04 to install Orthanc.

I follow the instruction here
Link

Following the command with configuration.json is working.

Thanks.

stephen....@gmail.com 在 2020年8月7日 星期五上午10:36:42 [UTC+8] 的信中寫道: