We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

Multiple OC instances using CATALINA_BASE

ebsebs Posts: 135 ✭✭
edited July 2015 in Installation & Setup
Hi, 

Does anyone have any experience of running multiple OC instances using the CATALINA_BASE feature of Tomcat?

I tried the steps mentioned in the Tomcat how to and here but saw some strange behaviour when I tried to deploy the second instance (OC login page displayed but could not login, root account locked (using default password).  This behaviour was also seen in the OC instance  running from CATALINA_HOME.  It was as if the database connection wasn't correct.  I had changed the datainfo.properties to reflect the database for the 2nd instance in webapps/oc.

One potential issue is that the fact that from OC3.4 the openclinica.config files are placed in CATALINA_HOME by default when OC is deployed initially.  This didn't occur when I deployed the 2nd instance of OC - I was expecting it to appear in CATALINA_BASE for that instance but nothing appeared.

Log files didn't show anything relating to the login issue.  Also the tables in the database for the 2nd instance were not created during deployment.

Interested to here if anyone has managed to get it working.

Cheers
Eric

Comments

  • sookeyosookeyo Posts: 75
    via Email
    Hi Eric,
    Which Tomcat version are you using? I had the same experience when i used Tomcat 6.44 and higher versions, it doesn't load more than one instance of OC, though i don't really know the reason(but it has something to do with the version of Tomcat) , but when i run it on Tomcat 6 lower versions, I'm able to run like now 14 instances.

    Seth Okeyo | Data Management Officer
    Drugs for Neglected Diseases initiative
  • ebsebs Posts: 135 ✭✭
    Hi Seth,

    Thanks for your thoughts. I'm running 7.0.52 for OC3.4

    Out of interest what's the latest version of OC you have managed to install as an instance?

    Cheers
    Eric
  • sookeyosookeyo Posts: 75
    via Email
    Hi Eric,
    That might be the problem, run Tomcat 6 versions .. more compatible with OC. I'm currently running OC 3.5 Community edition.
    regards.

    Seth Okeyo | Data Management Officer
    Drugs for Neglected Diseases initiative
  • ebsebs Posts: 135 ✭✭
    I'd like to try and remain on Tomcat 7 given that its stated as tested against 7 for OC3.4. Oh and I don't fancy re-testing my current study ;-)

    I can see the Tomcat ROOT app fine for both instances which leads me to think it is more an OC issue than Tomcat.

    Cheers
    Eric
  • zwetszwets Posts: 59
    via Email
    Hi Eric,

    On 01/07/15 17:07, ebs wrote:
    > Does anyone have any experience of running multiple OC instances using the CATALINA_BASE feature of Tomcat?

    Yes, I've always been running with the split setup recommended by Tomcat
    (as described in RUNNING.txt). I.e. I have an out-of-the-box Tomcat in
    TOMCAT_HOME, root owned and read-only, and a number of separate
    TOMCAT_BASEs with the OC (and other) instances. This has worked fine up
    to OC 3.4.1. Just make sure you fix the references to ${catalina.home}
    in the datainfo.properties. Note that changing these to ${catalina.base}
    (which they should have been) does not work, as that variable is not
    interpreted by the OC configuration mechanism. Use full file paths instead.

    However, OC 3.4.1 breaks the split setup as it attempts to create
    OpenClinica.config in CATALINA_HOME, whereas this should have been in
    CATALINA_BASE. I have reported this bug here (vote!):
    https://jira.openclinica.com/browse/OC-6284

    Cheers
    Marco
  • ebsebs Posts: 135 ✭✭
    Thanks for the info Marco.

    Looks like I have no choice at present since I need to be 3.4.1 and Tomcat 7.  Hopefully installing them separately on the one machine will work for now,

    I have +1'd your Jira bug.

    Cheers
    Eric 
  • BinaryVisionBinaryVision Posts: 42
    Was this fixed in OC 3.5?  We run multiple OC instances on 3.1.4, in some cases 6 or 7, and I've set 3 on OC 3.5, but we're not currently utilizing the BASE feature.  

    That's desirable for us to implement. Does it handle the correct URLs from a single IP or do you use a reverse proxy with that? The documentation states different IPs or port #'s
  • zwetszwets Posts: 59
    via Email
    > Was this fixed in OC 3.5? We run multiple OC instances on 3.1.4, in some cases 6 or 7, and I've set 3 on OC 3.5, but we're not currently utilizing the BASE feature.

    The bug is still open as well as another blocker
    (https://jira.openclinica.com/browse/OC-6285), which is why I didn't
    upgrade.

    > That's desirable for us to implement. Does it handle the correct URLs from a single IP or do you use a reverse proxy with that? The documentation states different IPs or port #'s

    The instances are just as separate as they would be if you had one
    Tomcat binary per instance (i.e. with BASE == HOME), so yes they must
    still be on separate ports. The point of the HOME - BASE separation
    isn't having a single Tomcat process hosting multiple servers, but to
    have a single Tomcat *binary* (per major version) on the system. This is
    easier to maintain and more secure than having a bunch of (possibly
    outdated or modified) Tomcat installations. At runtime there is no
    difference: you still get one system process per instance.
  • BinaryVisionBinaryVision Posts: 42
    Thanks zwets. OC-6284 still has no fix version. We want to stick with OC 3.5 and Tomcat 7 so the only work around for us is multiple installs of Tomcat.
This discussion has been closed.