I’m trying to run the dummy python script reported here but the orthanc server doesn’t start correctly when executed as a service on windows and terminates unexpectedly (I get Event ID 7034 in the windows event viewer), while everything works well when launched manually from the command line. Here the logs file obtained when started as a service:
W1220 16:13:01.014953 main.cpp:1956] Orthanc version: 1.9.7
W1220 16:13:01.014953 OrthancConfiguration.cpp:117] Scanning folder “Configuration” for configuration files
W1220 16:13:01.014953 OrthancConfiguration.cpp:66] Reading the configuration from: “Configuration\dicomweb.json”
W1220 16:13:01.014953 OrthancConfiguration.cpp:66] Reading the configuration from: “Configuration\indexer.json”
W1220 16:13:01.014953 OrthancConfiguration.cpp:66] Reading the configuration from: “Configuration\mysql.json”
W1220 16:13:01.014953 OrthancConfiguration.cpp:66] Reading the configuration from: “Configuration\odbc.json”
W1220 16:13:01.014953 OrthancConfiguration.cpp:66] Reading the configuration from: “Configuration\orthanc.json”
W1220 16:13:01.014953 OrthancConfiguration.cpp:66] Reading the configuration from: “Configuration\postgresql.json”
W1220 16:13:01.014953 OrthancConfiguration.cpp:66] Reading the configuration from: “Configuration\serve-folders.json”
W1220 16:13:01.014953 OrthancConfiguration.cpp:66] Reading the configuration from: “Configuration\stone-webviewer.json”
W1220 16:13:01.014953 OrthancConfiguration.cpp:66] Reading the configuration from: “Configuration\tcia.json”
W1220 16:13:01.014953 OrthancConfiguration.cpp:66] Reading the configuration from: “Configuration\transfers.json”
W1220 16:13:01.014953 OrthancConfiguration.cpp:66] Reading the configuration from: “Configuration\webviewer.json”
W1220 16:13:01.014953 OrthancConfiguration.cpp:66] Reading the configuration from: “Configuration\worklists.json”
W1220 16:13:01.215225 main.cpp:878] Loading plugin(s) from: C:\Program Files\Orthanc Server\Plugins
W1220 16:13:01.215225 PluginsManager.cpp:269] Registering plugin ‘connectivity-checks’ (version 1.9.7)
W1220 16:13:01.215225 PluginsManager.cpp:269] Registering plugin ‘stone-webviewer’ (version 2.2)
W1220 16:13:01.215225 PluginsManager.cpp:269] Registering plugin ‘worklists’ (version 1.9.7)
W1220 16:13:01.215225 PluginsManager.cpp:168] Sample worklist plugin is initializing
W1220 16:13:01.215225 PluginsManager.cpp:168] Worklist server is disabled by the configuration file
W1220 16:13:01.215225 PluginsManager.cpp:269] Registering plugin ‘authorization’ (version 0.2.4)
W1220 16:13:01.215225 PluginsManager.cpp:168] Initializing the authorization plugin
W1220 16:13:01.215225 PluginsManager.cpp:168] No section “Authorization” in the configuration file, the authorization plugin is disabled
W1220 16:13:01.215225 PluginsManager.cpp:269] Registering plugin ‘dicom-web’ (version 1.7)
W1220 16:13:01.215225 PluginsManager.cpp:168] URI to the DICOMweb REST API: /dicom-web/
W1220 16:13:01.215225 PluginsManager.cpp:168] URI to the WADO-URI API: /wado
W1220 16:13:01.230850 PluginsManager.cpp:269] Registering plugin ‘gdcm’ (version 1.4)
W1220 16:13:01.230850 PluginsManager.cpp:168] Version of GDCM: 3.0.8
W1220 16:13:01.230850 PluginsManager.cpp:168] GDCM throttling is disabled
W1220 16:13:01.230850 PluginsManager.cpp:269] Registering plugin ‘indexer’ (version 1.0)
W1220 16:13:01.230850 PluginsManager.cpp:168] OrthancIndexer is disabled
W1220 16:13:01.230850 PluginsManager.cpp:269] Registering plugin ‘mysql-index’ (version 4.3)
W1220 16:13:01.230850 PluginsManager.cpp:168] The MySQL index is currently disabled, set “EnableIndex” to “true” in the “MySQL” section of the configuration file of Orthanc
W1220 16:13:01.230850 PluginsManager.cpp:269] Registering plugin ‘mysql-storage’ (version 4.3)
W1220 16:13:01.230850 PluginsManager.cpp:168] The MySQL storage area is currently disabled, set “EnableStorage” to “true” in the “MySQL” section of the configuration file of Orthanc
W1220 16:13:01.230850 PluginsManager.cpp:269] Registering plugin ‘odbc-index’ (version 1.0)
W1220 16:13:01.230850 PluginsManager.cpp:168] The ODBC index is currently disabled, set “EnableIndex” to “true” in the “Odbc” section of the configuration file of Orthanc
W1220 16:13:01.230850 PluginsManager.cpp:269] Registering plugin ‘odbc-storage’ (version 1.0)
W1220 16:13:01.230850 PluginsManager.cpp:168] The ODBC storage area is currently disabled, set “EnableStorage” to “true” in the “Odbc” section of the configuration file of Orthanc
W1220 16:13:01.246473 PluginsManager.cpp:269] Registering plugin ‘postgresql-index’ (version 4.0)
W1220 16:13:01.246473 PluginsManager.cpp:168] The PostgreSQL index is currently disabled, set “EnableIndex” to “true” in the “PostgreSQL” section of the configuration file of Orthanc
W1220 16:13:01.246473 PluginsManager.cpp:269] Registering plugin ‘postgresql-storage’ (version 4.0)
W1220 16:13:01.246473 PluginsManager.cpp:168] The PostgreSQL storage area is currently disabled, set “EnableStorage” to “true” in the “PostgreSQL” section of the configuration file of Orthanc
W1220 16:13:01.246473 PluginsManager.cpp:269] Registering plugin ‘python’ (version 3.4)
W1220 16:13:01.246473 PluginsManager.cpp:168] Python plugin is initializing
W1220 16:13:01.246473 PluginsManager.cpp:168] Using Python script “rest.py” from directory: C:\Program Files\Orthanc Server
W1220 16:13:01.246473 PluginsManager.cpp:168] Program name: C:\Program Files\Orthanc Server\Orthanc.exe
It seems like the service gets stuck after loading the script (I don’t know how to get a more verbose log when orthanc is launched as a service).
I want to specify that the service runs correctly also when no python script is provided in the PythonScripts option in the configuration file, so the python plugin is loaded correctly.
Thank you.