我们有一个包含3个节点的1个Kaa(0.9版)群集。 我们发现端点有时会重新连接到Kaa节点并且无法获得任何通知。 端点已订阅所有主题,我们也在管理网站中确认。 在它连接到Kaa后,控制台只显示以下消息:
[pool-6-thread-1] INFO org.kaaproject.kaa.client.channel.impl.channels.DefaultOperationTcpChannel - KaaSync message (zipped=false, encrypted=true) received for channel [default_operation_tcp_channel]
[pool-6-thread-1] INFO org.kaaproject.kaa.client.channel.impl.DefaultOperationDataProcessor - Received Sync response: {"requestId": 2, "status": "SUCCESS", "bootstrapSyncResponse": null, "profileSyncResponse": null, "configurationSyncResponse": null, "notificationSyncResponse": {"responseStatus": "NO_DELTA", "notifications": [], "availableTopics": null}, "userSyncResponse": {"userAttachResponse": null, "userAttachNotification": null, "userDetachNotification": null, "endpointAttachResponses": [], "endpointDetachResponses": []}, "eventSyncResponse": {"eventSequenceNumberResponse": null, "eventListenersResponses": [], "events": null}, "redirectSyncResponse": null, "logSyncResponse": null, "extensionSyncResponses": null}
[pool-6-thread-1] INFO org.kaaproject.kaa.client.channel.impl.transports.DefaultNotificationTransport - Processed notification response.
[pool-6-thread-1] INFO org.kaaproject.kaa.client.channel.impl.transports.DefaultUserTransport - Processed user response
[pool-6-thread-1] INFO org.kaaproject.kaa.client.channel.impl.channels.DefaultOperationTcpChannel - Channel [default_operation_tcp_channel] is reading data from stream using [1024] byte buffer
[pool-6-thread-2] INFO org.kaaproject.kaa.client.channel.impl.channels.DefaultOperationTcpChannel - Executing ping task for channel [default_operation_tcp_channel]
[pool-6-thread-1] INFO org.kaaproject.kaa.client.channel.impl.channels.DefaultOperationTcpChannel - PingResponse message received for channel [default_operation_tcp_channel]
[pool-6-thread-1] INFO org.kaaproject.kaa.client.channel.impl.channels.DefaultOperationTcpChannel - Channel [default_operation_tcp_channel] is reading data from stream using [1024] byte buffer
[pool-6-thread-2] INFO org.kaaproject.kaa.client.channel.impl.channels.DefaultOperationTcpChannel - Executing ping task for channel [default_operation_tcp_channel]
[pool-6-thread-1] INFO org.kaaproject.kaa.client.channel.impl.channels.DefaultOperationTcpChannel - PingResponse message received for channel [default_operation_tcp_channel]
[pool-6-thread-1] INFO org.kaaproject.kaa.client.channel.impl.channels.DefaultOperationTcpChannel - Channel [default_operation_tcp_channel] is reading data from stream using [1024] byte buffer
[pool-6-thread-2] INFO org.kaaproject.kaa.client.channel.impl.channels.DefaultOperationTcpChannel - Executing ping task for channel [default_operation_tcp_channel]
[pool-6-thread-1] INFO org.kaaproject.kaa.client.channel.impl.channels.DefaultOperationTcpChannel - PingResponse message received for channel [default_operation_tcp_channel]
[pool-6-thread-1] INFO org.kaaproject.kaa.client.channel.impl.channels.DefaultOperationTcpChannel - Channel [default_operation_tcp_channel] is reading data from stream using [1024] byte buffer
[pool-6-thread-2] INFO org.kaaproject.kaa.client.channel.impl.channels.DefaultOperationTcpChannel - Executing ping task for channel [default_operation_tcp_channel]
[pool-6-thread-1] INFO org.kaaproject.kaa.client.channel.impl.channels.DefaultOperationTcpChannel - PingResponse message received for channel [default_operation_tcp_channel]
[pool-6-thread-1] INFO org.kaaproject.kaa.client.channel.impl.channels.DefaultOperationTcpChannel - Channel [default_operation_tcp_channel] is reading data from stream using [1024] byte buffer
[pool-6-thread-2] INFO org.kaaproject.kaa.client.channel.impl.channels.DefaultOperationTcpChannel - Executing ping task for channel [default_operation_tcp_channel]
[pool-6-thread-1] INFO org.kaaproject.kaa.client.channel.impl.channels.DefaultOperationTcpChannel - PingResponse message received for channel [default_operation_tcp_channel]
[pool-6-thread-1] INFO org.kaaproject.kaa.client.cnhannel.impl.channels.DefaultOperationTcpChannel - Channel [default_operation_tcp_channel] is reading data from stream using [1024] byte buffer
然后,我们尝试停止端点并再次重新连接到Kaa服务器。 连接到Kaa后,将显示旧通知。 但是,我们尝试向此端点发送新通知,但仍然无法获得新通知。
我们还发现如果我们断开与Kaa服务器的连接并重新连接它,我们可以再次收到通知。 但是,端点无法获得通知条件似乎仍然发生在其他端点。我们不确定此问题是否与我们的群集有关。 有时,我们将重新启动kaa-node服务,端点将在那时连接到其他2台服务器。
答案 0 :(得分:1)
我们似乎找到了根本原因。从日志中,我们看到通知应该成功发送到端点。但是,似乎性能非常糟糕,端点需要大量时间来获取通知。最后,我们发现根本原因应该是我们服务器的交换文件。我们的服务器之前设置了交换文件,它似乎影响了发送通知的性能。我们尝试禁用交换空间并发送通知,端点可以在合理的时间内获得。
我们设置交换原因我们发现Kaa-node的内存使用量将在一天前超过我们服务器的80%。目前,我们尝试使用不同的java gc来替换原始的G1 gc,同时启动Kaa-node。内存使用似乎比使用G1 gc更好。我们将继续监控它。