Eclipse同上转发连接时不时失败
Eclipse ditto forwarding connection fails from time to time
我已连接 Eclipse hono with Eclipse ditto using the Connectivity api。当我设置它时,它工作正常。但是,一段时间后转发连接失败。当我检索指标时,我得到以下响应:
{
"?": {
"?": {
"type": "connectivity.responses:aggregatedResponse",
"status": 200,
"connectionId": "<connectionId>",
"responsesType": "connectivity.responses:retrieveConnectionMetrics",
"responses": {
"connectivity-7cc7b5dc4c-6nn59": {
"type": "connectivity.responses:retrieveConnectionMetrics",
"status": 200,
"connectionId": "<connectionId>",
"connectionMetrics": {
"connectionStatus": "open",
"connectionStatusDetails": "Connected at 2019-03-19T08:28:53.211Z",
"inConnectionStatusSince": "2019-03-19T08:28:53.211Z",
"clientState": "CONNECTED",
"sourcesMetrics": [],
"targetsMetrics": [
{
"addressMetrics": {
"gw/{{ thing:namespace }}/{{ thing:id }}": {
"status": "failed",
"statusDetails": "Producer closed at 2019-03-19T21:00:16.466Z",
"messageCount": 2048,
"lastMessageAt": "2019-03-19T21:00:05.361Z"
}
},
"publishedMessages": 4070
}
]
}
}
}
}
}
}
我一直在检查上述时间前后的日志,但没有收到任何错误。我在这里发布的日志是上述时间戳 (2019-03-19T21:00:16.466Z) 之前的最后一个和之后的第一个。
2019-03-19 21:00:11,771 DEBUG [ID:AMQP_NO_PREFIX:TelemetrySenderImpl-42872] o.e.d.s.c.m.a.AmqpPublisherActor akka://ditto-cluster/system/sharding/connection/7/tenant_aloxy_consumer-aloxy-forward/pa/$a/c1/amqpPublisherActor3
- Message JmsTextMessage { org.apache.qpid.jms.provider.amqp.message.AmqpJmsTextMessageFacade@9bc051af } sent successfully.
2019-03-19 21:01:11,733 DEBUG [ID:AMQP_NO_PREFIX:TelemetrySenderImpl-42872] o.e.d.s.c.m.a.AmqpClientActor akka://ditto-cluster/system/sharding/connection/1/tenant_aloxy_consumer-aloxy/pa/$a/c1 - Inbound message: JmsInboundMessageDispatch { sequence = 38885, messageId = TelemetrySenderImpl-42873, consumerId = ID:a4925b59-1bb4-4cd8-9151-96ad422c36df:1:1:1 }
虽然所有同上服务的日志级别都设置为调试,但我没有得到任何有用的日志记录。
你们有没有人知道我如何获取日志记录来调查这个问题,或者更好的是,知道问题可能是什么以及如何解决它?
当我删除连接并重新创建它时,一切都再次按预期运行。也许同上可以在后台自动执行此操作?
更新
通过 API 检索连接时,我得到以下响应(包括设置为 true 的 failoverEnabled 属性)。这也表明该连接使用 AMQP 1.0。使用的经纪人是 Enmasse。
{
"?": {
"?": {
"type": "connectivity.responses:retrieveConnection",
"status": 200,
"connection": {
"id": "<connectionId>",
"name": null,
"connectionType": "amqp-10",
"connectionStatus": "open",
"uri": "amqp://<consumer>:<password>@<amqp-host>:5672",
"sources": [],
"targets": [
{
"address": "gw/{{ thing:namespace }}/{{ thing:id }}",
"topics": [
"_/_/things/twin/events?filter=exists(features/alp)"
],
"authorizationContext": [
"<auth-context>"
]
}
],
"clientCount": 1,
"failoverEnabled": true,
"validateCertificates": true,
"processorPoolSize": 5,
"tags": []
}
}
}
}
Eclipse Ditto 如果配置为自动故障转移(请参阅模型中的 https://www.eclipse.org/ditto/basic-connections.html - "failoverEnabled" 属性)。
然而,自您使用的 0.8.0 版以来,这可能有所改进。
Ditto 团队目前正在努力发布 0.9.0-M1 版本,其中将包含改进的重新连接行为。
与 Eclipse Hono 的连接是否会自动重新连接?
您描述 "forwarding connection" 有时会失败。哪种技术(代理等)作为该 gw/{{ thing:namespace }}/{{ thing:id }}
地址的端点?
我已连接 Eclipse hono with Eclipse ditto using the Connectivity api。当我设置它时,它工作正常。但是,一段时间后转发连接失败。当我检索指标时,我得到以下响应:
{
"?": {
"?": {
"type": "connectivity.responses:aggregatedResponse",
"status": 200,
"connectionId": "<connectionId>",
"responsesType": "connectivity.responses:retrieveConnectionMetrics",
"responses": {
"connectivity-7cc7b5dc4c-6nn59": {
"type": "connectivity.responses:retrieveConnectionMetrics",
"status": 200,
"connectionId": "<connectionId>",
"connectionMetrics": {
"connectionStatus": "open",
"connectionStatusDetails": "Connected at 2019-03-19T08:28:53.211Z",
"inConnectionStatusSince": "2019-03-19T08:28:53.211Z",
"clientState": "CONNECTED",
"sourcesMetrics": [],
"targetsMetrics": [
{
"addressMetrics": {
"gw/{{ thing:namespace }}/{{ thing:id }}": {
"status": "failed",
"statusDetails": "Producer closed at 2019-03-19T21:00:16.466Z",
"messageCount": 2048,
"lastMessageAt": "2019-03-19T21:00:05.361Z"
}
},
"publishedMessages": 4070
}
]
}
}
}
}
}
}
我一直在检查上述时间前后的日志,但没有收到任何错误。我在这里发布的日志是上述时间戳 (2019-03-19T21:00:16.466Z) 之前的最后一个和之后的第一个。
2019-03-19 21:00:11,771 DEBUG [ID:AMQP_NO_PREFIX:TelemetrySenderImpl-42872] o.e.d.s.c.m.a.AmqpPublisherActor akka://ditto-cluster/system/sharding/connection/7/tenant_aloxy_consumer-aloxy-forward/pa/$a/c1/amqpPublisherActor3
- Message JmsTextMessage { org.apache.qpid.jms.provider.amqp.message.AmqpJmsTextMessageFacade@9bc051af } sent successfully.
2019-03-19 21:01:11,733 DEBUG [ID:AMQP_NO_PREFIX:TelemetrySenderImpl-42872] o.e.d.s.c.m.a.AmqpClientActor akka://ditto-cluster/system/sharding/connection/1/tenant_aloxy_consumer-aloxy/pa/$a/c1 - Inbound message: JmsInboundMessageDispatch { sequence = 38885, messageId = TelemetrySenderImpl-42873, consumerId = ID:a4925b59-1bb4-4cd8-9151-96ad422c36df:1:1:1 }
虽然所有同上服务的日志级别都设置为调试,但我没有得到任何有用的日志记录。
你们有没有人知道我如何获取日志记录来调查这个问题,或者更好的是,知道问题可能是什么以及如何解决它?
当我删除连接并重新创建它时,一切都再次按预期运行。也许同上可以在后台自动执行此操作?
更新
通过 API 检索连接时,我得到以下响应(包括设置为 true 的 failoverEnabled 属性)。这也表明该连接使用 AMQP 1.0。使用的经纪人是 Enmasse。
{
"?": {
"?": {
"type": "connectivity.responses:retrieveConnection",
"status": 200,
"connection": {
"id": "<connectionId>",
"name": null,
"connectionType": "amqp-10",
"connectionStatus": "open",
"uri": "amqp://<consumer>:<password>@<amqp-host>:5672",
"sources": [],
"targets": [
{
"address": "gw/{{ thing:namespace }}/{{ thing:id }}",
"topics": [
"_/_/things/twin/events?filter=exists(features/alp)"
],
"authorizationContext": [
"<auth-context>"
]
}
],
"clientCount": 1,
"failoverEnabled": true,
"validateCertificates": true,
"processorPoolSize": 5,
"tags": []
}
}
}
}
Eclipse Ditto 如果配置为自动故障转移(请参阅模型中的 https://www.eclipse.org/ditto/basic-connections.html - "failoverEnabled" 属性)。 然而,自您使用的 0.8.0 版以来,这可能有所改进。 Ditto 团队目前正在努力发布 0.9.0-M1 版本,其中将包含改进的重新连接行为。
与 Eclipse Hono 的连接是否会自动重新连接?
您描述 "forwarding connection" 有时会失败。哪种技术(代理等)作为该 gw/{{ thing:namespace }}/{{ thing:id }}
地址的端点?