Uploaded image for project: 'Crowd Data Center'
  1. Crowd Data Center
  2. CWD-4974

Following "Removing the 'crowd' Context from the Application URL" documentation may lead to two Crowd applications deployed on same Tomcat instance

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Medium
    • None
    • None
    • None

    Description

      Following "Removing the 'crowd' Context from the Application URL" documentation may lead to two Crowd applications deployed on same Tomcat instance.

      The problem is with the 4th step of the instruction

      Rename the crowd.xml file in <Crowd-Install>/apache-tomcat/conf/Catalina/localhost to crowdbackup.xml to prevent Tomcat from loading the /crowd context. 

      as it may suggest leaving the descriptor xml in the <Crowd-Install>/apache-tomcat/conf/Catalina/localhost.

      Having both crowdbackup.xml in the <Crowd-Install>/apache-tomcat/conf/Catalina/localhost and the:

      <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
                        <Context path="" docBase="../../crowd-webapp" debug="0">
                              <Manager pathname="" />
                        </Context>
                  </Host>

      in the <Crowd-Install>/apache-tomcat/conf/server.xml may lead to two Crowd deployments on the same tomcat instance connected to the same database.
      This in turns may cause unexpected Crowd behaviour and race conditions.
       

      It would be best to backup the descriptor outside of the <Crowd-Install>/apache-tomcat/conf/Catalina/localhost.

      Note

      Customers, who already followed this instruction, are advised to check their tomcat configuration and to verify if they are not running multiple Crowd instances deployed on same application server (tomcat) connected to the same database.

      How to check if there is more then one Crowd application deployed on Tomcat?

      1. Run jconsole and connect to Tomcat javaprocess.
      2. In Catalina / WebModule subtree you should be able to see deployed applications with their context path
      3. Make sure that there is no crowdbackup or any other module that points to Crowd webapp files like in the following example:

       

      One may also check for the following log entries:

      localhost-startStop-1 INFO [ContainerBase.[Catalina].[localhost].[/]] Initializing Spring root WebApplicationContext

      and another one some time later

      localhost-startStop-1 INFO [ContainerBase.[Catalina].[localhost].[/crowdbackup]] Initializing Spring root WebApplicationContext

      which are then then followed up with two log entires such as:

      Starting Crowd Server, Version: 3.0.0 (Build:#865 - 2017-08-14)

      occurring shortly after each other (there are no entries about Crowd being stopped in between).

      Please note that running

      $ ps -ef | grep java | grep -v grep | wc -l

      will yield only one result
       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mkempa Marcin Kempa
              Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: