0

我们有一个具有 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 个服务器。

4

1 回答 1

1

我们似乎找到了根本原因。从日志中,我们看到通知应该成功发送到端点。但是,性能似乎很差,端点需要很多时间才能收到通知。最后,我们发现根本原因应该是我们服务器的交换文件。我们的服务器之前设置了交换文件,它似乎影响了发送通知的性能。我们尝试禁用交换空间并发送通知,端点可以在合理的时间内到达。

我们设置交换是因为我们发现 Kaa 节点的内存使用量在前一天会超过我们服务器的 80%。目前,我们尝试在启动 Kaa-node 时使用不同的 java gc 替换原来的 G1 gc。而且内存使用似乎比使用 G1 gc 更好。我们将继续对其进行监控。

于 2016-12-13T14:14:17.283 回答