累积-CumulocityLongPollingTransport空闲 [英] Cumulocity - CumulocityLongPollingTransport Idle

查看:73
本文介绍了累积-CumulocityLongPollingTransport空闲的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用7.40.0 Cumulocity Java Client SDK订阅实时通知.我能够收到通知,但是在使客户端运行一会儿之后,它似乎停止监听并且无法再获取通知.

I'm using the 7.40.0 Cumulocity Java Client SDK to subscribe to real-time notifications. I'm able to get notifications but after leaving the client running for a while, it seems to stop listening and I'm no longer able to retrieve notifications.

有人遇到过这种情况吗?

Has anyone encountered this scenario?

WARN  2017-01-03 08:44:49,727 [CumulocityLongPollingTransport-scheduler-0] com.cumulocity.sdk.client.notification.ConnectionHeartBeatWatcher: canceling the long poll request because of inactivity
DEBUG 2017-01-03 08:44:49,727 [CumulocityLongPollingTransport-scheduler-0] com.cumulocity.sdk.client.notification.MessageExchange: canceling [{clientId=4b11irnlptb55g4rs3hauu1ctjpy, channel=/meta/connect, id=16, connectionType=long-polling}]
DEBUG 2017-01-03 08:44:49,727 [CumulocityLongPollingTransport-scheduler-0] com.cumulocity.sdk.client.notification.MessageExchange: stopping heartbeat watcher [{clientId=4b11irnlptb55g4rs3hauu1ctjpy, channel=/meta/connect, id=16, connectionType=long-polling}]
DEBUG 2017-01-03 08:44:50,728 [pool-21-thread-1] com.cumulocity.sdk.client.notification.CumulocityLongPollingTransport.1365985548: sending messages [{clientId=4b11irnlptb55g4rs3hauu1ctjpy, advice={timeout=0}, channel=/meta/connect, id=19, connectionType=long-polling}] 
DEBUG 2017-01-03 08:44:50,728 [pool-21-thread-1] com.cumulocity.sdk.client.notification.MessageExchange: starting heartbeat watcher [{clientId=4b11irnlptb55g4rs3hauu1ctjpy, advice={timeout=0}, channel=/meta/connect, id=19, connectionType=long-polling}]
DEBUG 2017-01-03 08:44:51,710 [CumulocityLongPollingTransport-scheduler-1] com.cumulocity.sdk.client.notification.MessageExchange: wait for response headers [{clientId=4b11irnlptb55g4rs3hauu1ctjpy, advice={timeout=0}, channel=/meta/connect, id=19, connectionType=long-polling}]
DEBUG 2017-01-03 08:44:51,710 [CumulocityLongPollingTransport-scheduler-1] com.cumulocity.sdk.client.notification.MessageExchange: recived response headers [{clientId=4b11irnlptb55g4rs3hauu1ctjpy, advice={timeout=0}, channel=/meta/connect, id=19, connectionType=long-polling}] 
DEBUG 2017-01-03 08:44:51,710 [CumulocityLongPollingTransport-scheduler-1] com.cumulocity.sdk.client.notification.MessageExchange: getting heartbeants  POST https://msc.cumulocity.com//cep/realtime returned a response status of 200 OK
DEBUG 2017-01-03 08:44:51,710 [CumulocityLongPollingTransport-scheduler-1] com.cumulocity.sdk.client.notification.MessageExchange: new messages recived
DEBUG 2017-01-03 08:44:51,711 [CumulocityLongPollingTransport-scheduler-1] com.cumulocity.sdk.client.notification.MessageExchange: Received messages [{channel=/meta/connect, id=19, advice={reconnect=retry, interval=0, timeout=5400000}, successful=true}]
DEBUG 2017-01-03 08:44:51,711 [CumulocityLongPollingTransport-scheduler-1] com.cumulocity.sdk.client.notification.MessageExchange: stopping heartbeat watcher [{clientId=4b11irnlptb55g4rs3hauu1ctjpy, advice={timeout=0}, channel=/meta/connect, id=19, connectionType=long-polling}]
DEBUG 2017-01-03 08:44:51,711 [pool-21-thread-1] com.cumulocity.sdk.client.notification.CumulocityLongPollingTransport.1365985548: sending messages [{clientId=4b11irnlptb55g4rs3hauu1ctjpy, channel=/meta/connect, id=23, connectionType=long-polling}] 
DEBUG 2017-01-03 08:44:51,711 [pool-21-thread-1] com.cumulocity.sdk.client.notification.MessageExchange: starting heartbeat watcher [{clientId=4b11irnlptb55g4rs3hauu1ctjpy, channel=/meta/connect, id=23, connectionType=long-polling}]
DEBUG 2017-01-03 08:56:51,711 [CumulocityLongPollingTransport-scheduler-0] com.cumulocity.sdk.client.notification.MessageExchange: canceling [{clientId=4b11irnlptb55g4rs3hauu1ctjpy, channel=/meta/connect, id=23, connectionType=long-polling}]
DEBUG 2017-01-03 08:56:51,711 [CumulocityLongPollingTransport-scheduler-0] com.cumulocity.sdk.client.notification.MessageExchange: stopping heartbeat watcher [{clientId=4b11irnlptb55g4rs3hauu1ctjpy, channel=/meta/connect, id=23, connectionType=long-polling}]
DEBUG 2017-01-03 08:56:52,711 [pool-21-thread-1] com.cumulocity.sdk.client.notification.CumulocityLongPollingTransport.1365985548: sending messages [{clientId=4b11irnlptb55g4rs3hauu1ctjpy, advice={timeout=0}, channel=/meta/connect, id=26, connectionType=long-polling}] 
DEBUG 2017-01-03 08:56:52,712 [pool-21-thread-1] com.cumulocity.sdk.client.notification.MessageExchange: starting heartbeat watcher [{clientId=4b11irnlptb55g4rs3hauu1ctjpy, advice={timeout=0}, channel=/meta/connect, id=26, connectionType=long-polling}]
DEBUG 2017-01-03 08:56:53,659 [CumulocityLongPollingTransport-scheduler-0] com.cumulocity.sdk.client.notification.MessageExchange: wait for response headers [{clientId=4b11irnlptb55g4rs3hauu1ctjpy, advice={timeout=0}, channel=/meta/connect, id=26, connectionType=long-polling}]
DEBUG 2017-01-03 08:56:53,659 [CumulocityLongPollingTransport-scheduler-0] com.cumulocity.sdk.client.notification.MessageExchange: recived response headers [{clientId=4b11irnlptb55g4rs3hauu1ctjpy, advice={timeout=0}, channel=/meta/connect, id=26, connectionType=long-polling}] 
DEBUG 2017-01-03 08:56:53,659 [CumulocityLongPollingTransport-scheduler-0] com.cumulocity.sdk.client.notification.MessageExchange: getting heartbeants  POST https://msc.cumulocity.com//cep/realtime returned a response status of 200 OK
DEBUG 2017-01-03 08:56:53,660 [CumulocityLongPollingTransport-scheduler-0] com.cumulocity.sdk.client.notification.MessageExchange: new messages recived
DEBUG 2017-01-03 08:56:53,661 [CumulocityLongPollingTransport-scheduler-0] com.cumulocity.sdk.client.notification.MessageExchange: Received messages [{channel=/meta/connect, id=26, advice={reconnect=retry, interval=0, timeout=5400000}, successful=true}]
DEBUG 2017-01-03 08:56:53,661 [CumulocityLongPollingTransport-scheduler-0] com.cumulocity.sdk.client.notification.MessageExchange: stopping heartbeat watcher [{clientId=4b11irnlptb55g4rs3hauu1ctjpy, advice={timeout=0}, channel=/meta/connect, id=26, connectionType=long-polling}]
DEBUG 2017-01-03 08:56:53,661 [pool-21-thread-1] com.cumulocity.sdk.client.notification.CumulocityLongPollingTransport.1365985548: sending messages [{clientId=4b11irnlptb55g4rs3hauu1ctjpy, channel=/meta/connect, id=28, connectionType=long-polling}] 
DEBUG 2017-01-03 08:56:53,661 [pool-21-thread-1] com.cumulocity.sdk.client.notification.MessageExchange: starting heartbeat watcher [{clientId=4b11irnlptb55g4rs3hauu1ctjpy, channel=/meta/connect, id=28, connectionType=long-polling}]

推荐答案

我也遇到过同样的情况.显然,在我们的例子中,一些中间盒在服务器发送keepalive数据包之前(默认情况下是10分钟后)丢弃了长时间轮询的TCP连接.

I have experienced the same. Apparently in our case some middlebox dropped the long-polling TCP connection before the server sent the keepalive packet (by default after 10 minutes).

Futhermore,在使用Java参考代理7.26版本进行测试时,我们看到,如果该代理未收到服务器端的keepalive,它将在尝试3次后停止重新建立长轮询连接.尚未检查在以后的版本中是否已更改.

Futhermore, when testing with 7.26 version the Java reference agent we saw that if the agent did not receive the server-side keepalives, it stopped re-establishing the long-polling connection after three attempts. Haven't checked if this has changed in later releases.

我们运行自己的Cumulocity实例,并且能够配置服务器端的keepalive计时器.我们将keepalive计时器设置为3分钟,这解决了该问题.

We run our own instance of Cumulocity, and are able to configure the server side keepalive timer. We set the keepalive timer to 3 minutes which solved the issue.

这篇关于累积-CumulocityLongPollingTransport空闲的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆