-
Bug
-
Resolution: Low Engagement
-
Medium
-
None
-
None
-
None
-
3
-
Severity 3 - Minor
-
2
-
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.
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
- causes
-
CWD-4964 In some cases Crowd might erroneously detect another instance is accessing the Crowd database and shut down
-
- Closed
-