Announcement

Collapse
No announcement yet.

Running multiple mirth instances in same server

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Running multiple mirth instances in same server

    All,

    I have Mirth (version 2.0.1.5164) installed in Linux Ubuntu environment. I would like to run two or more Mirth instances in same server. Please let me know how procedure for installation? Also like to know for how to set-up Mirth in Cluster mode?

    Regards
    Nikhil

  • #2
    I can answer your question about "more than one mirth one machine".

    Dependent on which install you do on Linux your install process may vary. I normally just install it as I normally would and update the file:

    <new mirth install>/conf/mirth.properties

    Update the following values to something else:
    http.port=8080
    https.port=8443
    jmx.port=1099

    A typical sample value we have used when we ran Mirth 2.0 with Mirth 1.8 was:
    http.port=8082
    https.port=8445
    jmx.port=1101

    Thanks,
    Frans
    Frans de Wet
    Uber Operations LLC

    Phone: (850) 445-7696

    Comment


    • #3
      Thanks Frans,

      It is nice option to run other Mirth component running in Linux. If I do install another mirth setup with existing Mirth, then will it be db resource issue (as Mirth accessing db for configuration) or ports issues for old setup? How can I start and stop individual Mirth component?

      Please guide

      Regards

      Comment


      • #4
        I think I have to expand on my answer before a little ...

        If you choose to run multiple instances of Mirth on one server, and each of the instances is a different major version of Mirth (the last three at least - 1.8.x 2.0.x, and 2.1.x) each of them uses a different init script to start them up and shut them down. As such, you can really just run through the installation and afterwards go update the appropriate configuration file as described before.

        If, however, you choose to install the same version of Mirth to for instance have a dev, test, and production instance ... or perhaps some other motivation ... I would do it a little different:
        1. Download the tar.gz file for Linux
        2. untar it to a location of your choosing, perhaps something like /home/myuser/Downloads/Mirth
        3. Copy the folder to where you want your first instance of Mirth to be located ... say perhaps
        Code:
        cp -r /home/myuser/Downloads/Mirth /opt/Mirth-Dev
        4. Link your init script in if you want to use it to start or stop your Mirth instance (the names below are for Mirth 1.8.2) ...
        Code:
        ln -s /opt/Mirth-Dev/mirth-daemon /etc/init.d/mirth-dev
        5. Copy the folder to where you want your second instance of Mirth to be located ... say perhaps
        Code:
        cp -r /home/myuser/Downloads/Mirth /opt/Mirth-Test
        4. Link your init script in if you want to use to start or stop your Mirth instance ...
        Code:
        ln -s /opt/Mirth-Test/mirth-daemon /etc/init.d/mirth-test
        5. Edit the configuration file in /opt/Mirth-Test/conf/mirth.properties to change the port numbers as described before.
        6. Start and stop each of the instances with commands such as:
        Code:
        /etc/init.d/mirth-dev start
        /etc/init.d/mirth-test start
        /etc/init.d/mirth-dev stop
        /etc/init.d/mirth-test stop
        7. Take note, these Mirth instances will use their own internal derby databases. If you want to use an external database you would need two separate databases and configure each instance appropriately.
        8. Also, if you do not need or want to use init scripts you can just run Mirth manually by doing something like
        Code:
        cd /opt/Mirth-Dev/
        ./mirth.sh
        The command above varies by which version of Mirth you run ... the command above is version 1.8.2. For Mirth 2.0.x it is

        Code:
        ./Mirth\ Connect
        Have fun

        Frans
        Frans de Wet
        Uber Operations LLC

        Phone: (850) 445-7696

        Comment


        • #5
          Hi Frans,

          It is very useful and elaborate explanation which you have given. Thank you very much !

          Still I have a question about Mirth database. Do I have to use / configure different Mirth database for different mirth instance or I can use same database for two different instances? If I use same database for two mirth instances then channel created in one instance is visible in different mirth instance? If answer of the previous question is yes, then how to avoid this problem?

          Sorry for asking weird question but trying to understand the behaviour of Mirth.

          Regards

          Comment


          • #6
            Hmm, interesting question.

            I think you will need to run them against two separate databases. If you run them against the same database you may have inconsistencies with which channels are enabled and which are disabled at the time you deploy. You wil also run into the situation where actions one the one server also affect the data the other server sees. There is very few tables (I think only the message table) that actually has a server id field.

            We run each instance of Mirth against its own database server.

            Thanks,
            Frans
            Frans de Wet
            Uber Operations LLC

            Phone: (850) 445-7696

            Comment


            • #7
              Yes, none of the table is having server_id column except message table. Hence two database instances is required for two mirth connect. Can this problem will be fix in future release?

              Comment


              • #8
                I for one would prefer for Mirth to use separate databases for separate instances, just because it places a HUGE load on the database when you start getting into high volume sites.

                I cannot speak for what the MirthCorp folks would do though.

                Also, if you are adventurous you can go edit all the xml database platform files for your specific database platform in the second Mirth instance and edit the table names Mirth uses. This would allow you to create a second set of tables in the same database for the second Mirth instance. The two would be completely separate but still use the same database. I can only see this being useful if you are using a hosting company and you only have access to create/run one database. I am not sure how many people would be running Mirth on such a server anyways.

                Frans
                Frans de Wet
                Uber Operations LLC

                Phone: (850) 445-7696

                Comment

                Working...
                X