Orthanc scripts not found in docker installation

59 views
Skip to first unread message

Alan Chamberlain

unread,
Dec 8, 2021, 8:02:39 AM12/8/21
to OpenREM
Hi

I've installed OpenREM 1.0 via docker on a Fedora 34 system. The installation appeared to run smoothly without errors and the database and translation commands executed correctly. However, when I point my browser to http://localhost I get: "The connection was reset". Curl gives a similar error.

Looking at the output of  docker-compose ps I have:
>docker-compose ps
               Name                              Command                 State                            Ports                       
--------------------------------------------------------------------------------------------------------------------------------------
openrem                                /home/app/openrem/entrypoi ...   Up           8000/tcp                                          
openrem-broker                         docker-entrypoint.sh rabbi ...   Up           15671/tcp, 15672/tcp, 15691/tcp, 15692/tcp,       
                                                                                    25672/tcp, 4369/tcp, 5671/tcp, 5672/tcp           
openrem-db                             docker-entrypoint.sh postgres    Up           5432/tcp                                          
openrem-docker-a1126295f53d_worker_1   /home/app/openrem/entrypoi ...   Up                                                             
openrem-flower                         /home/app/openrem/entrypoi ...   Up           5555/tcp                                          
openrem-nginx                          nginx -g daemon off;             Up           0.0.0.0:80->80/tcp,:::80->80/tcp                  
openrem-orthanc-1                      /docker-entrypoint.sh /tmp ...   Restarting    

Running docker-compose in daemonless mode I see orthanc reports the following error:
openrem-orthanc-1 | Startup command: Orthanc /tmp/orthanc.json
openrem-orthanc-1 | W1208 12:51:29.556511 main.cpp:1776] Orthanc version: 1.8.2
openrem-orthanc-1 | W1208 12:51:29.556715 OrthancConfiguration.cpp:62] Reading the configuration from: "/tmp/orthanc.json"
openrem-orthanc-1 | W1208 12:51:29.571175 FromDcmtkBridge.cpp:298] Loading external DICOM dictionary: "/usr/share/libdcmtk14/dicom.dic"
openrem-orthanc-1 | W1208 12:51:29.579152 FromDcmtkBridge.cpp:298] Loading external DICOM dictionary: "/usr/share/libdcmtk14/private.dic"
openrem-orthanc-1 | W1208 12:51:29.590960 main.cpp:852] Loading plugin(s) from: /usr/share/orthanc/plugins/
openrem-orthanc-1 | W1208 12:51:29.598452 PluginsManager.cpp:269] Registering plugin 'gdcm' (version 1.2)
openrem-orthanc-1 | W1208 12:51:29.598604 PluginsManager.cpp:168] Orthanc will use GDCM to decode transfer syntax: 1.2.840.10008.1.2.4.90
openrem-orthanc-1 | W1208 12:51:29.598616 PluginsManager.cpp:168] Orthanc will use GDCM to decode transfer syntax: 1.2.840.10008.1.2.4.91
openrem-orthanc-1 | W1208 12:51:29.598622 PluginsManager.cpp:168] Orthanc will use GDCM to decode transfer syntax: 1.2.840.10008.1.2.4.92
openrem-orthanc-1 | W1208 12:51:29.598636 PluginsManager.cpp:168] Orthanc will use GDCM to decode transfer syntax: 1.2.840.10008.1.2.4.93
openrem-orthanc-1 | W1208 12:51:29.598645 PluginsManager.cpp:168] Throttling GDCM to 4 concurrent thread(s)
openrem-orthanc-1 | W1208 12:51:29.598658 PluginsManager.cpp:168] Version of GDCM: 3.0.8
openrem-orthanc-1 | W1208 12:51:29.598692 OrthancInitialization.cpp:329] SQLite index directory: "/var/lib/orthanc/db"
openrem-orthanc-1 | W1208 12:51:29.598811 OrthancInitialization.cpp:406] Storage directory: "/var/lib/orthanc/db"
openrem-orthanc-1 | W1208 12:51:29.599297 HttpClient.cpp:1125] HTTPS will use the CA certificates from this file: /etc/ssl/certs/ca-certificates.crt
openrem-orthanc-1 | W1208 12:51:29.599750 LuaContext.cpp:93] Lua says: Lua toolbox installed
openrem-orthanc-1 | E1208 12:51:29.599961 OrthancException.cpp:57] The specified path does not point to a regular file: The path does not point to a regular file: /etc/share/orthanc/scripts/openrem_orthanc_config_docker.lua
openrem-orthanc-1 | E1208 12:51:29.600051 ServerIndex.cpp:706] INTERNAL ERROR: ServerIndex::Stop() should be invoked manually to avoid mess in the destruction order!
openrem-orthanc-1 | W1208 12:51:30.100009 PluginsManager.cpp:219] Unregistering plugin 'gdcm' (version 1.2)
openrem-orthanc-1 | E1208 12:51:30.103839 main.cpp:1833] Uncaught exception, stopping now: [The specified path does not point to a regular file] (code 2006)
openrem-orthanc-1 | W1208 12:51:30.103886 main.cpp:1864] Orthanc has stopped

I've searched the docker containers and the  openrem_orthanc_config_docker.lua was definitely not copied over.

I've also tried the docker Wordpress example and that is running correctly and can be accessed from a browser.
I've also tried this OpenREM installation on a Fedora CoreOS 35 virtual machine with the same results.

I'm not sure if this is a bug or something unique to Fedora but I can list it on bitbucket if you wish.

Regards
Alan               

Alan Chamberlain

unread,
Dec 8, 2021, 8:30:02 AM12/8/21
to OpenREM
Update

The openrem_orthanc_config_docker.lua file is definitely in the ./orthanc directory of openrem-docker-a1126295f53d.zip ( https://bitbucket.org/openrem/docker/get/develop.zip) . According to this section in the docker-compose.yml:
    volumes:
      - imports_volume:/imports
      - type: bind
        source: ./orthanc
        target: /etc/share/orthanc/scripts/

It should be copied over, but it isn't.

Regards
Alan

Ed McDonagh

unread,
Dec 8, 2021, 5:53:29 PM12/8/21
to OpenREM
Thanks for your report Alan.

It isn't a fedora specific problem - I have just installed a fedora 34 LXD container and setup as per https://docs.openrem.org/en/latest/installation.html#windows-or-linux-docker-install (with the addition of installing docker-compose, which I need to add in to the instructions) and it all worked fine. First time that I've used fedora in about 15 years I think!

Do you remember if the images were created happily after the initial docker-compose up -d?

MIne ended in: 
Status: Downloaded newer image for openrem/orthanc:latest
Creating openrem-orthanc-1 ... done
Creating openrem-db        ... done
Creating openrem-broker    ... done
Creating openrem-flower                       ... done
Creating openrem-docker-a1126295f53d_worker_1 ... done
Creating openrem                              ... done
Creating openrem-nginx                        ... done


Have you been able to look at the file listing within the orthanc container? Like this maybe:
docker container exec -ti openrem-orthanc-1 ls -l /etc/share/orthanc/scripts/

For my example, that returns:
-rw-r--r-- 1 root root 23673 Nov 26 16:55 openrem_orthanc_config_docker.lua

You've already confirmed that the file is in the ./orthanc directory.

Ed

--
You received this message because you are subscribed to the Google Groups "OpenREM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openrem+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openrem/6325c53c-bee2-4ff8-81ee-57a7ed827057n%40googlegroups.com.

Alan Chamberlain

unread,
Dec 9, 2021, 1:00:47 AM12/9/21
to OpenREM
Hi Ed

The nginx configuration files are also not being copied over. So the culprit is SELinux as I should have suspected. If I do:
$ setenforce 0

and then go through the installation instructions, the files are copied over correctly and http://localhost shows the OpenREM home page.

I'll see if I can find out why SELinux is blocking the flles.

Regards
Alan

Ed McDonagh

unread,
Dec 9, 2021, 1:09:37 AM12/9/21
to OpenREM
Of course, our old friend!

If you could see what the correct steps are to allow it to work without disabling SELinux entirely, that would be great. Hopefully I can then add that to the instructions.

Kind regards

Ed


Ed McDonagh

unread,
Dec 9, 2021, 1:13:36 AM12/9/21
to OpenREM

Alan Chamberlain

unread,
Dec 9, 2021, 3:19:53 AM12/9/21
to OpenREM
Yes, I added :z to the bind mounts in the docker-compose.yml file and it worked. I had to use the shorthand version to specify the mounts otherwise it didn't recognise the flags. My updated docker-compose.yml is attached. I also tested this on the Fedora CoreOS 35 virtual machine and it appears to be working although I am getting a "Bad Request (400)" when I access it from a browser on the host, but I think this might be an iptables issue.

Thanks for your help
Regards
Alan
docker-compose.yml

Alan Chamberlain

unread,
Dec 9, 2021, 3:56:28 AM12/9/21
to OpenREM
Sorry, I forgot that for a virtual machine requests are forwarded from the virtual machine network interface giving them the IP address of the virtual machine and not the host and this is the address that needs to be in DJANGO_ALLOWED_HOSTS. All working now. Looks very good.

Regards
Alan

Ed McDonagh

unread,
Dec 9, 2021, 4:20:26 AM12/9/21
to OpenREM
Reply all
Reply to author
Forward
0 new messages