Synology docker multible instances orthanc to postgresql database

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

http://192.168.1.2:8047/instances/c5f9ae72-3972b5f7-50d0c4d1-3f160290-6a19e7a7/tags

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

http://192.168.1.2:8047/instances/c5f9ae72-3972b5f7-50d0c4d1-3f160290-6a19e7a7/tags

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 (1.65 KB)

orthanc1.json (34.4 KB)

orthanc2.json (34.4 KB)

osimis-orthanc1.json (1.64 KB)

Sorry if i change to

http://192.168.1.2:8046/instances/c5f9ae72-3972b5f7-50d0c4d1-3f160290-6a19e7a7/tags

i download the file

and generally everthing in first instance works perfect

Στις Τρίτη, 18 Μαΐου 2021 στις 12:01:48 π.μ. UTC+3, ο χρήστης Dkorthosurgery έγραψε:

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-

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

Στις Τρίτη, 18 Μαΐου 2021 στις 8:40:46 π.μ. UTC+3, ο χρήστης s.jo...@gmail.com έγραψε:

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

Στις Πέμπτη, 20 Μαΐου 2021 στις 9:11:14 μ.μ. UTC+3, ο χρήστης Dkorthosurgery έγραψε:

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

Στις Κυριακή, 23 Μαΐου 2021 στις 2:52:56 π.μ. UTC+3, ο χρήστης Dkorthosurgery έγραψε: