Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Installing multiple instances on single server?

1,511 views
Skip to first unread message

Gary Goozée

unread,
Feb 24, 2016, 12:38:20 AM2/24/16
to Orthanc Users
Hello,

First post from a short time user of this slick application.

Previous posts on the discussion group have suggested the capability of having multiple instances of Orthanc on a single server and I would like to do this.

How would one go about this for a Windows system?

The command to create a service is 'sc create' so I expect it would be something like :

sc create  Orthanc2 binpath= "\"c:\program files (x86)\Orthanc\Orthanc Server 1.0.0\Orthanc-1.0.0-Release.exe\" E:\Orthanc_data\Configuration2.json " start= auto DisplayName= Orthanc-Physics
(Note additiona quotes and escape characters in order to handle spaces in the exe path).

This successfully creates the service but it will not start.I notice that the "path to executable" for this created service contains the quotes and the config file whereas the default service just has the exe path without quotes and no config filename, but is this significant?

Running the above exe from the command line starts and runs OK, however, so the service  doesn't seem to be failing to run due to a config file issue. The command used for this test was actually:  
"c:\program files (x86)\Orthanc\Orthanc Server 1.0.0\Orthanc-1.0.0-Release.exe" E:\Orthanc_data\Configuration2.json


So the bits I am unclear about for running a second instance are:-
1)  how to get it running as a 2nd service?
2) how to get it to write to a (preferably separate) log file? It is hard to identify any problems without this.
3) and also I am curious as to how the application know where the orthanc_data folder is for the new instance as it isn't in the config file or the registry as far as I can tell?

Any suggestions appreciated,

Gary


Sébastien Jodogne

unread,
Feb 24, 2016, 5:09:46 AM2/24/16
to Orthanc Users
Hello,

(1) Yes, multiple instances of Orthanc can run on a single server.

In such situations, I would highly recommend you to favor a Linux server. Indeed, creating a Windows service (as the one that is shipped by the Orthanc project) is a complex task. Read for instance the following link:

But, the official "Orthanc-1.0.0-Release.exe" binary does not implement the "ServiceMain" callback function by itself:

As a consequence, this binary cannot be run as such as a service. You will have to create a C or C# wrapper service above the Orthanc command-line server. There are many tutorials around, e.g. on CodeProject:

(2) The official Windows service of Orthanc will put its logs inside a "Logs" directory next to the data folder.

(3) The parameters of the Windows service are stored in the registry, inside the key "HKEY_LOCAL_MACHINE\SOFTWARE\Orthanc\Orthanc Server".

HTH,
Sébastien-

salim.d...@gmail.com

unread,
Dec 18, 2017, 5:23:17 AM12/18/17
to Orthanc Users
How to run multiple instances of Orthanc on single linux machine?

Sébastien Jodogne

unread,
Dec 18, 2017, 7:13:17 AM12/18/17
to Orthanc Users
Just start multiple instances of Orthanc, with different TCP ports and different path to the databases.

Check out the "HttpPort", "DicomPort", "StorageDirectory" and "IndexDirectory" options in the configuration file:

Sébastien-

salim.d...@gmail.com

unread,
Dec 20, 2017, 1:35:27 AM12/20/17
to Orthanc Users
How set "StorageDirectory" and "IndexDirectory" for different instances for Orthanc server.

Alain Mazy

unread,
Dec 20, 2017, 4:54:38 PM12/20/17
to Salim Akhtar, Orthanc Users
use one configuration file per instance of Orthanc.

On Wed, Dec 20, 2017 at 7:35 AM, <salim.d...@gmail.com> wrote:
How set "StorageDirectory" and "IndexDirectory" for different instances for Orthanc server.




--

Alain Mazy / CTO 
a...@osimis.io / +32 494 31 67 27

Osimis

OSIMIS S.A. 
Rue bois Saint-Jean 15/1BE-4102 Seraing 
www.osimis.io

Twitter LinkedIn


Reply all
Reply to author
Forward
0 new messages