Hi everyone, I've just configured Tomcat 7 clustering as well. I added the <distributable/> tag to the web.xml of both syncope and syncope-console and included <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> with the extended configuration as detailed under point 6. of the "impatient section" of [1] in the server.xml.
So both MySQL replication and Tomcat 7 clustering are active (which is probably
conflicting?). The cluster is started but now numerous stacktraces like the one
below show up in my catalina.out. I must be making a rookie mistake. What am I
missing?
kind regards.
J.
Mar 24, 2014 8:04:56 AM org.apache.catalina.ha.session.DeltaManager
requestCompleted
SEVERE: Unable to serialize delta request for sessionid
[D0F4730FAB4437A679D59A7C2371B3CE]
java.io.NotSerializableException: org.springframework.web.client.RestTemplate
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
at
org.apache.catalina.ha.session.DeltaRequest$AttributeInfo.writeExternal(DeltaRequest.java:392)
at
org.apache.catalina.ha.session.DeltaRequest.writeExternal(DeltaRequest.java:285)
at
org.apache.catalina.ha.session.DeltaRequest.serialize(DeltaRequest.java:299)
at
org.apache.catalina.ha.session.DeltaManager.serializeDeltaRequest(DeltaManager.java:621)
at
org.apache.catalina.ha.session.DeltaManager.requestCompleted(DeltaManager.java:1053)
at
org.apache.catalina.ha.session.DeltaManager.requestCompleted(DeltaManager.java:1018)
at
org.apache.catalina.ha.tcp.ReplicationValve.send(ReplicationValve.java:537)
at
org.apache.catalina.ha.tcp.ReplicationValve.sendMessage(ReplicationValve.java:524)
at
org.apache.catalina.ha.tcp.ReplicationValve.sendSessionReplicationMessage(ReplicationValve.java:506)
at
org.apache.catalina.ha.tcp.ReplicationValve.sendReplicationMessage(ReplicationValve.java:419)
at
org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:343)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
at
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2441)
at
org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2430)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:662)
[1] http://tomcat.apache.org/tomcat-7.0-doc/cluster-howto.html
On 20 mrt. 2014, at 22:55, Jordi Clement <[email protected]> wrote:
> Hi,
>
> I've setup a MySQL database cluster with master master replication. I've
> deployed syncope in Tomcat 7 on 2 nodes. Each node points to the locally
> installed database. I've not yet setup Tomcat clustering but instead rely on
> the database synchronization for failover. I've configured the MySQL driver
> per suggestion on page [1].
>
> Now I notice the following behavior:
>
> 1. Create a role using the console on node 1
> 2. The role is removed from the database on both servers
> 3. The role shows up in the console on node 2 after a page refresh
> 4. Remove the role from the console on node 2
> 5. The role is removed from the database on both servers
> 6. Go to the console on node 1. The role is still there, even after a page
> reload.
> 7. Create a new role on node 1. The first role is removed.
>
> I'm sure this has to do with caching. Now my question is: how can I configure
> syncope to show the correct behavior? Do I need to setup a Tomcat cluster,
> change the JDBC driver settings or maybe disable or configure caching in some
> way? I' like to setup loadbalancing and I'm not sure whether I won't run into
> problems with the setup as is.
>
> kind regards,
>
> J.
>
> [1]
> https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+in+real+environments
signature.asc
Description: Message signed with OpenPGP using GPGMail
