【问题标题】:can't get notification after reconnect to Kaa server重新连接到 Kaa 服务器后无法收到通知
【发布时间】:2016-12-08 03:27:13
【问题描述】:

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

【问题讨论】:

标签: kaa


【解决方案1】:

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

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

【讨论】:

  • 感谢您提供的信息。在您尝试其他 GC 时与我们保持同步。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2010-11-29
  • 1970-01-01
  • 2018-03-07
  • 1970-01-01
  • 2021-06-03
  • 1970-01-01
相关资源
最近更新 更多