Synology docker multible instances orthanc to postgresql database

257 views
Skip to first unread message

Dkorthosurgery

unread,
May 17, 2021, 5:01:48 PM5/17/21
to Orthanc Users
I set up experimental orthanc server on synology docker and postgresql on docker 
all latest versions on the same docker and storage on a folder on the same nas

The orthanc1 and orthanc2 instance share the same database
The orthanc1 instance works perfect, the orthanc2 instance works well but it does not 
find the images on storage

the configuration is almost identical
Trying to find a solution
i change the permissions of the orthancstorage to everyone rw without success

the orthanc2 logs shows this messages

W0516 21:17:11.327150 OrthancInitialization.cpp:425] Storage directory: "/volume1/homes/admin/Drive/Orthanc"

stdout

2021-05-16 21:17:45

W0E0516 21:17:45.369613 OrthancException.cpp:57] The specified path does not point to a regular file: The path does not point to a regular file: /volume1/homes/admin/Drive/Orthanc/70/f6/70f6398a-5d95-455d-aae0-f32c3d8b1172

stdout

Trying to download a file 


i get
 
{ "Details" : "The path does not point to a regular file: /volume1/homes/admin/Drive/Orthanc/4a/39/4a39fc7b-643f-4f0f-bbde-2ebe6a85d432", "HttpError" : "Internal Server Error", "HttpStatus" : 500, "Message" : "The specified path does not point to a regular file", "Method" : "GET", "OrthancError" : "The specified path does not point to a regular file", "OrthancStatus" : 2006, "Uri" : "/instances/c5f9ae72-3972b5f7-50d0c4d1-3f160290-6a19e7a7/tags" }

if i change to 


i download the file

It is frustrating because the two instances are almost identicals i copy one docker to another and conficuration to the other changing only the ports

I enclose the docker settings and the configuration files



osimis-orthanc2.json
orthanc1.json
orthanc2.json
osimis-orthanc1.json

Dkorthosurgery

unread,
May 17, 2021, 5:04:46 PM5/17/21
to Orthanc Users
Sorry if i change to 
i download the file

and generally everthing in first instance works perfect

Sébastien Jodogne

unread,
May 18, 2021, 1:40:46 AM5/18/21
to Orthanc Users
From what I understand, you are launching two different instances of Orthanc using Docker.

These two instances use the same PostgreSQL database (located at 172.17.0.2). Regarding the storage area, these two instances use the path "/volume1/homes/admin/Drive/Orthanc".

However, the paths in Docker are *local* to your Docker container. If you reboot your Synology device, you should not be able to access your DICOM files, event from the first Orthanc server.

The solution is to map the same volume from the Synology into your Docker containers using the "-v" command-line option of Docker:

HTH,
Sébastien-

Dkorthosurgery

unread,
May 20, 2021, 2:11:14 PM5/20/21
to Orthanc Users
I am still not able to configure the second instance of orthanc to work proberly
After a reboot of the synology none of the instances was working, but i discover that this was due to deferent postgres container ip,
editing the orthanc.json  and changing the postgres ip, fix the problem and both instances are working now
The first instance is working fine and the the second again can not access synology storage
I changed the docker volume binding config of the second instance to 

"volume_bindings" : [
      {
         "host_volume_file" : "/homes/admin/Drive/Orthanc",
         "mount_point" : "/orthancstorage",
         "type" : "rw"
      },
      {
         "host_volume_file" : "/docker/Orthanc2",
         "mount_point" : "/etc/orthanc",
         "type" : "ro"
      }
   ]
 
and the orthanc.json cofing to "StorageDirectory" : "/orthancstorage", ( i have to say that this was my initial attempt trying to set up the first instance of synology )

but with no success

I tried to see the orthancstorage directory through the bash and i can see the right original files

I am thinking that the problem is maybe  with privillages of the files but again i dont remember to change something in the first instance 

Dkorthosurgery

unread,
May 22, 2021, 7:52:56 PM5/22/21
to Orthanc Users
I discover that after i send new images in the first instance i can see them correct in both instances, these does not make sence to me as i can't see the initial images in the second orthanc instance 
As a workaround i rebulit the database and everything seems ok.
Many thanks, 
Kyriakos

Dkorthosurgery

unread,
May 24, 2021, 6:25:57 PM5/24/21
to Orthanc Users
I have finally success using

"volume_bindings" : [
      {
         "host_volume_file" : "/docker/Orthanc",
         "mount_point" : "/etc/orthanc",
         "type" : "rw"
      },
      {
         "host_volume_file" : "/homes/admin/Drive/Orthanc",
         "mount_point" : "/orthancstorage",
         "type" : "rw"
      }

and rebuilting database, eveything works perfect now, backup and restore  postgresql throught  pdadmin, using a third orthanc instance and a second orthancdatabase

I am still do not understand the initial error ( how i had access to synology drive throught docker, and why the database was not working in the second instance although i i am thinking that some how synology was using a kind of wrong symbolic links. )

Anyway, i thnk i can make i quide for setup synology now as the procedure is reproducable 

Many thanks, 

Kyriakos
Reply all
Reply to author
Forward
0 new messages