使用mqtt向Apache IoTDB插入数据时,为什么系统报unrecoverable_error?

问题描述 投票:0回答:1

我目前使用mqtt桥接数据到Apache IoTDB,并使用http规则操作方法连接到IoTDB的RESTful v1接口。我觉得设置没问题,但是为什么我不能成功插入数据呢?规则可以命中,但插入操作失败。日志记录报告为

2024-04-23T10:39:34.316000+08:00 [error] msg: unrecoverable_error, mfa: emqx_resource_buffer_worker:handle_query_result_pure/3(929), id: <<"action:http:iotDB_RESTful:connector:http:connector_iotDB_RESTful">>, reason: {unrecoverable_error,#{body => <<"<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=ISO-8859-1\"/>\n<title>
。有谁知道是什么原因吗?

time-series apache-iotdb iotdb
1个回答
0
投票

导致此失败的原因看起来是请求的参数没有设置为

json
。如果您使用v1版本的RESTful接口连接Apache IoTDB,演示接口参数应该是这样的:
"dataTypes" :["INT32"],"deviceId" :"root.BFGDGS.DATA","isAligned":"false", "measurements":["JZIS EACO0C005ROV0405 US"],"timestamps":[1709105517730],"values":[[40]]}

请注意,

dataTypes
参数不能省略(这通常是您收到错误的原因,因此您可以特别检查这一点)。

© www.soinside.com 2019 - 2024. All rights reserved.