On 22/04/2015 19:03, Anubhav Sharma wrote:
Hi Guys,

We have the following deployment for Syncope:

Tomcat1 – Syncope1 – SinglePostgresDB
tomcat2 – Syncope2 -  SinglePostgresDB

Both these tomcats are not in cluster. Syncope1 and Syncope1 are independent 
instances and not in cluster as well. Both these Syncope instances use a common 
single PostgresDB. Both the tomcats are behind a LoadBalancer and the 
application requests ELB for accessing Syncope so that load is randomly 
distributed.

With this deployment sometimes our application works!! But sometimes when the 
application tries to delete a user or change password, one of the Syncope 
throws an error:

09:58:21.999 DEBUG org.apache.syncope.core.rest.controller.ControllerHandler - 
Unresolved bean reference ...
09:58:22.156 DEBUG org.apache.syncope.core.rest.controller.ControllerHandler - 
After throwing UserController.search
09:58:22.158 ERROR 
org.apache.syncope.core.rest.utils.RestServiceExceptionMapper - Exception 
thrown by REST method: null
java.lang.NullPointerException
09:59:21.564 DEBUG org.apache.syncope.core.rest.controller.ControllerHandler - 
Before 
UserController.search([org.apache.syncope.core.persistence.dao.search.SearchCond@35f75285[
   type=LEAF
   subjectCond=<null>
   
attributeCond=org.apache.syncope.core.persistence.dao.search.AttributeCond@4ab571[
   type=EQ
   schema=accountName
   expression=testAccount
]

And additionally we have warnings in the logs:

"message": "410373728  syncopePersistenceUnit  WARN   [http-bio-8080-exec-2529] openjpa.Runtime - Detected possible 
orphaned reference to deleted object \"[9899]\" in 
\"org.apache.syncope.core.persistence.beans.user.UAttr.values<element:class 
org.apache.syncope.core.persistence.beans.user.UAttrValue>\" of instance \"10764\".”,


After these errors, this Syncope instance always results error and if I try to 
login to Syncope-Console UI, I cannot connect to the Users tab….it results into 
error “Error in core”

Question is, is it a valid deployment scenario?? Is Syncope expected to work in 
such a deployment? Or we need to setup tomcat/Syncope in cluster and only then 
it is expected to work??

Can someone please provide hints!!!

Hi,
you are missing an important piece of configuration, e.g. to let the two OpenJPA instances (embedded in the two Syncope instances) synchronize their respective data cache.

I have added some more information about this, including configuration options, in the dedicated wiki page at

https://cwiki.apache.org/confluence/display/SYNCOPE/Setup+a+Syncope+cluster

HTH
Regards.

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/

Reply via email to