Update [Fixed]: After reconnecting I had sent the same event object that failed on session expiration. This event object contained the sesison ID of the old session. Fixed this to call the publish method again after reconnecting.
Regards, Chamila de Alwis Software Engineer | WSO2 | +94772207163 Blog: code.chamiladealwis.com On Mon, Oct 27, 2014 at 3:24 PM, Chamila De Alwis <[email protected]> wrote: > Update: > > After testing with several different clientTimeoutMS values, it seems that > the errors start appearing after 60mins, irrespective of the > clientTimeoutMS. > > > Regards, > Chamila de Alwis > Software Engineer | WSO2 | +94772207163 > Blog: code.chamiladealwis.com > > > > On Mon, Oct 27, 2014 at 2:44 AM, Chamila De Alwis <[email protected]> > wrote: > >> Hi, >> >> I'm using a Python thrift publisher that publishes to CEP repeatedly with >> an interval. >> >> After 30 minutes a ThriftSessionExpiredException is thrown. I'm catching >> this and reconnecting to continue publishing events. >> >> The clientTimeoutMS value in >> repository/conf/data-bridge/data-bridge-config.xml is set to 60000. After >> the second reconnect, which is at 60 minutes, the data bridge receiver on >> the CEP throws EventConversionException saying the event is wrongly >> formatted. Note that this doesn't happen in the first reconnect at 30 mins. >> >> [2014-10-27 01:43:49,217] ERROR >> {org.wso2.carbon.databridge.core.internal.queue.QueueWorker} - Wrongly >> formatted event sent for carbon.super >> org.wso2.carbon.databridge.core.exception.EventConversionException: Error >> when converting cartridge_agent_health_stats:1.0.0 of event bundle with >> events 480 >> at >> org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.createEventList(ThriftEventConverter.java:126) >> at >> org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.toEventList(ThriftEventConverter.java:88) >> at >> org.wso2.carbon.databridge.core.internal.queue.QueueWorker.run(QueueWorker.java:72) >> at >> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) >> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) >> at java.util.concurrent.FutureTask.run(FutureTask.java:166) >> at >> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) >> at java.lang.Thread.run(Thread.java:722) >> Caused by: java.lang.IndexOutOfBoundsException: Index: 2874, Size: 2874 >> at java.util.ArrayList.rangeCheck(ArrayList.java:604) >> at java.util.ArrayList.get(ArrayList.java:382) >> at >> org.wso2.carbon.databridge.receiver.thrift.converter.ThriftEventConverter.createEventList(ThriftEventConverter.java:104) >> ... 8 more >> >> I'm not sure why this is happening as what I do to reconnect is to call >> the connect method and define the stream definition. >> >> 1) Does the client need to redefine the stream definition at reconnection? >> >> 2) Should any data from the old connection, such as the stream ID or the >> session ID should be passed to the new connection to resemble continuation? >> >> Regards, >> Chamila de Alwis >> Software Engineer | WSO2 | +94772207163 >> Blog: code.chamiladealwis.com >> >> >> >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
