BladeX 物联网平台/07架构升级/04后端升级(Boot版) TDengine报错

IOT 未结 1 116
whale
whale 剑童 2024-12-13 17:10
悬赏:5

一、该问题的重现步骤是什么?

1. 启动ServerApplication

2. 启动BrokerApplication

3. 启动DeviceSimulatorApplication


二、你期待的结果是什么?实际看到的又是什么?

期待:没有Error

实际:报错


三、你正在使用的是什么产品,什么版本?在什么操作系统上?

BladeX_Links(v1.2.0.release) + BladeX_Boot(Date:   Wed Dec 4 18:24:59 2024 +0800 :zap: 优化启动类配置

ubuntu20


四、请提供详细的错误堆栈信息,这很重要。

2024-12-13 16:53:03.969 ERROR 461033 --- [pool-2-thread-1] o.s.iot.core.task.BaseBatchTask          : 批量消费失败,数据可能会丢失

org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [INSERT INTO `device_event_jkerjk97oub_27oy29bmmln` USING `device_event` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `identifier`, `eventName`, `eventType`) VALUES (?, ?, ?, ?, ?) `device_command_jkerjk97oub_27oy29bmmln` USING `device_command` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `input`, `identifier`, `commandName`) VALUES (?, ?, ?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?);]; SQL state []; error code [9731]; TDengine ERROR (0x2603): sql: INSERT INTO `device_event_jkerjk97oub_27oy29bmmln` USING `device_event` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `identifier`, `eventName`, `eventType`) VALUES (1734079983024, '{"BatteryLevel":20}', 'LowBatteyEvent', '电量低事件', 'alert') `device_command_jkerjk97oub_27oy29bmmln` USING `device_command` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `input`, `identifier`, `commandName`) VALUES (1734079983024, '{"RebootTime":1734079980424}', '{"RebootStatus":"true"}', 'Reboot', '重启服务') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079983024, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post', '{"id":"14ef0367884102b3cbf2130908e6ddb7","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079983024, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/service/Reboot', '{"id":"6fe8fecebfcda67b153bd635c1d8a390","version":"1.0","params":{"output":"{\"RebootTime\":1734079980424}","input":"{\"RebootStatus\":\"true\"}","commandName":"重启服务"}}') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079983024, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/LowBatteyEvent/post', '{"id":"2727210d93de86a21d03d188812b786e","version":"1.0","params":{"output":"{\"BatteryLevel\":20}","eventName":"电量低事件","eventType":"alert"}}') `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (1734079983025, '1', 20) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079983025, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post', '{"id":"14ef0367884102b3cbf2130908e6ddb7","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079983026, '/blade/ext/ntp/JkerjK97oub/27OY29BMmLn/response', '{"deviceSendTime":"1734079980439","serverRecvTime":"1734079983024","serverSendTime":"1734079983024"}') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079983026, '/blade/ext/ntp/JkerjK97oub/27OY29BMmLn/request', '{"deviceSendTime":"1734079980439"}');, desc: Table does not exist
	at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1549)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:677)
	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:970)
	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1014)
	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1024)
	at org.springblade.iot.tsdb.tdengine.dao.TDEngineTemplate.saveBatch(TDEngineTemplate.java:84)
	at org.springblade.iot.core.task.BaseBatchTask.consumerQueueData(BaseBatchTask.java:72)
	at org.springblade.iot.core.task.BaseBatchTask$1.run(BaseBatchTask.java:53)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.sql.SQLException: TDengine ERROR (0x2603): sql: INSERT INTO `device_event_jkerjk97oub_27oy29bmmln` USING `device_event` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `identifier`, `eventName`, `eventType`) VALUES (1734079983024, '{"BatteryLevel":20}', 'LowBatteyEvent', '电量低事件', 'alert') `device_command_jkerjk97oub_27oy29bmmln` USING `device_command` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `input`, `identifier`, `commandName`) VALUES (1734079983024, '{"RebootTime":1734079980424}', '{"RebootStatus":"true"}', 'Reboot', '重启服务') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079983024, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post', '{"id":"14ef0367884102b3cbf2130908e6ddb7","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079983024, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/service/Reboot', '{"id":"6fe8fecebfcda67b153bd635c1d8a390","version":"1.0","params":{"output":"{\"RebootTime\":1734079980424}","input":"{\"RebootStatus\":\"true\"}","commandName":"重启服务"}}') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079983024, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/LowBatteyEvent/post', '{"id":"2727210d93de86a21d03d188812b786e","version":"1.0","params":{"output":"{\"BatteryLevel\":20}","eventName":"电量低事件","eventType":"alert"}}') `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (1734079983025, '1', 20) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079983025, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post', '{"id":"14ef0367884102b3cbf2130908e6ddb7","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079983026, '/blade/ext/ntp/JkerjK97oub/27OY29BMmLn/response', '{"deviceSendTime":"1734079980439","serverRecvTime":"1734079983024","serverSendTime":"1734079983024"}') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079983026, '/blade/ext/ntp/JkerjK97oub/27OY29BMmLn/request', '{"deviceSendTime":"1734079980439"}');, desc: Table does not exist
	at com.taosdata.jdbc.TSDBError.createSQLException(TSDBError.java:95)
	at com.taosdata.jdbc.rs.RestfulStatement.execute(RestfulStatement.java:97)
	at com.taosdata.jdbc.rs.RestfulStatement.execute(RestfulStatement.java:78)
	at com.taosdata.jdbc.rs.RestfulStatement.executeUpdate(RestfulStatement.java:56)
	at com.taosdata.jdbc.rs.RestfulPreparedStatement.executeUpdate(RestfulPreparedStatement.java:59)
	at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeUpdate(DruidPooledPreparedStatement.java:241)
	at org.springframework.jdbc.core.JdbcTemplate.lambda$update$2(JdbcTemplate.java:975)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:658)
	... 12 common frames omitted

2024-12-13 16:53:05.976 ERROR 461033 --- [pool-2-thread-1] o.s.iot.core.task.BaseBatchTask          : 批量消费失败,数据可能会丢失

org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_command_jkerjk97oub_27oy29bmmln` USING `device_command` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `input`, `identifier`, `commandName`) VALUES (?, ?, ?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_event_jkerjk97oub_27oy29bmmln` USING `device_event` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `identifier`, `eventName`, `eventType`) VALUES (?, ?, ?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?);]; SQL state []; error code [9731]; TDengine ERROR (0x2603): sql: INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079985969, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post', '{"id":"14ef0367884102b3cbf2130908e6ddb7","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}') `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (1734079985969, '1', 20) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079985969, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post', '{"id":"14ef0367884102b3cbf2130908e6ddb7","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}') `device_command_jkerjk97oub_27oy29bmmln` USING `device_command` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `input`, `identifier`, `commandName`) VALUES (1734079985969, '{"RebootTime":1734079980424}', '{"RebootStatus":"true"}', 'Reboot', '重启服务') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079985969, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/service/Reboot', '{"id":"6fe8fecebfcda67b153bd635c1d8a390","version":"1.0","params":{"output":"{\"RebootTime\":1734079980424}","input":"{\"RebootStatus\":\"true\"}","commandName":"重启服务"}}') `device_event_jkerjk97oub_27oy29bmmln` USING `device_event` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `identifier`, `eventName`, `eventType`) VALUES (1734079985969, '{"BatteryLevel":20}', 'LowBatteyEvent', '电量低事件', 'alert') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079985969, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/LowBatteyEvent/post', '{"id":"2727210d93de86a21d03d188812b786e","version":"1.0","params":{"output":"{\"BatteryLevel\":20}","eventName":"电量低事件","eventType":"alert"}}');, desc: Table does not exist
	at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1549)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:677)
	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:970)
	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1014)
	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1024)
	at org.springblade.iot.tsdb.tdengine.dao.TDEngineTemplate.saveBatch(TDEngineTemplate.java:84)
	at org.springblade.iot.core.task.BaseBatchTask.consumerQueueData(BaseBatchTask.java:72)
	at org.springblade.iot.core.task.BaseBatchTask$1.run(BaseBatchTask.java:53)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.sql.SQLException: TDengine ERROR (0x2603): sql: INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079985969, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post', '{"id":"14ef0367884102b3cbf2130908e6ddb7","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}') `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (1734079985969, '1', 20) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079985969, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post', '{"id":"14ef0367884102b3cbf2130908e6ddb7","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}') `device_command_jkerjk97oub_27oy29bmmln` USING `device_command` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `input`, `identifier`, `commandName`) VALUES (1734079985969, '{"RebootTime":1734079980424}', '{"RebootStatus":"true"}', 'Reboot', '重启服务') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079985969, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/service/Reboot', '{"id":"6fe8fecebfcda67b153bd635c1d8a390","version":"1.0","params":{"output":"{\"RebootTime\":1734079980424}","input":"{\"RebootStatus\":\"true\"}","commandName":"重启服务"}}') `device_event_jkerjk97oub_27oy29bmmln` USING `device_event` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `identifier`, `eventName`, `eventType`) VALUES (1734079985969, '{"BatteryLevel":20}', 'LowBatteyEvent', '电量低事件', 'alert') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079985969, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/LowBatteyEvent/post', '{"id":"2727210d93de86a21d03d188812b786e","version":"1.0","params":{"output":"{\"BatteryLevel\":20}","eventName":"电量低事件","eventType":"alert"}}');, desc: Table does not exist
	at com.taosdata.jdbc.TSDBError.createSQLException(TSDBError.java:95)
	at com.taosdata.jdbc.rs.RestfulStatement.execute(RestfulStatement.java:97)
	at com.taosdata.jdbc.rs.RestfulStatement.execute(RestfulStatement.java:78)
	at com.taosdata.jdbc.rs.RestfulStatement.executeUpdate(RestfulStatement.java:56)
	at com.taosdata.jdbc.rs.RestfulPreparedStatement.executeUpdate(RestfulPreparedStatement.java:59)
	at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeUpdate(DruidPooledPreparedStatement.java:241)
	at org.springframework.jdbc.core.JdbcTemplate.lambda$update$2(JdbcTemplate.java:975)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:658)
	... 12 common frames omitted

2024-12-13 16:53:06.984  INFO 461033 --- [pool-2-thread-1] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine saveBatch sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734079985970, /blade/ext/ntp/JkerjK97oub/27OY29BMmLn/response, {"deviceSendTime":"1734079980439","serverRecvTime":"1734079985970","serverSendTime":"1734079985970"}, 1734079985970, /blade/ext/ntp/JkerjK97oub/27OY29BMmLn/request, {"deviceSendTime":"1734079980439"}] updated count:1
2024-12-13 16:53:08.997 ERROR 461033 --- [pool-2-thread-1] o.s.iot.core.task.BaseBatchTask          : 批量消费失败,数据可能会丢失

org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_command_jkerjk97oub_27oy29bmmln` USING `device_command` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `input`, `identifier`, `commandName`) VALUES (?, ?, ?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_event_jkerjk97oub_27oy29bmmln` USING `device_event` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `identifier`, `eventName`, `eventType`) VALUES (?, ?, ?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?);]; SQL state []; error code [9731]; TDengine ERROR (0x2603): sql: INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079988963, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post', '{"id":"14ef0367884102b3cbf2130908e6ddb7","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}') `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (1734079988963, '1', 20) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079988963, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post', '{"id":"14ef0367884102b3cbf2130908e6ddb7","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}') `device_command_jkerjk97oub_27oy29bmmln` USING `device_command` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `input`, `identifier`, `commandName`) VALUES (1734079988964, '{"RebootTime":1734079980424}', '{"RebootStatus":"true"}', 'Reboot', '重启服务') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079988964, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/service/Reboot', '{"id":"6fe8fecebfcda67b153bd635c1d8a390","version":"1.0","params":{"output":"{\"RebootTime\":1734079980424}","input":"{\"RebootStatus\":\"true\"}","commandName":"重启服务"}}') `device_event_jkerjk97oub_27oy29bmmln` USING `device_event` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `identifier`, `eventName`, `eventType`) VALUES (1734079988965, '{"BatteryLevel":20}', 'LowBatteyEvent', '电量低事件', 'alert') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079988965, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/LowBatteyEvent/post', '{"id":"2727210d93de86a21d03d188812b786e","version":"1.0","params":{"output":"{\"BatteryLevel\":20}","eventName":"电量低事件","eventType":"alert"}}') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079988966, '/blade/ext/ntp/JkerjK97oub/27OY29BMmLn/response', '{"deviceSendTime":"1734079980439","serverRecvTime":"1734079988965","serverSendTime":"1734079988965"}') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079988966, '/blade/ext/ntp/JkerjK97oub/27OY29BMmLn/request', '{"deviceSendTime":"1734079980439"}');, desc: Table does not exist
	at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1549)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:677)
	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:970)
	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1014)
	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1024)
	at org.springblade.iot.tsdb.tdengine.dao.TDEngineTemplate.saveBatch(TDEngineTemplate.java:84)
	at org.springblade.iot.core.task.BaseBatchTask.consumerQueueData(BaseBatchTask.java:72)
	at org.springblade.iot.core.task.BaseBatchTask$1.run(BaseBatchTask.java:53)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.sql.SQLException: TDengine ERROR (0x2603): sql: INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079988963, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post', '{"id":"14ef0367884102b3cbf2130908e6ddb7","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}') `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (1734079988963, '1', 20) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079988963, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post', '{"id":"14ef0367884102b3cbf2130908e6ddb7","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}') `device_command_jkerjk97oub_27oy29bmmln` USING `device_command` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `input`, `identifier`, `commandName`) VALUES (1734079988964, '{"RebootTime":1734079980424}', '{"RebootStatus":"true"}', 'Reboot', '重启服务') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079988964, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/service/Reboot', '{"id":"6fe8fecebfcda67b153bd635c1d8a390","version":"1.0","params":{"output":"{\"RebootTime\":1734079980424}","input":"{\"RebootStatus\":\"true\"}","commandName":"重启服务"}}') `device_event_jkerjk97oub_27oy29bmmln` USING `device_event` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `identifier`, `eventName`, `eventType`) VALUES (1734079988965, '{"BatteryLevel":20}', 'LowBatteyEvent', '电量低事件', 'alert') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079988965, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/LowBatteyEvent/post', '{"id":"2727210d93de86a21d03d188812b786e","version":"1.0","params":{"output":"{\"BatteryLevel\":20}","eventName":"电量低事件","eventType":"alert"}}') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079988966, '/blade/ext/ntp/JkerjK97oub/27OY29BMmLn/response', '{"deviceSendTime":"1734079980439","serverRecvTime":"1734079988965","serverSendTime":"1734079988965"}') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079988966, '/blade/ext/ntp/JkerjK97oub/27OY29BMmLn/request', '{"deviceSendTime":"1734079980439"}');, desc: Table does not exist
	at com.taosdata.jdbc.TSDBError.createSQLException(TSDBError.java:95)
	at com.taosdata.jdbc.rs.RestfulStatement.execute(RestfulStatement.java:97)
	at com.taosdata.jdbc.rs.RestfulStatement.execute(RestfulStatement.java:78)
	at com.taosdata.jdbc.rs.RestfulStatement.executeUpdate(RestfulStatement.java:56)
	at com.taosdata.jdbc.rs.RestfulPreparedStatement.executeUpdate(RestfulPreparedStatement.java:59)
	at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeUpdate(DruidPooledPreparedStatement.java:241)
	at org.springframework.jdbc.core.JdbcTemplate.lambda$update$2(JdbcTemplate.java:975)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:658)
	... 12 common frames omitted

2024-12-13 16:53:12.010 ERROR 461033 --- [pool-2-thread-1] o.s.iot.core.task.BaseBatchTask          : 批量消费失败,数据可能会丢失

org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_command_jkerjk97oub_27oy29bmmln` USING `device_command` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `input`, `identifier`, `commandName`) VALUES (?, ?, ?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_event_jkerjk97oub_27oy29bmmln` USING `device_event` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `identifier`, `eventName`, `eventType`) VALUES (?, ?, ?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?);]; SQL state []; error code [9731]; TDengine ERROR (0x2603): sql: INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079991966, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post', '{"id":"14ef0367884102b3cbf2130908e6ddb7","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}') `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (1734079991966, '1', 20) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079991966, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post', '{"id":"14ef0367884102b3cbf2130908e6ddb7","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}') `device_command_jkerjk97oub_27oy29bmmln` USING `device_command` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `input`, `identifier`, `commandName`) VALUES (1734079991967, '{"RebootTime":1734079980424}', '{"RebootStatus":"true"}', 'Reboot', '重启服务') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079991967, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/service/Reboot', '{"id":"6fe8fecebfcda67b153bd635c1d8a390","version":"1.0","params":{"output":"{\"RebootTime\":1734079980424}","input":"{\"RebootStatus\":\"true\"}","commandName":"重启服务"}}') `device_event_jkerjk97oub_27oy29bmmln` USING `device_event` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `identifier`, `eventName`, `eventType`) VALUES (1734079991969, '{"BatteryLevel":20}', 'LowBatteyEvent', '电量低事件', 'alert') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079991969, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/LowBatteyEvent/post', '{"id":"2727210d93de86a21d03d188812b786e","version":"1.0","params":{"output":"{\"BatteryLevel\":20}","eventName":"电量低事件","eventType":"alert"}}') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079991970, '/blade/ext/ntp/JkerjK97oub/27OY29BMmLn/response', '{"deviceSendTime":"1734079980439","serverRecvTime":"1734079991969","serverSendTime":"1734079991969"}') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079991970, '/blade/ext/ntp/JkerjK97oub/27OY29BMmLn/request', '{"deviceSendTime":"1734079980439"}');, desc: Table does not exist
	at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1549)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:677)
	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:970)
	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1014)
	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1024)
	at org.springblade.iot.tsdb.tdengine.dao.TDEngineTemplate.saveBatch(TDEngineTemplate.java:84)
	at org.springblade.iot.core.task.BaseBatchTask.consumerQueueData(BaseBatchTask.java:72)
	at org.springblade.iot.core.task.BaseBatchTask$1.run(BaseBatchTask.java:53)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.sql.SQLException: TDengine ERROR (0x2603): sql: INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079991966, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post', '{"id":"14ef0367884102b3cbf2130908e6ddb7","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}') `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (1734079991966, '1', 20) `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079991966, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post', '{"id":"14ef0367884102b3cbf2130908e6ddb7","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}') `device_command_jkerjk97oub_27oy29bmmln` USING `device_command` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `input`, `identifier`, `commandName`) VALUES (1734079991967, '{"RebootTime":1734079980424}', '{"RebootStatus":"true"}', 'Reboot', '重启服务') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079991967, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/service/Reboot', '{"id":"6fe8fecebfcda67b153bd635c1d8a390","version":"1.0","params":{"output":"{\"RebootTime\":1734079980424}","input":"{\"RebootStatus\":\"true\"}","commandName":"重启服务"}}') `device_event_jkerjk97oub_27oy29bmmln` USING `device_event` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `identifier`, `eventName`, `eventType`) VALUES (1734079991969, '{"BatteryLevel":20}', 'LowBatteyEvent', '电量低事件', 'alert') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079991969, '/blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/LowBatteyEvent/post', '{"id":"2727210d93de86a21d03d188812b786e","version":"1.0","params":{"output":"{\"BatteryLevel\":20}","eventName":"电量低事件","eventType":"alert"}}') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (1734079991970, '/blade/ext/ntp/JkerjK97oub/27OY29BMmLn/response', '{"deviceSendTime":"1734079980439","serverRecvTime":"1734079991969","serverSendTime":"1734079991969"}') `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS (          
        
1条回答
  • 2024-12-13 17:20

    td的配置发出来看下,把批量关了再看看

    作者追问:2024-12-16 10:43

    我把enable-batch全部设为false了,现在没有之前的“批量消费失败,数据可能会丢失”的报错,但是又有新的问题。


    2024-12-16 10:10:53.071  INFO 886929 --- [   biz-worker-5] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315053069, /blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post, {"id":"72a918e11fccae5c8e5229a69ef8b1af","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}] updated count:1
    2024-12-16 10:10:53.971  INFO 886929 --- [   biz-worker-7] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_command_jkerjk97oub_27oy29bmmln` USING `device_command` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `input`, `commandName`, `identifier`) VALUES (?, ?, ?, ?, ?); paras:[1734315053966, {"RebootTime":1734315050945}, {"RebootStatus":"true"}, 重启服务, Reboot] updated count:1
    2024-12-16 10:10:53.973  INFO 886929 --- [   biz-worker-9] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_event_jkerjk97oub_27oy29bmmln` USING `device_event` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `eventName`, `eventType`, `identifier`) VALUES (?, ?, ?, ?, ?); paras:[1734315053967, {"BatteryLevel":20}, 电量低事件, alert, LowBatteyEvent] updated count:1
    2024-12-16 10:10:53.973  INFO 886929 --- [   biz-worker-7] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315053971, /blade/sys/JkerjK97oub/27OY29BMmLn/thing/service/Reboot, {"id":"7a22cc85c04865a6156f22cd9f916dab","version":"1.0","params":{"output":"{\"RebootTime\":1734315050945}","input":"{\"RebootStatus\":\"true\"}","commandName":"重启服务"}}] updated count:1
    2024-12-16 10:10:53.975  INFO 886929 --- [   biz-worker-9] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315053973, /blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/LowBatteyEvent/post, {"id":"e1ba74fa36a00ad3c89d42a486846a04","version":"1.0","params":{"output":"{\"BatteryLevel\":20}","eventName":"电量低事件","eventType":"alert"}}] updated count:1
    2024-12-16 10:10:53.982  INFO 886929 --- [  biz-worker-11] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315053980, /blade/ext/ntp/JkerjK97oub/27OY29BMmLn/response, {"deviceSendTime":"1734315050964","serverRecvTime":"1734315053970","serverSendTime":"1734315053970"}] updated count:1
    2024-12-16 10:10:53.983  INFO 886929 --- [  biz-worker-11] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315053982, /blade/ext/ntp/JkerjK97oub/27OY29BMmLn/request, {"deviceSendTime":"1734315050964"}] updated count:1
    2024-12-16 10:10:55.970  INFO 886929 --- [  biz-worker-13] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315055965, /blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post, {"id":"72a918e11fccae5c8e5229a69ef8b1af","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}] updated count:1
    2024-12-16 10:10:55.974 ERROR 886929 --- [  biz-worker-13] o.s.m.b.d.f.e.EventPropertyPostFunction  : req id:72a918e11fccae5c8e5229a69ef8b1af property post error
    
    org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [INSERT INTO `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (?, ?, ?);]; SQL state []; error code [9731]; TDengine ERROR (0x2603): sql: INSERT INTO `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (1734315055971, '1', 20);, desc: Table does not exist
    	at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1549)
    	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:677)
    	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:970)
    	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1014)
    	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1024)
    	at org.springblade.iot.tsdb.tdengine.dao.TDEngineTemplate.saveDeviceData(TDEngineTemplate.java:116)
    	at org.springblade.iot.tsdb.tdengine.dao.TDEngineTemplate.saveDeviceData(TDEngineTemplate.java:100)
    	at org.springblade.iot.tsdb.tdengine.dao.TDEngineBatchTemplate.saveDeviceData(TDEngineBatchTemplate.java:35)
    	at org.springblade.iot.tsdb.tdengine.impl.DeviceDataServiceImpl.saveDeviceProperty(DeviceDataServiceImpl.java:33)
    	at org.springblade.mqtt.broker.data.function.event.EventPropertyPostFunction.execute(EventPropertyPostFunction.java:77)
    	at org.springblade.mqtt.broker.data.function.event.EventPropertyPostFunction.execute(EventPropertyPostFunction.java:44)
    	at org.springblade.mqtt.broker.data.listener.BladeMqttFunctionMessageListener.execDeviceFunction(BladeMqttFunctionMessageListener.java:104)
    	at org.springblade.mqtt.broker.data.listener.BladeMqttFunctionMessageListener.execMqttFunction(BladeMqttFunctionMessageListener.java:79)
    	at org.springblade.mqtt.broker.data.listener.BladeMqttFunctionMessageListener.lambda$onMessage$0(BladeMqttFunctionMessageListener.java:69)
    	at org.springblade.core.tenant.TenantUtil.use(TenantUtil.java:104)
    	at org.springblade.mqtt.broker.data.listener.BladeMqttFunctionMessageListener.onMessage(BladeMqttFunctionMessageListener.java:68)
    	at net.dreamlu.iot.mqtt.core.server.support.DefaultMqttServerProcessor.lambda$invokeListenerForPublish$4(DefaultMqttServerProcessor.java:503)
    	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    	at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264)
    	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    	at java.base/java.lang.Thread.run(Thread.java:840)
    Caused by: java.sql.SQLException: TDengine ERROR (0x2603): sql: INSERT INTO `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (1734315055971, '1', 20);, desc: Table does not exist
    	at com.taosdata.jdbc.TSDBError.createSQLException(TSDBError.java:95)
    	at com.taosdata.jdbc.rs.RestfulStatement.execute(RestfulStatement.java:97)
    	at com.taosdata.jdbc.rs.RestfulStatement.execute(RestfulStatement.java:78)
    	at com.taosdata.jdbc.rs.RestfulStatement.executeUpdate(RestfulStatement.java:56)
    	at com.taosdata.jdbc.rs.RestfulPreparedStatement.executeUpdate(RestfulPreparedStatement.java:59)
    	at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeUpdate(DruidPooledPreparedStatement.java:241)
    	at org.springframework.jdbc.core.JdbcTemplate.lambda$update$2(JdbcTemplate.java:975)
    	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:658)
    	... 21 common frames omitted
    
    2024-12-16 10:10:55.976  INFO 886929 --- [  biz-worker-13] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315055974, /blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post, {"id":"72a918e11fccae5c8e5229a69ef8b1af","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}] updated count:1
    2024-12-16 10:10:56.970  INFO 886929 --- [  biz-worker-15] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_command_jkerjk97oub_27oy29bmmln` USING `device_command` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `input`, `commandName`, `identifier`) VALUES (?, ?, ?, ?, ?); paras:[1734315056965, {"RebootTime":1734315050945}, {"RebootStatus":"true"}, 重启服务, Reboot] updated count:1
    2024-12-16 10:10:56.971  INFO 886929 --- [  biz-worker-17] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_event_jkerjk97oub_27oy29bmmln` USING `device_event` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `eventName`, `eventType`, `identifier`) VALUES (?, ?, ?, ?, ?); paras:[1734315056967, {"BatteryLevel":20}, 电量低事件, alert, LowBatteyEvent] updated count:1
    2024-12-16 10:10:56.972  INFO 886929 --- [  biz-worker-19] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315056969, /blade/ext/ntp/JkerjK97oub/27OY29BMmLn/response, {"deviceSendTime":"1734315050964","serverRecvTime":"1734315056967","serverSendTime":"1734315056967"}] updated count:1
    2024-12-16 10:10:56.973  INFO 886929 --- [  biz-worker-19] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315056972, /blade/ext/ntp/JkerjK97oub/27OY29BMmLn/request, {"deviceSendTime":"1734315050964"}] updated count:1
    2024-12-16 10:10:56.973  INFO 886929 --- [  biz-worker-15] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315056970, /blade/sys/JkerjK97oub/27OY29BMmLn/thing/service/Reboot, {"id":"7a22cc85c04865a6156f22cd9f916dab","version":"1.0","params":{"output":"{\"RebootTime\":1734315050945}","input":"{\"RebootStatus\":\"true\"}","commandName":"重启服务"}}] updated count:1
    2024-12-16 10:10:56.974  INFO 886929 --- [  biz-worker-17] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315056971, /blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/LowBatteyEvent/post, {"id":"e1ba74fa36a00ad3c89d42a486846a04","version":"1.0","params":{"output":"{\"BatteryLevel\":20}","eventName":"电量低事件","eventType":"alert"}}] updated count:1
    2024-12-16 10:10:58.969  INFO 886929 --- [  biz-worker-21] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315058964, /blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post, {"id":"72a918e11fccae5c8e5229a69ef8b1af","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}] updated count:1
    2024-12-16 10:10:58.973 ERROR 886929 --- [  biz-worker-21] o.s.m.b.d.f.e.EventPropertyPostFunction  : req id:72a918e11fccae5c8e5229a69ef8b1af property post error
    
    org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [INSERT INTO `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (?, ?, ?);]; SQL state []; error code [9731]; TDengine ERROR (0x2603): sql: INSERT INTO `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (1734315058970, '1', 20);, desc: Table does not exist
    	at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1549)
    	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:677)
    	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:970)
    	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1014)
    	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1024)
    	at org.springblade.iot.tsdb.tdengine.dao.TDEngineTemplate.saveDeviceData(TDEngineTemplate.java:116)
    	at org.springblade.iot.tsdb.tdengine.dao.TDEngineTemplate.saveDeviceData(TDEngineTemplate.java:100)
    	at org.springblade.iot.tsdb.tdengine.dao.TDEngineBatchTemplate.saveDeviceData(TDEngineBatchTemplate.java:35)
    	at org.springblade.iot.tsdb.tdengine.impl.DeviceDataServiceImpl.saveDeviceProperty(DeviceDataServiceImpl.java:33)
    	at org.springblade.mqtt.broker.data.function.event.EventPropertyPostFunction.execute(EventPropertyPostFunction.java:77)
    	at org.springblade.mqtt.broker.data.function.event.EventPropertyPostFunction.execute(EventPropertyPostFunction.java:44)
    	at org.springblade.mqtt.broker.data.listener.BladeMqttFunctionMessageListener.execDeviceFunction(BladeMqttFunctionMessageListener.java:104)
    	at org.springblade.mqtt.broker.data.listener.BladeMqttFunctionMessageListener.execMqttFunction(BladeMqttFunctionMessageListener.java:79)
    	at org.springblade.mqtt.broker.data.listener.BladeMqttFunctionMessageListener.lambda$onMessage$0(BladeMqttFunctionMessageListener.java:69)
    	at org.springblade.core.tenant.TenantUtil.use(TenantUtil.java:104)
    	at org.springblade.mqtt.broker.data.listener.BladeMqttFunctionMessageListener.onMessage(BladeMqttFunctionMessageListener.java:68)
    	at net.dreamlu.iot.mqtt.core.server.support.DefaultMqttServerProcessor.lambda$invokeListenerForPublish$4(DefaultMqttServerProcessor.java:503)
    	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    	at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264)
    	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    	at java.base/java.lang.Thread.run(Thread.java:840)
    Caused by: java.sql.SQLException: TDengine ERROR (0x2603): sql: INSERT INTO `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (1734315058970, '1', 20);, desc: Table does not exist
    	at com.taosdata.jdbc.TSDBError.createSQLException(TSDBError.java:95)
    	at com.taosdata.jdbc.rs.RestfulStatement.execute(RestfulStatement.java:97)
    	at com.taosdata.jdbc.rs.RestfulStatement.execute(RestfulStatement.java:78)
    	at com.taosdata.jdbc.rs.RestfulStatement.executeUpdate(RestfulStatement.java:56)
    	at com.taosdata.jdbc.rs.RestfulPreparedStatement.executeUpdate(RestfulPreparedStatement.java:59)
    	at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeUpdate(DruidPooledPreparedStatement.java:241)
    	at org.springframework.jdbc.core.JdbcTemplate.lambda$update$2(JdbcTemplate.java:975)
    	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:658)
    	... 21 common frames omitted
    
    2024-12-16 10:10:58.975  INFO 886929 --- [  biz-worker-21] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315058974, /blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post, {"id":"72a918e11fccae5c8e5229a69ef8b1af","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}] updated count:1
    2024-12-16 10:10:59.970  INFO 886929 --- [  biz-worker-23] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_command_jkerjk97oub_27oy29bmmln` USING `device_command` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `input`, `commandName`, `identifier`) VALUES (?, ?, ?, ?, ?); paras:[1734315059965, {"RebootTime":1734315050945}, {"RebootStatus":"true"}, 重启服务, Reboot] updated count:1
    2024-12-16 10:10:59.970  INFO 886929 --- [  biz-worker-25] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_event_jkerjk97oub_27oy29bmmln` USING `device_event` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `eventName`, `eventType`, `identifier`) VALUES (?, ?, ?, ?, ?); paras:[1734315059965, {"BatteryLevel":20}, 电量低事件, alert, LowBatteyEvent] updated count:1
    2024-12-16 10:10:59.971  INFO 886929 --- [  biz-worker-27] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315059967, /blade/ext/ntp/JkerjK97oub/27OY29BMmLn/response, {"deviceSendTime":"1734315050964","serverRecvTime":"1734315059967","serverSendTime":"1734315059967"}] updated count:1
    2024-12-16 10:10:59.972  INFO 886929 --- [  biz-worker-23] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315059970, /blade/sys/JkerjK97oub/27OY29BMmLn/thing/service/Reboot, {"id":"7a22cc85c04865a6156f22cd9f916dab","version":"1.0","params":{"output":"{\"RebootTime\":1734315050945}","input":"{\"RebootStatus\":\"true\"}","commandName":"重启服务"}}] updated count:1
    2024-12-16 10:10:59.972  INFO 886929 --- [  biz-worker-25] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315059970, /blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/LowBatteyEvent/post, {"id":"e1ba74fa36a00ad3c89d42a486846a04","version":"1.0","params":{"output":"{\"BatteryLevel\":20}","eventName":"电量低事件","eventType":"alert"}}] updated count:1
    2024-12-16 10:10:59.972  INFO 886929 --- [  biz-worker-27] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315059971, /blade/ext/ntp/JkerjK97oub/27OY29BMmLn/request, {"deviceSendTime":"1734315050964"}] updated count:1
    2024-12-16 10:11:01.970  INFO 886929 --- [  biz-worker-29] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315061965, /blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post, {"id":"72a918e11fccae5c8e5229a69ef8b1af","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}] updated count:1
    2024-12-16 10:11:01.973 ERROR 886929 --- [  biz-worker-29] o.s.m.b.d.f.e.EventPropertyPostFunction  : req id:72a918e11fccae5c8e5229a69ef8b1af property post error
    
    org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [INSERT INTO `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (?, ?, ?);]; SQL state []; error code [9731]; TDengine ERROR (0x2603): sql: INSERT INTO `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (1734315061971, '1', 20);, desc: Table does not exist
    	at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1549)
    	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:677)
    	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:970)
    	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1014)
    	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1024)
    	at org.springblade.iot.tsdb.tdengine.dao.TDEngineTemplate.saveDeviceData(TDEngineTemplate.java:116)
    	at org.springblade.iot.tsdb.tdengine.dao.TDEngineTemplate.saveDeviceData(TDEngineTemplate.java:100)
    	at org.springblade.iot.tsdb.tdengine.dao.TDEngineBatchTemplate.saveDeviceData(TDEngineBatchTemplate.java:35)
    	at org.springblade.iot.tsdb.tdengine.impl.DeviceDataServiceImpl.saveDeviceProperty(DeviceDataServiceImpl.java:33)
    	at org.springblade.mqtt.broker.data.function.event.EventPropertyPostFunction.execute(EventPropertyPostFunction.java:77)
    	at org.springblade.mqtt.broker.data.function.event.EventPropertyPostFunction.execute(EventPropertyPostFunction.java:44)
    	at org.springblade.mqtt.broker.data.listener.BladeMqttFunctionMessageListener.execDeviceFunction(BladeMqttFunctionMessageListener.java:104)
    	at org.springblade.mqtt.broker.data.listener.BladeMqttFunctionMessageListener.execMqttFunction(BladeMqttFunctionMessageListener.java:79)
    	at org.springblade.mqtt.broker.data.listener.BladeMqttFunctionMessageListener.lambda$onMessage$0(BladeMqttFunctionMessageListener.java:69)
    	at org.springblade.core.tenant.TenantUtil.use(TenantUtil.java:104)
    	at org.springblade.mqtt.broker.data.listener.BladeMqttFunctionMessageListener.onMessage(BladeMqttFunctionMessageListener.java:68)
    	at net.dreamlu.iot.mqtt.core.server.support.DefaultMqttServerProcessor.lambda$invokeListenerForPublish$4(DefaultMqttServerProcessor.java:503)
    	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    	at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264)
    	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    	at java.base/java.lang.Thread.run(Thread.java:840)
    Caused by: java.sql.SQLException: TDengine ERROR (0x2603): sql: INSERT INTO `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (1734315061971, '1', 20);, desc: Table does not exist
    	at com.taosdata.jdbc.TSDBError.createSQLException(TSDBError.java:95)
    	at com.taosdata.jdbc.rs.RestfulStatement.execute(RestfulStatement.java:97)
    	at com.taosdata.jdbc.rs.RestfulStatement.execute(RestfulStatement.java:78)
    	at com.taosdata.jdbc.rs.RestfulStatement.executeUpdate(RestfulStatement.java:56)
    	at com.taosdata.jdbc.rs.RestfulPreparedStatement.executeUpdate(RestfulPreparedStatement.java:59)
    	at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeUpdate(DruidPooledPreparedStatement.java:241)
    	at org.springframework.jdbc.core.JdbcTemplate.lambda$update$2(JdbcTemplate.java:975)
    	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:658)
    	... 21 common frames omitted
    
    2024-12-16 10:11:01.975  INFO 886929 --- [  biz-worker-29] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315061973, /blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post, {"id":"72a918e11fccae5c8e5229a69ef8b1af","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}] updated count:1
    2024-12-16 10:11:02.970  INFO 886929 --- [  biz-worker-31] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_command_jkerjk97oub_27oy29bmmln` USING `device_command` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `input`, `commandName`, `identifier`) VALUES (?, ?, ?, ?, ?); paras:[1734315062965, {"RebootTime":1734315050945}, {"RebootStatus":"true"}, 重启服务, Reboot] updated count:1
    2024-12-16 10:11:02.972  INFO 886929 --- [  biz-worker-35] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315062967, /blade/ext/ntp/JkerjK97oub/27OY29BMmLn/response, {"deviceSendTime":"1734315050964","serverRecvTime":"1734315062966","serverSendTime":"1734315062966"}] updated count:1
    2024-12-16 10:11:02.972  INFO 886929 --- [  biz-worker-33] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_event_jkerjk97oub_27oy29bmmln` USING `device_event` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `eventName`, `eventType`, `identifier`) VALUES (?, ?, ?, ?, ?); paras:[1734315062968, {"BatteryLevel":20}, 电量低事件, alert, LowBatteyEvent] updated count:1
    2024-12-16 10:11:02.973  INFO 886929 --- [  biz-worker-31] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315062970, /blade/sys/JkerjK97oub/27OY29BMmLn/thing/service/Reboot, {"id":"7a22cc85c04865a6156f22cd9f916dab","version":"1.0","params":{"output":"{\"RebootTime\":1734315050945}","input":"{\"RebootStatus\":\"true\"}","commandName":"重启服务"}}] updated count:1
    2024-12-16 10:11:02.974  INFO 886929 --- [  biz-worker-35] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315062972, /blade/ext/ntp/JkerjK97oub/27OY29BMmLn/request, {"deviceSendTime":"1734315050964"}] updated count:1
    2024-12-16 10:11:02.974  INFO 886929 --- [  biz-worker-33] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315062972, /blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/LowBatteyEvent/post, {"id":"e1ba74fa36a00ad3c89d42a486846a04","version":"1.0","params":{"output":"{\"BatteryLevel\":20}","eventName":"电量低事件","eventType":"alert"}}] updated count:1
    2024-12-16 10:11:04.969  INFO 886929 --- [  biz-worker-37] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734315064964, /blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post, {"id":"72a918e11fccae5c8e5229a69ef8b1af","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}] updated count:1
    2024-12-16 10:11:04.973 ERROR 886929 --- [  biz-worker-37] o.s.m.b.d.f.e.EventPropertyPostFunction  : req id:72a918e11fccae5c8e5229a69ef8b1af property post error
    
    org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [INSERT INTO `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (?, ?, ?);]; SQL state []; error code [9731]; TDengine ERROR (0x2603): sql: INSERT INTO `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (1734315064970, '1', 20);, desc: Table does not exist
    	at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1549)
    	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:677)
    	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:970)
    	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1014)
    	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1024)
    	at org.springblade.iot.tsdb.tdengine.dao.TDEngineTemplate.saveDeviceData(TDEngineTemplate.java:116)
    	at org.springblade.iot.tsdb.tdengine.dao.TDEngineTemplate.saveDeviceData(TDEngineTemplate.java:100)
    	at org.springblade.iot.tsdb.tdengine.dao.TDEngineBatchTemplate.saveDeviceData(TDEngineBatchTemplate.java:35)
    	at org.springblade.iot.tsdb.tdengine.impl.DeviceDataServiceImpl.saveDeviceProperty(DeviceDataServiceImpl.java:33)
    	at org.springblade.mqtt.broker.data.function.event.EventPropertyPostFunction.execute(EventPropertyPostFunction.java:77)
    	at org.springblade.mqtt.broker.data.function.event.EventPropertyPostFunction.execute(EventPropertyPostFunction.java:44)
    	at org.springblade.mqtt.broker.data.listener.BladeMqttFunctionMessageListener.execDeviceFunction(BladeMqttFunctionMessageListener.java:104)
    	at org.springblade.mqtt.broker.data.listener.BladeMqttFunctionMessageListener.execMqttFunction(BladeMqttFunctionMessageListener.java:79)
    	at org.springblade.mqtt.broker.data.listener.BladeMqttFunctionMessageListener.lambda$onMessage$0(BladeMqttFunctionMessageListener.java:69)
    	at org.springblade.core.tenant.TenantUtil.use(TenantUtil.java:104)
    	at org.springblade.mqtt.broker.data.listener.BladeMqttFunctionMessageListener.onMessage(BladeMqttFunctionMessageListener.java:68)
    	at net.dreamlu.iot.mqtt.core.server.support.DefaultMqttServerProcessor.lambda$invokeListenerForPublish$4(DefaultMqttServerProcessor.java:503)
    	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    	at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264)
    	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    	at java.base/java.lang.Thread.run(Thread.java:840)
    Caused by: java.sql.SQLException: TDengine ERROR (0x2603): sql: INSERT INTO `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (1734315064970, '1', 20);, desc: Table does not exist
    	at com.taosdata.jdbc.TSDBError.createSQLException(TSDBError.java:95)
    	at com.taosdata.jdbc.rs.RestfulStatement.execute(RestfulStatement.java:97)
    	at com.taosdata.jdbc.rs.RestfulStatement.execute(RestfulStatement.java:78)
    	at com.taosdata.jdbc.rs.RestfulStatement.executeUpdate(RestfulStatement.java:56)
    	at com.taosdata.jdbc.rs.RestfulPreparedStatement.executeUpdate(RestfulPreparedStatement.java:59)
    	at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeUpdate(DruidPooledPreparedStatement.java:241)
    	at org.springframework.jdbc.core.JdbcTemplate.lambda$update$2(JdbcTemplate.java:975)
    	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:658)
    	... 21 common frames omitted



    image.png


    回答: 2024-12-16 10:43

    进到产品页面里,把物模型重新发布一下,看看还会不会报错

    作者追问:2024-12-17 11:25

    image.png

    物模型发布是在这里是吧。



    这是发布物模型后的TDengine表。


    image.png


    然后还是有一个报错:

    2024-12-17 10:30:35.970  INFO 1080823 --- [  biz-worker-21] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734402635968, /blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post, {"id":"2ec3d1a60177dc5932a5b43f95e38f1b","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}] updated count:1
    2024-12-17 10:30:38.965  INFO 1080823 --- [  biz-worker-29] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734402638962, /blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/property/post, {"id":"2ec3d1a60177dc5932a5b43f95e38f1b","version":"1.0","params":{"LightSwitch":"1","BatteryLevel":20}}] updated count:1
    2024-12-17 10:30:38.965  INFO 1080823 --- [  biz-worker-33] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_event_jkerjk97oub_27oy29bmmln` USING `device_event` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `eventName`, `eventType`, `identifier`) VALUES (?, ?, ?, ?, ?); paras:[1734402638963, {"BatteryLevel":20}, 电量低事件, alert, LowBatteyEvent] updated count:1
    2024-12-17 10:30:38.965  INFO 1080823 --- [  biz-worker-31] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_command_jkerjk97oub_27oy29bmmln` USING `device_command` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `output`, `input`, `commandName`, `identifier`) VALUES (?, ?, ?, ?, ?); paras:[1734402638962, {"RebootTime":1734402627756}, {"RebootStatus":"true"}, 重启服务, Reboot] updated count:1
    2024-12-17 10:30:38.966  INFO 1080823 --- [  biz-worker-35] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734402638964, /blade/ext/ntp/JkerjK97oub/27OY29BMmLn/response, {"deviceSendTime":"1734402627769","serverRecvTime":"1734402638963","serverSendTime":"1734402638963"}] updated count:1
    2024-12-17 10:30:38.967  INFO 1080823 --- [  biz-worker-33] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734402638965, /blade/sys/JkerjK97oub/27OY29BMmLn/thing/event/LowBatteyEvent/post, {"id":"e62465a614803d94c2a4d9c89081039e","version":"1.0","params":{"output":"{\"BatteryLevel\":20}","eventName":"电量低事件","eventType":"alert"}}] updated count:1
    2024-12-17 10:30:38.967  INFO 1080823 --- [  biz-worker-31] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734402638965, /blade/sys/JkerjK97oub/27OY29BMmLn/thing/service/Reboot, {"id":"4e046855e0b11b5d788c814b6120ff75","version":"1.0","params":{"output":"{\"RebootTime\":1734402627756}","input":"{\"RebootStatus\":\"true\"}","commandName":"重启服务"}}] updated count:1
    2024-12-17 10:30:38.968  INFO 1080823 --- [  biz-worker-35] o.s.i.t.tdengine.dao.TDEngineTemplate    : TdEngine save sql:INSERT INTO `device_logger_jkerjk97oub_27oy29bmmln` USING `device_logger` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `topic`, `message`) VALUES (?, ?, ?); paras:[1734402638966, /blade/ext/ntp/JkerjK97oub/27OY29BMmLn/request, {"deviceSendTime":"1734402627769"}] updated count:1
    2024-12-17 10:30:38.968 ERROR 1080823 --- [  biz-worker-29] o.s.m.b.d.f.e.EventPropertyPostFunction  : req id:2ec3d1a60177dc5932a5b43f95e38f1b property post error
    
    org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL [INSERT INTO `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (?, ?, ?);]; SQL state []; error code [9730]; TDengine ERROR (0x2602): sql: INSERT INTO `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (1734402638966, '1', 20);, desc: Invalid column name: BatteryLevel
    	at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1549)
    	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:677)
    	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:970)
    	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1014)
    	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:1024)
    	at org.springblade.iot.tsdb.tdengine.dao.TDEngineTemplate.saveDeviceData(TDEngineTemplate.java:116)
    	at org.springblade.iot.tsdb.tdengine.dao.TDEngineTemplate.saveDeviceData(TDEngineTemplate.java:100)
    	at org.springblade.iot.tsdb.tdengine.dao.TDEngineBatchTemplate.saveDeviceData(TDEngineBatchTemplate.java:35)
    	at org.springblade.iot.tsdb.tdengine.impl.DeviceDataServiceImpl.saveDeviceProperty(DeviceDataServiceImpl.java:33)
    	at org.springblade.mqtt.broker.data.function.event.EventPropertyPostFunction.execute(EventPropertyPostFunction.java:77)
    	at org.springblade.mqtt.broker.data.function.event.EventPropertyPostFunction.execute(EventPropertyPostFunction.java:44)
    	at org.springblade.mqtt.broker.data.listener.BladeMqttFunctionMessageListener.execDeviceFunction(BladeMqttFunctionMessageListener.java:104)
    	at org.springblade.mqtt.broker.data.listener.BladeMqttFunctionMessageListener.execMqttFunction(BladeMqttFunctionMessageListener.java:79)
    	at org.springblade.mqtt.broker.data.listener.BladeMqttFunctionMessageListener.lambda$onMessage$0(BladeMqttFunctionMessageListener.java:69)
    	at org.springblade.core.tenant.TenantUtil.use(TenantUtil.java:104)
    	at org.springblade.mqtt.broker.data.listener.BladeMqttFunctionMessageListener.onMessage(BladeMqttFunctionMessageListener.java:68)
    	at net.dreamlu.iot.mqtt.core.server.support.DefaultMqttServerProcessor.lambda$invokeListenerForPublish$4(DefaultMqttServerProcessor.java:503)
    	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    	at java.base/java.lang.Thread.run(Thread.java:840)
    Caused by: java.sql.SQLException: TDengine ERROR (0x2602): sql: INSERT INTO `device_property_jkerjk97oub_27oy29bmmln` USING `device_property_jkerjk97oub` TAGS ('JkerjK97oub', '27OY29BMmLn') (`time`, `LightSwitch`, `BatteryLevel`) VALUES (1734402638966, '1', 20);, desc: Invalid column name: BatteryLevel
    	at com.taosdata.jdbc.TSDBError.createSQLException(TSDBError.java:95)
    	at com.taosdata.jdbc.rs.RestfulStatement.execute(RestfulStatement.java:97)
    	at com.taosdata.jdbc.rs.RestfulStatement.execute(RestfulStatement.java:78)
    	at com.taosdata.jdbc.rs.RestfulStatement.executeUpdate(RestfulStatement.java:56)
    	at com.taosdata.jdbc.rs.RestfulPreparedStatement.executeUpdate(RestfulPreparedStatement.java:59)
    	at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeUpdate(DruidPooledPreparedStatement.java:241)
    	at org.springframework.jdbc.core.JdbcTemplate.lambda$update$2(JdbcTemplate.java:975)
    	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:658)
    	... 20 common frames omitted


    没有这个表 “device_property_jkerjk97oub_27oy29bmmln”。是还需要发布27oy29bmmln这个产品吗或者哪个步骤?


    作者追问:2024-12-17 15:58

    已经多个设备上测试,都是会有同样问题,是因为TDengine的原因吗,需不需要切换到其他是时序库

    作者追问:2024-12-18 13:33

    没有解决办法吗,快一天了

    作者追问:2024-12-18 13:36

    没有解决办法吗,快一天了

    0 讨论(0)
提交回复