Not loading plug-ins

I don’t know why I don’t load the plug-in dicom-web. My source code compilation will not work if the debug plug-in is release. Here is mine

[root@localhost build]# Orthanc ./Configuration.json
W0907 10:05:32.884811 main.cpp:1942] Orthanc version: 1.9.6
W0907 10:05:32.885087 main.cpp:1681] Performance warning: Non-release build, runtime debug assertions are turned on
W0907 10:05:32.885477 OrthancConfiguration.cpp:66] Reading the configuration from: “./Configuration.json”
W0907 10:05:33.017931 OrthancInitialization.cpp:358] SQLite index directory: “./OrthancStorage”
W0907 10:05:33.018327 OrthancInitialization.cpp:457] Storage directory: “./OrthancStorage”
W0907 10:05:33.019643 HttpClient.cpp:1176] HTTPS will use the CA certificates from this file: .
W0907 10:05:33.020876 LuaContext.cpp:93] Lua says: Lua toolbox installed
W0907 10:05:33.021348 LuaContext.cpp:93] Lua says: Lua toolbox installed
W0907 10:05:33.022202 ServerContext.cpp:478] Disk compression is disabled
W0907 10:05:33.022253 ServerIndex.cpp:391] No limit on the number of stored patients
W0907 10:05:33.022280 ServerIndex.cpp:411] No limit on the size of the storage area
W0907 10:05:33.023738 ServerContext.cpp:220] Reloading the jobs from the last execution of Orthanc
W0907 10:05:33.023941 JobsEngine.cpp:271] The jobs engine has started with 2 threads
W0907 10:05:33.025037 main.cpp:1249] DICOM server listening with AET ORTHANC on port: 4242
W0907 10:05:33.025191 HttpServer.cpp:1992] HTTP compression is enabled
W0907 10:05:33.025251 main.cpp:1000] ====> Remote access is enabled while user authentication is explicitly disabled, your setup is POSSIBLY INSECURE <====
W0907 10:05:33.025314 main.cpp:1124] Remote LUA script execution is disabled
W0907 10:05:33.028597 HttpServer.cpp:1769] HTTP server listening on port: 8042 (HTTPS encryption is disabled, remote access is allowed)
W0907 10:05:33.028676 main.cpp:876] Orthanc has started
^CW0907 10:06:32.927169 main.cpp:938] Orthanc is stopping
W0907 10:06:33.400713 main.cpp:1156] HTTP server has stopped
W0907 10:06:34.096313 main.cpp:1265] DICOM server has stopped
W0907 10:06:34.263594 JobsEngine.cpp:312] The jobs engine has stopped
W0907 10:06:34.541107 main.cpp:2030] Orthanc has stopped
[root@localhost build]# Orthanc ./Configuration.json --verbose
W0907 10:06:48.126492 main.cpp:1942] Orthanc version: 1.9.6
W0907 10:06:48.126788 main.cpp:1681] Performance warning: Non-release build, runtime debug assertions are turned on
I0907 10:06:48.126816 main.cpp:1974] Architecture: 64-bit, little endian
W0907 10:06:48.127259 OrthancConfiguration.cpp:66] Reading the configuration from: “./Configuration.json”
I0907 10:06:48.133919 Toolbox.cpp:1467] Using locale: “en_US.UTF-8” for case-insensitive comparison of strings
I0907 10:06:48.134751 Toolbox.cpp:1759] OpenSSL version: OpenSSL 1.1.1k 25 Mar 2021
I0907 10:06:48.138610 FromDcmtkBridge.cpp:291] (dicom) Using DCTMK version: 366
I0907 10:06:48.138758 FromDcmtkBridge.cpp:299] (dicom) Loading the embedded dictionaries
I0907 10:06:48.175520 FromDcmtkBridge.cpp:311] (dicom) Loading the embedded dictionary of private tags
I0907 10:06:48.195880 FromDcmtkBridge.cpp:2293] (dicom) Registering JPEG Lossless codecs in DCMTK
I0907 10:06:48.195953 FromDcmtkBridge.cpp:2301] (dicom) Registering JPEG codecs in DCMTK
I0907 10:06:48.195994 FromDcmtkBridge.cpp:2308] (dicom) Registering RLE codecs in DCMTK
I0907 10:06:48.196051 Enumerations.cpp:2315] Default encoding for DICOM was changed to: Chinese
I0907 10:06:48.275628 OrthancInitialization.cpp:322] Calling mallopt(M_ARENA_MAX, 5)
W0907 10:06:48.276793 OrthancInitialization.cpp:358] SQLite index directory: “./OrthancStorage”
W0907 10:06:48.277193 OrthancInitialization.cpp:457] Storage directory: “./OrthancStorage”
I0907 10:06:48.278516 SQLiteDatabaseWrapper.cpp:1345] Version of the Orthanc database: 6
W0907 10:06:48.278600 HttpClient.cpp:1176] HTTPS will use the CA certificates from this file: .
I0907 10:06:48.278649 HttpClient.cpp:498] (http) Setting the default timeout for HTTP client connections: 60 seconds
I0907 10:06:48.278709 HttpClient.cpp:482] (http) Setting the default proxy for HTTP client connections:
I0907 10:06:48.278752 DicomAssociationParameters.cpp:375] (dicom) Default timeout for DICOM connections if Orthanc acts as SCU (client): 10 seconds (0 = no timeout)
I0907 10:06:48.279229 ServerIndex.cpp:300] Starting the database flushing thread (sleep = 10 seconds)
I0907 10:06:48.279264 ServerIndex.cpp:438] Starting the monitor for stable resources (stable age = 60)
I0907 10:06:48.279540 LuaJobManager.cpp:79] (lua) Lua: DICOM associations will be closed after 5 seconds of inactivity
I0907 10:06:48.279616 LuaScripting.cpp:782] Initializing Lua for the event handler
W0907 10:06:48.279943 LuaContext.cpp:93] Lua says: Lua toolbox installed
I0907 10:06:48.280456 LuaJobManager.cpp:79] (lua) Lua: DICOM associations will be closed after 5 seconds of inactivity
I0907 10:06:48.280507 LuaScripting.cpp:782] Initializing Lua for the event handler
W0907 10:06:48.280788 LuaContext.cpp:93] Lua says: Lua toolbox installed
I0907 10:06:48.280923 ServerContext.cpp:373] Automated transcoding of incoming DICOM instances is disabled
I0907 10:06:48.280962 ServerContext.cpp:380] (dicom) Deidentification of log contents (notably for DIMSE queries) is enabled
I0907 10:06:48.280999 ServerContext.cpp:384] (dicom) Version of DICOM standard used for deidentification is 2021b
I0907 10:06:48.281439 ServerContext.cpp:403] (dicom) Preferred transfer syntax for Orthanc C-STORE SCU: 1.2.840.10008.1.2.1
I0907 10:06:48.281804 DcmtkTranscoder.cpp:75] Quality for lossy transcoding using DCMTK is set to: 90
W0907 10:06:48.281858 ServerContext.cpp:478] Disk compression is disabled
I0907 10:06:48.281890 ServerContext.cpp:1155] Storing MD5 for attachments: yes
W0907 10:06:48.281927 ServerIndex.cpp:391] No limit on the number of stored patients
W0907 10:06:48.281953 ServerIndex.cpp:411] No limit on the size of the storage area
W0907 10:06:48.283479 ServerContext.cpp:220] Reloading the jobs from the last execution of Orthanc
W0907 10:06:48.283688 JobsEngine.cpp:271] The jobs engine has started with 2 threads
I0907 10:06:48.283739 JobsEngine.cpp:125] (jobs) Worker thread 0 has started
I0907 10:06:48.283817 JobsEngine.cpp:125] (jobs) Worker thread 1 has started
I0907 10:06:48.283845 DicomServer.cpp:132] (dicom) Setting timeout for DICOM connections if Orthanc acts as SCP (server): 30 seconds (0 = no timeout)
I0907 10:06:48.284182 DicomServer.cpp:420] (dicom) Orthanc SCP will not use DICOM TLS
W0907 10:06:48.284918 main.cpp:1249] DICOM server listening with AET ORTHANC on port: 4242
I0907 10:06:48.284981 HttpServer.cpp:1579] (http) This Orthanc server uses CivetWeb as its embedded HTTP server
I0907 10:06:48.284968 DicomServer.cpp:63] (dicom) DICOM server started
I0907 10:06:48.285032 HttpServer.cpp:2068] (http) The embedded HTTP server will use 50 threads
I0907 10:06:48.285150 HttpServer.cpp:1928] (http) HTTP keep alive is enabled
W0907 10:06:48.285201 HttpServer.cpp:1992] HTTP compression is enabled
I0907 10:06:48.285245 HttpServer.cpp:2081] (http) TCP_NODELAY for the HTTP sockets is set to true
I0907 10:06:48.285280 HttpServer.cpp:2101] (http) Request timeout in the HTTP server is set to 30 seconds
W0907 10:06:48.285329 main.cpp:1000] ====> Remote access is enabled while user authentication is explicitly disabled, your setup is POSSIBLY INSECURE <====
I0907 10:06:48.285384 main.cpp:1113] Version of Lua: Lua 5.3
W0907 10:06:48.285420 main.cpp:1124] Remote LUA script execution is disabled
I0907 10:06:48.285486 HttpServer.cpp:2148] (http) Branching WebDAV bucket at: /webdav
I0907 10:06:48.285523 HttpServer.cpp:1624] (http) Starting embedded Web server using Civetweb
I0907 10:06:48.287542 OrthancWebDav.cpp:1705] Starting the WebDAV upload thread
W0907 10:06:48.287607 HttpServer.cpp:1769] HTTP server listening on port: 8042 (HTTPS encryption is disabled, remote access is allowed)
W0907 10:06:48.287695 main.cpp:876] Orthanc has started
I0907 10:06:48.287727 LuaScripting.cpp:841] Starting the Lua engine

configuration file

Configuration (3).json (38.4 KB)

The logs of Orthanc must show lines such as the following if loading plugins:

W0907 07:52:17.406419 main.cpp:878] Loading plugin(s) from: .
I0907 07:52:17.406437 PluginsManager.cpp:288] (plugins) Scanning folder . for plugins

In your case, such lines do not appear, which means that you are not loading the good configuration file.

Sorry, I really can’t figure out what went wrong. Could you please help me with the configuration file?

在2021年9月7日星期二 UTC+8 下午1:55:37s.jo...@gmail.com 写道:

Hello,

In configuration file you can add a list of paths where the plugins can be found:
“Plugins”: [
“/usr/share/orthanc/plugins”,
“/usr/share/orthanc/plugins-disabled/libOrthancAwsS3Storage.so”,
“/usr/share/orthanc/plugins-disabled/libOsimisWebViewer.so”
],

For example, in my case I have:

ls /usr/share/orthanc/plugins = > libOrthancAuthorization.so libOrthancPostgreSQLIndex.so

libOrthancDicomWeb.so libOrthancPostgreSQLStorage.so
libOrthancGdcm.so

ls /usr/share/orthanc/plugins-disabled => libConnectivityChecks.so libOrthancOsimisCloud.so libOsimisWebViewer.so

libModalityWorklists.so libOrthancPython.so libOsimisWebViewerAlpha.so
libOrthancAwsS3Storage.so libOrthancTransfers.so libServeFolders.so
libOrthancMySQLIndex.so libOrthancWSI.so
libOrthancMySQLStorage.so libOrthancWebViewer.so

Just explore the paths of orthanc installation and check if the plugins are there.

Hello, Mr. Alexand, I just want to confirm one thing again,
orthanc in root@localhost build]# ls /usr/local/Orthanc-1.9.7/build/Orthanc
/usr/local/Orthanc-1.9.7/build/Orthanc
plugin in [root@localhost build]# ls /usr/local/Orthanc-1.9.7/plugin/OrthancDicomWeb-1.7/build/libOrthancDicomWeb.so.1.7
/usr/local/Orthanc-1.9.7/plugin/OrthancDicomWeb-1.7/build/libOrthancDicomWeb.so.1.7
First install directory whether there is a problem like this.

orthanc config file
“Plugins” : [
“/usr/local/Orthanc-1.9.7/plugin/OrthancDicomWeb-1.7/build/”,
“/usr/local/Orthanc-1.9.7/plugin/OrthancDicomWeb-1.7/build/libOrthancDicomWeb.so.1.7”,
],

在2021年9月7日星期二 UTC+8 下午2:48:22alexand...@atta.systems 写道:

“Plugins” : [
“/usr/local/Orthanc-1.9.7/plugin/OrthancDicomWeb-1.7/build/”
],

root@localhost build]# Orthanc configuration.json
W0908 09:32:47.560189 main.cpp:1942] Orthanc version: 1.9.6
W0908 09:32:47.560591 main.cpp:1681] Performance warning: Non-release build, runtime debug assertions are turned on
W0908 09:32:47.561060 OrthancConfiguration.cpp:66] Reading the configuration from: “configuration.json”
W0908 09:32:47.705466 OrthancInitialization.cpp:358] SQLite index directory: “OrthancStorage”
W0908 09:32:47.705868 OrthancInitialization.cpp:457] Storage directory: “OrthancStorage”
W0908 09:32:47.707458 HttpClient.cpp:1171] No certificates are provided to validate peers, set “HttpsCACertificates” if you need to do HTTPS requests
W0908 09:32:47.708551 LuaContext.cpp:93] Lua says: Lua toolbox installed
W0908 09:32:47.709026 LuaContext.cpp:93] Lua says: Lua toolbox installed
W0908 09:32:47.710538 ServerContext.cpp:478] Disk compression is disabled
W0908 09:32:47.710593 ServerIndex.cpp:391] No limit on the number of stored patients
W0908 09:32:47.710637 ServerIndex.cpp:411] No limit on the size of the storage area
W0908 09:32:47.712163 ServerContext.cpp:220] Reloading the jobs from the last execution of Orthanc
W0908 09:32:47.712379 JobsEngine.cpp:271] The jobs engine has started with 2 threads
W0908 09:32:47.713564 main.cpp:1249] DICOM server listening with AET ORTHANC on port: 4242
W0908 09:32:47.713699 HttpServer.cpp:1992] HTTP compression is enabled
W0908 09:32:47.713760 main.cpp:1036] ====> HTTP authentication is enabled, but no user is declared. Creating a default user: Review your configuration option “RegisteredUsers”. Your setup is INSECURE <====
W0908 09:32:47.713810 main.cpp:1124] Remote LUA script execution is disabled
W0908 09:32:47.716136 HttpServer.cpp:1769] HTTP server listening on port: 8042 (HTTPS encryption is disabled, remote access is allowed)
W0908 09:32:47.716212 main.cpp:876] Orthanc has started

Above is the plug-in configuration file, below is the startup information, I wonder why not go to the directory I specified to find the plug-in

在2021年9月7日星期二 UTC+8 下午3:10:38<徐加凯> 写道:

[root@localhost ~]# docker run -p 4242:4242 -p 8042:8042 --rm -v /tmp/orthanc.json:/etc/orthanc/orthanc.json:ro jodogne/orthanc-plugins
W0908 01:36:51.242967 main.cpp:1956] Orthanc version: mainline (20210831T011917)
W0908 01:36:51.243982 OrthancConfiguration.cpp:117] Scanning folder “/etc/orthanc/” for configuration files
W0908 01:36:51.244448 OrthancConfiguration.cpp:66] Reading the configuration from: “/etc/orthanc/orthanc.json”
E0908 01:36:51.245848 OrthancException.cpp:57] Cannot parse a JSON document: The configuration file does not follow the JSON syntax: /etc/orthanc/orthanc.json
E0908 01:36:51.246131 main.cpp:2013] Uncaught exception, stopping now: [Cannot parse a JSON document] (code 28)
W0908 01:36:51.246173 main.cpp:2044] Orthanc has stopped

There is still a problem that needs your help. Why is there a syntax error after Docker is started, but it does not indicate which line of syntax error? This configuration file can be successfully started when I use compiled startup. ??

在2021年9月7日星期二 UTC+8 下午3:10:38<徐加凯> 写道:

You might want to make sure that your config file is valid JSON. Orthanc allows for comments in the JSON config, so using something like JSON Lint won’t tell you that unless you remove all of the comments.

I actually sort of did that with the one you provided earlier, but not sure about what you need there for Plug-ins and there are 2 instances of DICOM web, maybe by design ?

Anyways, I attached the file. You might look over that and try restarting with that as the config, and if it works, comb through the one that you have and fix any formatting errors.

/sds

Configuration (3).json (3.93 KB)

Here is a fully working setup. In a first terminal:

$ cat < /tmp/orthanc.json
{
“Plugins” : [ “/usr/local/share/orthanc/plugins” ],
“RemoteAccessAllowed” : true,
“RegisteredUsers” : {
“orthanc” : “orthanc” // Change this
}
}
EOF
$ docker run --rm -t -i -p 8042:8042 -p 4242:4242 -v /tmp/orthanc.json:/etc/orthanc/orthanc.json jodogne/orthanc-plugins:1.9.7

In a second terminal:

$ curl -u orthanc:orthanc http://localhost:8042/dicom-web/studies
[]

This is an empty JSON list. If you upload DICOM files, the call above will report about the associated studies.