getting the Webviewer plugin to work....

Hi,

I’m trying to get the WebViewer plugin to work. I have copied the .json from
the documentation page, adjusted it slightly and placed in /etc/orthanc. It is
read, but the webviewer does not come up anyway.

Do I miss something in the json file?

{
/**

  • Configuration of the Webviewer plugin
    **/
    “Plugins” : [
    “/usr/share/orthanc/plugins/libOrthancWebViewer.so”
    ],
    “WebViewer” : {
    “CachePath” : “WebViewerCache”,
    “CacheSize” : 10,
    “Threads” : 4,
    “EnableGdcm” : true
    }
    }

Hi Axel,
Speaking from experience. Make sure your Configuration file is valid JSON. If your using a simple text editor it is really easy to enter invalid JSON (in my case I had a space between the ** and / ending a comment. That space caused the rest of my config to be treated as a comment). Try google for a JSON validating and make sure your config is valid.
Best of luck.
James

The plugin file has to be in a folder defined in the configuration as well. Usually that is /usr/share/orthanc/plugins
Cheers,

Hi Gents
thanks for your hints!

Hello Axel,

When Orthanc is unable to parson the JSON file (it often happens with missing commas…), the message is rather clear.

Have you tried running orthanc with the --verbose flag ?

These lines should show up:

W1115 09:39:43.613740 main.cpp:702] Loading plugin(s) from: C:\Program Files\Orthanc Server\Plugins\OrthancWebViewer.dll
W1115 09:39:43.779777 PluginsManager.cpp:269] Registering plugin ‘web-viewer’ (version 2.5)
W1115 09:39:43.788737 PluginsManager.cpp:168] Initializing the Web viewer
W1115 09:39:43.795923 PluginsManager.cpp:168] Web viewer using 6 threads for the decoding of the DICOM images
W1115 09:39:43.802982 PluginsManager.cpp:168] Storing the cache of the Web viewer in folder: C:\OrthancTmp_dcm\WebViewerCache
I1115 09:39:43.826150 PluginsManager.cpp:172] No change in the versions, no need to clear the cache of the Web viewer
W1115 09:39:43.836111 PluginsManager.cpp:168] Web viewer using a cache of 100 MB

Maybe there are some error logs you can share?

Hello,

Axel has just sent me by private e-mail the content of the log. It reads:

Error while initializing plugin /usr/share/orthanc/plugins/libOrthancWebViewer.so (code -1)

This means that there is a problem with the packaging of the shared library.

Sébastien-

Small typo in Sébastien’s reply : read ldd instead of ld

Typical ldd output :

bgo@DELLBGO9570:~/orcon/build> ldd libArchiveWriterPlugin.so
linux-vdso.so.1 (0x00007ffc30571000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f24dd783000)
librt.so.1 => /lib64/librt.so.1 (0x00007f24dd57b000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f24dd1f1000)
libm.so.6 => /lib64/libm.so.6 (0x00007f24dceb9000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f24dcca1000)
libc.so.6 => /lib64/libc.so.6 (0x00007f24dc8e7000)
/lib64/ld-linux-x86-64.so.2 (0x00007f24ddd80000)

Hey guys,

Thanks for the hints - I feel it just was an error in the .json file, I did a small change and now it works :slight_smile:
BTW, this is the only plugins-line in the .json files!

{
/**

  • Configuration of the Webviewer plugin
    **/
    “Plugins” : [
    “/usr/share/orthanc/plugins/”
    ],
    “WebViewer” : {
    “CachePath” : “WebViewerCache”,
    “CacheSize” : 10,
    “Threads” : 4,
    “EnableGdcm” : true
    }
    }