I'm using wso2am-2.1.0 in a clustered setup with a gateway implementation and the following exception could be observed frequently in the wso2server.log. A direction to resolve this issue is highly appreciated. Thanks in advance.
ERROR {org.wso2.carbon.databridge.agent.endpoint.DataEndpoint} - Unable to send events to the endpoint. {org.wso2.carbon.databridge.agent.endpoint.DataEndpoint}
org.wso2.carbon.databridge.agent.exception.DataEndpointException: Error while trying to publish events to data receiver :/xxx.xx.xx.x:9612
at org.wso2.carbon.databridge.agent.endpoint.binary.BinaryDataEndpoint.send(BinaryDataEndpoint.java:85)
at org.wso2.carbon.databridge.agent.endpoint.DataEndpoint$EventPublisher.publish(DataEndpoint.java:318)
at org.wso2.carbon.databridge.agent.endpoint.DataEndpoint$EventPublisher.run(DataEndpoint.java:271)
at java.lang.Thread.run(Thread.java:745)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.nio.BufferOverflowException
at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:183)
at java.nio.ByteBuffer.put(ByteBuffer.java:832)
at org.wso2.carbon.databridge.commons.binary.BinaryMessageConverterUtil.assignData(BinaryMessageConverterUtil.java:71)
at org.wso2.carbon.databridge.agent.endpoint.binary.BinaryEventSender.sendBinaryPublishMessage(BinaryEventSender.java:88)
at org.wso2.carbon.databridge.agent.endpoint.binary.BinaryDataEndpoint.send(BinaryDataEndpoint.java:75)
... 8 more```
The mentioned error is due to that the Gateway was not able to communicate with the Traffic Manager component and the events it has stored as almost pilled up and giving a Buffer overflow.
Therefore, if you are having a distributed environment, check the connectivity between the Gateway component and the Traffic Manager component. Also check whether the mentioned port (9612) is enabled and receiving traffic in the Traffic Manager component.