taosdata / TDengine

High-performance, scalable time-series database designed for Industrial IoT (IIoT) scenarios
https://tdengine.com
GNU Affero General Public License v3.0
23.41k stars 4.87k forks source link

使用Springboot + Mybatis(参照springbootdemo)批量写入数据(自动建表),间歇性的报错:Caused by: java.sql.SQLException: TDengine Error: Table does not exist #3882

Closed ljia310 closed 2 years ago

ljia310 commented 4 years ago

Taos版本:2.0.5.1

taos-jdbcdriver版本:

<dependency>
<groupId>com.taosdata.jdbc</groupId>
<artifactId>taos-jdbcdriver</artifactId>
<version>2.0.8</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.2.1</version>
</dependency>

场景: 订阅消息集群的消息,批量消费写入到TaosDB。 超级表已经预先创建成功:

taos> show stables;
              name              |      created_time       | columns |  tags  |   tables    |
============================================================================================
 comm_msg                       | 2020-10-16 12:05:12.757 |      14 |      3 |           2 |
 link_msg                       | 2020-10-16 12:05:12.770 |       3 |      2 |           2 |
Query OK, 2 row(s) in set (0.001302s)

报错信息: Caused by: java.sql.SQLException: TDengine Error: Table does not exist

2020-10-16 14:03:51.059  INFO 20532 --- [main] com.saftop.StDevmsgStoreApplication      : No active profile set, falling back to default profiles: default
2020-10-16 14:03:53.245  WARN 20532 --- [main] t.m.s.mapper.ClassPathMapperScanner      : No MyBatis mapper was found in '[com.saftop]' package. Please check your configuration.
2020-10-16 14:03:53.426  INFO 20532 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2020-10-16 14:03:53.435  INFO 20532 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
2020-10-16 14:03:53.508  INFO 20532 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 33ms. Found 0 Redis repository interfaces.
2020-10-16 14:03:55.221  INFO 20532 --- [main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=9c93ee6d-5dfa-3790-863f-09a92e781efd
2020-10-16 14:03:56.697  INFO 20532 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 5112 (http)
2020-10-16 14:03:56.715  INFO 20532 --- [main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2020-10-16 14:03:56.716  INFO 20532 --- [main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.38]
2020-10-16 14:03:56.825  INFO 20532 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2020-10-16 14:03:56.825  INFO 20532 --- [main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 5684 ms
2020-10-16 14:03:57.141  INFO 20532 --- [main] c.a.d.s.b.a.DruidDataSourceAutoConfigure : Init DruidDataSource
2020-10-16 14:03:57.544  INFO 20532 --- [main] com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} inited
2020-10-16 14:03:58.591 DEBUG 20532 --- [main] c.s.m.D.creatDatabaseWithParameters      : ==>  Preparing: CREATE database if not EXISTS saftop_rt KEEP 365 DAYS 30 REPLICA 1 blocks 4 
2020-10-16 14:03:58.623 DEBUG 20532 --- [main] c.s.m.D.creatDatabaseWithParameters      : ==> Parameters: 
2020-10-16 14:03:58.630 DEBUG 20532 --- [main] c.s.m.D.creatDatabaseWithParameters      : <==    Updates: 0
2020-10-16 14:03:58.634 DEBUG 20532 --- [main] c.s.mapper.DatabaseMapper.useDatabase    : ==>  Preparing: use saftop_rt 
2020-10-16 14:03:58.635 DEBUG 20532 --- [main] c.s.mapper.DatabaseMapper.useDatabase    : ==> Parameters: 
2020-10-16 14:03:58.637 DEBUG 20532 --- [main] c.s.mapper.DatabaseMapper.useDatabase    : <==    Updates: 0
2020-10-16 14:03:58.655 DEBUG 20532 --- [main] c.s.mapper.TableMapper.createSTable      : ==>  Preparing: create table if not exists saftop_rt.comm_msg ( ts timestamp , value float , value_str BINARY(4096) , value_raw BINARY(4096) , hitId int , grp_id int , dev_id int , rs_id int , mod_id int , mode_member_id int , evt_level_id int , evt_level BINARY(64) , evt_type_id int , evt_type BINARY(64) ) TAGS ( tid BINARY(64) , did BINARY(64) , type int ) 
2020-10-16 14:03:58.657 DEBUG 20532 --- [main] c.s.mapper.TableMapper.createSTable      : ==> Parameters: 
2020-10-16 14:03:58.660 DEBUG 20532 --- [main] c.s.mapper.TableMapper.createSTable      : <==    Updates: 0
2020-10-16 14:03:58.662 DEBUG 20532 --- [main] c.s.mapper.TableMapper.createSTable      : ==>  Preparing: create table if not exists saftop_rt.link_msg ( ts timestamp , link_id int , link_desc BINARY(4096) ) TAGS ( tid BINARY(64) , did BINARY(64) ) 
2020-10-16 14:03:58.663 DEBUG 20532 --- [main] c.s.mapper.TableMapper.createSTable      : ==> Parameters: 
2020-10-16 14:03:58.668 DEBUG 20532 --- [main] c.s.mapper.TableMapper.createSTable      : <==    Updates: 0
2020-10-16 14:04:02.032 DEBUG 20532 --- [ConsumeMessageThread_1] c.s.mapper.LinkMsgMapper.batchInsert     : ==>  Preparing: insert into saftop_rt.link_msg_5fa3d07b902743ce859b7d5379d5b2d9_00093EC10212 USING link_msg TAGS('5fa3d07b902743ce859b7d5379d5b2d9','00093EC10212') values (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) 
2020-10-16 14:04:02.050 DEBUG 20532 --- [ConsumeMessageThread_2] c.s.mapper.LinkMsgMapper.batchInsert     : ==>  Preparing: insert into saftop_rt.link_msg_5fa3d07b902743ce859b7d5379d5b2d9_261608A0008B USING link_msg TAGS('5fa3d07b902743ce859b7d5379d5b2d9','261608A0008B') values (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) 
2020-10-16 14:04:02.054 DEBUG 20532 --- [ConsumeMessageThread_2] c.s.mapper.LinkMsgMapper.batchInsert     : ==> Parameters: 2020-10-16 12:36:45.371(Timestamp), 3(Integer), name:技术支持无人关灯关空调 cond:delay((((2  ~=  1))),125,20) act:85 ret:0(String), 2020-10-16 12:36:45.432(Timestamp), 3(Integer), name:技术支持无人关灯关空调 cond:delay((((2  ~=  1))),125,20) act:102 ret:0(String), 2020-10-16 12:37:14.737(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:14.801(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:14.832(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:15.102(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:15.13(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:15.158(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:16.065(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:16.174(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:16.27(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:17.245(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:17.333(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:17.395(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:18.193(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:18.261(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:18.407(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:19.069(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:19.179(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:19.218(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:20.055(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:20.096(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:20.176(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:21.071(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:21.143(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:21.203(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:22.016(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:22.115(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:22.182(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:23.195(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:23.193(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:23.191(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String)
2020-10-16 14:04:02.118 DEBUG 20532 --- [ConsumeMessageThread_1] c.s.mapper.LinkMsgMapper.batchInsert     : ==> Parameters: 2020-10-13 16:48:09.097(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 16:58:09.038(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 17:08:09.019(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 17:18:09.086(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 17:28:09.094(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 17:35:49.047(Timestamp), 24(Integer), name:光照度联动测试2 cond:((90)<100) act:tcp,20.0.0.251:8899|261608A0008B,251#0-215,'105' ret:0(String), 2020-10-13 17:38:09.004(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 17:48:09.064(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 17:58:09.034(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 18:08:09.091(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 18:18:09.063(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 18:28:09.067(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 18:38:09.067(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 18:48:09.044(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 18:58:09.076(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 19:08:09.071(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 19:18:09.014(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 19:28:09.025(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 19:38:09.011(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 19:48:09.091(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 19:58:09.004(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 20:08:09.093(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 20:18:09.031(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 20:28:09.018(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 20:38:09.068(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 20:48:09.036(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 20:58:09.004(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 21:08:09.042(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 21:18:09.005(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 21:28:09.101(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 21:38:09.046(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 21:48:09.077(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String)
2020-10-16 14:04:02.579 ERROR 20532 --- [ConsumeMessageThread_2] com.saftop.mq.RocketMqListenerLinkMsg    : 
### Error updating database.  Cause: java.sql.SQLException: TDengine Error: Table does not exist
### The error may exist in class path resource [mapper/LinkMsgMapper.xml]
### The error may involve com.saftop.mapper.LinkMsgMapper.batchInsert-Inline
### The error occurred while setting parameters
### SQL: insert into saftop_rt.link_msg_5fa3d07b902743ce859b7d5379d5b2d9_261608A0008B  USING link_msg TAGS('5fa3d07b902743ce859b7d5379d5b2d9','261608A0008B') values                        (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)
### Cause: java.sql.SQLException: TDengine Error: Table does not exist
; uncategorized SQLException; SQL state []; error code [-2147482782]; TDengine Error: Table does not exist; nested exception is java.sql.SQLException: TDengine Error: Table does not exist

org.springframework.jdbc.UncategorizedSQLException: 
### Error updating database.  Cause: java.sql.SQLException: TDengine Error: Table does not exist
### The error may exist in class path resource [mapper/LinkMsgMapper.xml]
### The error may involve com.saftop.mapper.LinkMsgMapper.batchInsert-Inline
### The error occurred while setting parameters
### SQL: insert into saftop_rt.link_msg_5fa3d07b902743ce859b7d5379d5b2d9_261608A0008B  USING link_msg TAGS('5fa3d07b902743ce859b7d5379d5b2d9','261608A0008B') values                        (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)
### Cause: java.sql.SQLException: TDengine Error: Table does not exist
; uncategorized SQLException; SQL state []; error code [-2147482782]; TDengine Error: Table does not exist; nested exception is java.sql.SQLException: TDengine Error: Table does not exist
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:89) ~[spring-jdbc-5.2.9.RELEASE.jar!/:5.2.9.RELEASE]
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) ~[spring-jdbc-5.2.9.RELEASE.jar!/:5.2.9.RELEASE]
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) ~[spring-jdbc-5.2.9.RELEASE.jar!/:5.2.9.RELEASE]
    at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73) ~[mybatis-spring-2.0.1.jar!/:2.0.1]
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446) ~[mybatis-spring-2.0.1.jar!/:2.0.1]
    at com.sun.proxy.$Proxy81.insert(Unknown Source) ~[na:na]
    at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:278) ~[mybatis-spring-2.0.1.jar!/:2.0.1]
    at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:62) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:58) ~[mybatis-3.5.1.jar!/:3.5.1]
    at com.sun.proxy.$Proxy85.batchInsert(Unknown Source) ~[na:na]
    at com.saftop.service.TaosService.handleLinkMsgToTSDB(TaosService.java:214) ~[classes!/:0.0.1-SNAPSHOT]
    at com.saftop.mq.RocketMqListenerLinkMsg.handleLinkDetail(RocketMqListenerLinkMsg.java:54) [classes!/:0.0.1-SNAPSHOT]
    at com.saftop.mq.RocketMqListenerLinkMsg.consumeMessage(RocketMqListenerLinkMsg.java:45) [classes!/:0.0.1-SNAPSHOT]
    at org.apache.rocketmq.client.impl.consumer.ConsumeMessageOrderlyService$ConsumeRequest.run(ConsumeMessageOrderlyService.java:488) [rocketmq-client-4.7.1.jar!/:4.7.1]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_151]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_151]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_151]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_151]
    at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151]
Caused by: java.sql.SQLException: TDengine Error: Table does not exist
    at com.taosdata.jdbc.TSDBJNIConnector.executeQuery(TSDBJNIConnector.java:135) ~[taos-jdbcdriver-2.0.8.jar!/:na]
    at com.taosdata.jdbc.TSDBStatement.executeUpdate(TSDBStatement.java:98) ~[taos-jdbcdriver-2.0.8.jar!/:na]
    at com.taosdata.jdbc.SavedPreparedStatement.executeSql(SavedPreparedStatement.java:450) ~[taos-jdbcdriver-2.0.8.jar!/:na]
    at com.taosdata.jdbc.SavedPreparedStatement.executeBatchInternal(SavedPreparedStatement.java:259) ~[taos-jdbcdriver-2.0.8.jar!/:na]
    at com.taosdata.jdbc.TSDBPreparedStatement.execute(TSDBPreparedStatement.java:304) ~[taos-jdbcdriver-2.0.8.jar!/:na]
    at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:497) ~[druid-1.2.1.jar!/:1.2.1]
    at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source) ~[na:na]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_151]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_151]
    at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59) ~[mybatis-3.5.1.jar!/:3.5.1]
    at com.sun.proxy.$Proxy87.execute(Unknown Source) ~[na:na]
    at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184) ~[mybatis-3.5.1.jar!/:3.5.1]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_151]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_151]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_151]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_151]
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433) ~[mybatis-spring-2.0.1.jar!/:2.0.1]
    ... 14 common frames omitted

2020-10-16 14:04:02.595 ERROR 20532 --- [ConsumeMessageThread_1] com.saftop.mq.RocketMqListenerLinkMsg    : 
### Error updating database.  Cause: java.sql.SQLException: TDengine Error: Table does not exist
### The error may exist in class path resource [mapper/LinkMsgMapper.xml]
### The error may involve com.saftop.mapper.LinkMsgMapper.batchInsert-Inline
### The error occurred while setting parameters
### SQL: insert into saftop_rt.link_msg_5fa3d07b902743ce859b7d5379d5b2d9_00093EC10212  USING link_msg TAGS('5fa3d07b902743ce859b7d5379d5b2d9','00093EC10212') values                        (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)
### Cause: java.sql.SQLException: TDengine Error: Table does not exist
; uncategorized SQLException; SQL state []; error code [-2147482782]; TDengine Error: Table does not exist; nested exception is java.sql.SQLException: TDengine Error: Table does not exist

org.springframework.jdbc.UncategorizedSQLException: 
### Error updating database.  Cause: java.sql.SQLException: TDengine Error: Table does not exist
### The error may exist in class path resource [mapper/LinkMsgMapper.xml]
### The error may involve com.saftop.mapper.LinkMsgMapper.batchInsert-Inline
### The error occurred while setting parameters
### SQL: insert into saftop_rt.link_msg_5fa3d07b902743ce859b7d5379d5b2d9_00093EC10212  USING link_msg TAGS('5fa3d07b902743ce859b7d5379d5b2d9','00093EC10212') values                        (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)
### Cause: java.sql.SQLException: TDengine Error: Table does not exist
; uncategorized SQLException; SQL state []; error code [-2147482782]; TDengine Error: Table does not exist; nested exception is java.sql.SQLException: TDengine Error: Table does not exist
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:89) ~[spring-jdbc-5.2.9.RELEASE.jar!/:5.2.9.RELEASE]
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) ~[spring-jdbc-5.2.9.RELEASE.jar!/:5.2.9.RELEASE]
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) ~[spring-jdbc-5.2.9.RELEASE.jar!/:5.2.9.RELEASE]
    at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73) ~[mybatis-spring-2.0.1.jar!/:2.0.1]
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446) ~[mybatis-spring-2.0.1.jar!/:2.0.1]
    at com.sun.proxy.$Proxy81.insert(Unknown Source) ~[na:na]
    at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:278) ~[mybatis-spring-2.0.1.jar!/:2.0.1]
    at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:62) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:58) ~[mybatis-3.5.1.jar!/:3.5.1]
    at com.sun.proxy.$Proxy85.batchInsert(Unknown Source) ~[na:na]
    at com.saftop.service.TaosService.handleLinkMsgToTSDB(TaosService.java:214) ~[classes!/:0.0.1-SNAPSHOT]
    at com.saftop.mq.RocketMqListenerLinkMsg.handleLinkDetail(RocketMqListenerLinkMsg.java:54) [classes!/:0.0.1-SNAPSHOT]
    at com.saftop.mq.RocketMqListenerLinkMsg.consumeMessage(RocketMqListenerLinkMsg.java:45) [classes!/:0.0.1-SNAPSHOT]
    at org.apache.rocketmq.client.impl.consumer.ConsumeMessageOrderlyService$ConsumeRequest.run(ConsumeMessageOrderlyService.java:488) [rocketmq-client-4.7.1.jar!/:4.7.1]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_151]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_151]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_151]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_151]
    at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151]
Caused by: java.sql.SQLException: TDengine Error: Table does not exist
    at com.taosdata.jdbc.TSDBJNIConnector.executeQuery(TSDBJNIConnector.java:135) ~[taos-jdbcdriver-2.0.8.jar!/:na]
    at com.taosdata.jdbc.TSDBStatement.executeUpdate(TSDBStatement.java:98) ~[taos-jdbcdriver-2.0.8.jar!/:na]
    at com.taosdata.jdbc.SavedPreparedStatement.executeSql(SavedPreparedStatement.java:450) ~[taos-jdbcdriver-2.0.8.jar!/:na]
    at com.taosdata.jdbc.SavedPreparedStatement.executeBatchInternal(SavedPreparedStatement.java:259) ~[taos-jdbcdriver-2.0.8.jar!/:na]
    at com.taosdata.jdbc.TSDBPreparedStatement.execute(TSDBPreparedStatement.java:304) ~[taos-jdbcdriver-2.0.8.jar!/:na]
    at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:497) ~[druid-1.2.1.jar!/:1.2.1]
    at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source) ~[na:na]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_151]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_151]
    at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59) ~[mybatis-3.5.1.jar!/:3.5.1]
    at com.sun.proxy.$Proxy87.execute(Unknown Source) ~[na:na]
    at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184) ~[mybatis-3.5.1.jar!/:3.5.1]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_151]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_151]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_151]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_151]
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433) ~[mybatis-spring-2.0.1.jar!/:2.0.1]
    ... 14 common frames omitted

2020-10-16 14:04:02.806  WARN 20532 --- [main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2020-10-16 14:04:02.807  INFO 20532 --- [main] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2020-10-16 14:04:02.822  WARN 20532 --- [main] c.n.c.sources.URLConfigurationSource     : No URLs will be polled as dynamic configuration sources.
2020-10-16 14:04:02.848  INFO 20532 --- [main] c.n.c.sources.URLConfigurationSource     : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.
2020-10-16 14:04:03.633 DEBUG 20532 --- [ConsumeMessageThread_3] c.s.mapper.LinkMsgMapper.batchInsert     : ==>  Preparing: insert into saftop_rt.link_msg_5fa3d07b902743ce859b7d5379d5b2d9_261608A0008B USING link_msg TAGS('5fa3d07b902743ce859b7d5379d5b2d9','261608A0008B') values (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) 
2020-10-16 14:04:03.636 DEBUG 20532 --- [ConsumeMessageThread_3] c.s.mapper.LinkMsgMapper.batchInsert     : ==> Parameters: 2020-10-16 12:36:45.371(Timestamp), 3(Integer), name:技术支持无人关灯关空调 cond:delay((((2  ~=  1))),125,20) act:85 ret:0(String), 2020-10-16 12:36:45.432(Timestamp), 3(Integer), name:技术支持无人关灯关空调 cond:delay((((2  ~=  1))),125,20) act:102 ret:0(String), 2020-10-16 12:37:14.737(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:14.801(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:14.832(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:15.102(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:15.13(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:15.158(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:16.065(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:16.174(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:16.27(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:17.245(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:17.333(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:17.395(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:18.193(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:18.261(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:18.407(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:19.069(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:19.179(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:19.218(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:20.055(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:20.096(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:20.176(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:21.071(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:21.143(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:21.203(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:22.016(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:22.115(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:22.182(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:23.195(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:23.193(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String), 2020-10-16 12:37:23.191(Timestamp), 8(Integer), name:前台有人开灯2 cond:(((1  ==  1)) and (settimer(131,1))) act:101 ret:0(String)
2020-10-16 14:04:03.649 ERROR 20532 --- [ConsumeMessageThread_3] com.saftop.mq.RocketMqListenerLinkMsg    : 
### Error updating database.  Cause: java.sql.SQLException: TDengine Error: Table does not exist
### The error may exist in class path resource [mapper/LinkMsgMapper.xml]
### The error may involve com.saftop.mapper.LinkMsgMapper.batchInsert-Inline
### The error occurred while setting parameters
### SQL: insert into saftop_rt.link_msg_5fa3d07b902743ce859b7d5379d5b2d9_261608A0008B  USING link_msg TAGS('5fa3d07b902743ce859b7d5379d5b2d9','261608A0008B') values                        (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)
### Cause: java.sql.SQLException: TDengine Error: Table does not exist
; uncategorized SQLException; SQL state []; error code [-2147482782]; TDengine Error: Table does not exist; nested exception is java.sql.SQLException: TDengine Error: Table does not exist

org.springframework.jdbc.UncategorizedSQLException: 
### Error updating database.  Cause: java.sql.SQLException: TDengine Error: Table does not exist
### The error may exist in class path resource [mapper/LinkMsgMapper.xml]
### The error may involve com.saftop.mapper.LinkMsgMapper.batchInsert-Inline
### The error occurred while setting parameters
### SQL: insert into saftop_rt.link_msg_5fa3d07b902743ce859b7d5379d5b2d9_261608A0008B  USING link_msg TAGS('5fa3d07b902743ce859b7d5379d5b2d9','261608A0008B') values                        (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)
### Cause: java.sql.SQLException: TDengine Error: Table does not exist
; uncategorized SQLException; SQL state []; error code [-2147482782]; TDengine Error: Table does not exist; nested exception is java.sql.SQLException: TDengine Error: Table does not exist
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:89) ~[spring-jdbc-5.2.9.RELEASE.jar!/:5.2.9.RELEASE]
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) ~[spring-jdbc-5.2.9.RELEASE.jar!/:5.2.9.RELEASE]
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) ~[spring-jdbc-5.2.9.RELEASE.jar!/:5.2.9.RELEASE]
    at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73) ~[mybatis-spring-2.0.1.jar!/:2.0.1]
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446) ~[mybatis-spring-2.0.1.jar!/:2.0.1]
    at com.sun.proxy.$Proxy81.insert(Unknown Source) ~[na:na]
    at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:278) ~[mybatis-spring-2.0.1.jar!/:2.0.1]
    at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:62) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:58) ~[mybatis-3.5.1.jar!/:3.5.1]
    at com.sun.proxy.$Proxy85.batchInsert(Unknown Source) ~[na:na]
    at com.saftop.service.TaosService.handleLinkMsgToTSDB(TaosService.java:214) ~[classes!/:0.0.1-SNAPSHOT]
    at com.saftop.mq.RocketMqListenerLinkMsg.handleLinkDetail(RocketMqListenerLinkMsg.java:54) [classes!/:0.0.1-SNAPSHOT]
    at com.saftop.mq.RocketMqListenerLinkMsg.consumeMessage(RocketMqListenerLinkMsg.java:45) [classes!/:0.0.1-SNAPSHOT]
    at org.apache.rocketmq.client.impl.consumer.ConsumeMessageOrderlyService$ConsumeRequest.run(ConsumeMessageOrderlyService.java:488) [rocketmq-client-4.7.1.jar!/:4.7.1]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_151]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_151]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_151]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_151]
    at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151]
Caused by: java.sql.SQLException: TDengine Error: Table does not exist
    at com.taosdata.jdbc.TSDBJNIConnector.executeQuery(TSDBJNIConnector.java:135) ~[taos-jdbcdriver-2.0.8.jar!/:na]
    at com.taosdata.jdbc.TSDBStatement.executeUpdate(TSDBStatement.java:98) ~[taos-jdbcdriver-2.0.8.jar!/:na]
    at com.taosdata.jdbc.SavedPreparedStatement.executeSql(SavedPreparedStatement.java:450) ~[taos-jdbcdriver-2.0.8.jar!/:na]
    at com.taosdata.jdbc.SavedPreparedStatement.executeBatchInternal(SavedPreparedStatement.java:259) ~[taos-jdbcdriver-2.0.8.jar!/:na]
    at com.taosdata.jdbc.TSDBPreparedStatement.execute(TSDBPreparedStatement.java:304) ~[taos-jdbcdriver-2.0.8.jar!/:na]
    at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:497) ~[druid-1.2.1.jar!/:1.2.1]
    at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source) ~[na:na]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_151]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_151]
    at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59) ~[mybatis-3.5.1.jar!/:3.5.1]
    at com.sun.proxy.$Proxy87.execute(Unknown Source) ~[na:na]
    at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184) ~[mybatis-3.5.1.jar!/:3.5.1]
    at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source) ~[na:na]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_151]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_151]
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433) ~[mybatis-spring-2.0.1.jar!/:2.0.1]
    ... 14 common frames omitted

2020-10-16 14:04:03.682 DEBUG 20532 --- [ConsumeMessageThread_4] c.s.mapper.LinkMsgMapper.batchInsert     : ==>  Preparing: insert into saftop_rt.link_msg_5fa3d07b902743ce859b7d5379d5b2d9_00093EC10212 USING link_msg TAGS('5fa3d07b902743ce859b7d5379d5b2d9','00093EC10212') values (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) (?,?,?) 
2020-10-16 14:04:03.685 DEBUG 20532 --- [ConsumeMessageThread_4] c.s.mapper.LinkMsgMapper.batchInsert     : ==> Parameters: 2020-10-13 16:48:09.097(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 16:58:09.038(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 17:08:09.019(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 17:18:09.086(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 17:28:09.094(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 17:35:49.047(Timestamp), 24(Integer), name:光照度联动测试2 cond:((90)<100) act:tcp,20.0.0.251:8899|261608A0008B,251#0-215,'105' ret:0(String), 2020-10-13 17:38:09.004(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 17:48:09.064(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 17:58:09.034(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 18:08:09.091(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 18:18:09.063(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 18:28:09.067(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 18:38:09.067(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 18:48:09.044(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 18:58:09.076(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 19:08:09.071(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 19:18:09.014(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 19:28:09.025(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 19:38:09.011(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 19:48:09.091(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 19:58:09.004(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 20:08:09.093(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 20:18:09.031(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 20:28:09.018(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 20:38:09.068(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 20:48:09.036(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 20:58:09.004(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 21:08:09.042(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 21:18:09.005(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 21:28:09.101(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 21:38:09.046(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String), 2020-10-13 21:48:09.077(Timestamp), 86(Integer), name:A cond:(settimer(177,600)) act:{M1}=0 ret:0(String)
2020-10-16 14:04:03.733 ERROR 20532 --- [ConsumeMessageThread_4] com.saftop.mq.RocketMqListenerLinkMsg    : 
### Error updating database.  Cause: java.sql.SQLException: TDengine Error: Table does not exist
### The error may exist in class path resource [mapper/LinkMsgMapper.xml]
### The error may involve com.saftop.mapper.LinkMsgMapper.batchInsert-Inline
### The error occurred while setting parameters
### SQL: insert into saftop_rt.link_msg_5fa3d07b902743ce859b7d5379d5b2d9_00093EC10212  USING link_msg TAGS('5fa3d07b902743ce859b7d5379d5b2d9','00093EC10212') values                        (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)
### Cause: java.sql.SQLException: TDengine Error: Table does not exist
; uncategorized SQLException; SQL state []; error code [-2147482782]; TDengine Error: Table does not exist; nested exception is java.sql.SQLException: TDengine Error: Table does not exist

org.springframework.jdbc.UncategorizedSQLException: 
### Error updating database.  Cause: java.sql.SQLException: TDengine Error: Table does not exist
### The error may exist in class path resource [mapper/LinkMsgMapper.xml]
### The error may involve com.saftop.mapper.LinkMsgMapper.batchInsert-Inline
### The error occurred while setting parameters
### SQL: insert into saftop_rt.link_msg_5fa3d07b902743ce859b7d5379d5b2d9_00093EC10212  USING link_msg TAGS('5fa3d07b902743ce859b7d5379d5b2d9','00093EC10212') values                        (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)                         (?,?,?)
### Cause: java.sql.SQLException: TDengine Error: Table does not exist
; uncategorized SQLException; SQL state []; error code [-2147482782]; TDengine Error: Table does not exist; nested exception is java.sql.SQLException: TDengine Error: Table does not exist
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:89) ~[spring-jdbc-5.2.9.RELEASE.jar!/:5.2.9.RELEASE]
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) ~[spring-jdbc-5.2.9.RELEASE.jar!/:5.2.9.RELEASE]
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) ~[spring-jdbc-5.2.9.RELEASE.jar!/:5.2.9.RELEASE]
    at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73) ~[mybatis-spring-2.0.1.jar!/:2.0.1]
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446) ~[mybatis-spring-2.0.1.jar!/:2.0.1]
    at com.sun.proxy.$Proxy81.insert(Unknown Source) ~[na:na]
    at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:278) ~[mybatis-spring-2.0.1.jar!/:2.0.1]
    at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:62) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:58) ~[mybatis-3.5.1.jar!/:3.5.1]
    at com.sun.proxy.$Proxy85.batchInsert(Unknown Source) ~[na:na]
    at com.saftop.service.TaosService.handleLinkMsgToTSDB(TaosService.java:214) ~[classes!/:0.0.1-SNAPSHOT]
    at com.saftop.mq.RocketMqListenerLinkMsg.handleLinkDetail(RocketMqListenerLinkMsg.java:54) [classes!/:0.0.1-SNAPSHOT]
    at com.saftop.mq.RocketMqListenerLinkMsg.consumeMessage(RocketMqListenerLinkMsg.java:45) [classes!/:0.0.1-SNAPSHOT]
    at org.apache.rocketmq.client.impl.consumer.ConsumeMessageOrderlyService$ConsumeRequest.run(ConsumeMessageOrderlyService.java:488) [rocketmq-client-4.7.1.jar!/:4.7.1]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_151]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_151]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_151]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_151]
    at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151]
Caused by: java.sql.SQLException: TDengine Error: Table does not exist
    at com.taosdata.jdbc.TSDBJNIConnector.executeQuery(TSDBJNIConnector.java:135) ~[taos-jdbcdriver-2.0.8.jar!/:na]
    at com.taosdata.jdbc.TSDBStatement.executeUpdate(TSDBStatement.java:98) ~[taos-jdbcdriver-2.0.8.jar!/:na]
    at com.taosdata.jdbc.SavedPreparedStatement.executeSql(SavedPreparedStatement.java:450) ~[taos-jdbcdriver-2.0.8.jar!/:na]
    at com.taosdata.jdbc.SavedPreparedStatement.executeBatchInternal(SavedPreparedStatement.java:259) ~[taos-jdbcdriver-2.0.8.jar!/:na]
    at com.taosdata.jdbc.TSDBPreparedStatement.execute(TSDBPreparedStatement.java:304) ~[taos-jdbcdriver-2.0.8.jar!/:na]
    at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:497) ~[druid-1.2.1.jar!/:1.2.1]
    at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source) ~[na:na]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_151]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_151]
    at org.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:59) ~[mybatis-3.5.1.jar!/:3.5.1]
    at com.sun.proxy.$Proxy87.execute(Unknown Source) ~[na:na]
    at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:50) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:76) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197) ~[mybatis-3.5.1.jar!/:3.5.1]
    at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184) ~[mybatis-3.5.1.jar!/:3.5.1]
    at sun.reflect.GeneratedMethodAccessor79.invoke(Unknown Source) ~[na:na]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_151]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_151]
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433) ~[mybatis-spring-2.0.1.jar!/:2.0.1]
    ... 14 common frames omitted

直接手工拷贝脚本执行是正常的。

taos> insert into saftop_rt.link_msg_5fa3d07b902743ce859b7d5379d5b2d9_00093EC10212  USING link_msg TAGS('5fa3d07b902743ce859b7d5379d5b2d9','00093EC10212') values                        (now,1
,"xxx")                         (now,1,"xxx")                         (now,1,"xxx")                         (now,1,"xxx")                         (now,1,"xxx")                         (now,1,
"xxx")                         (now,1,"xxx")                         (now,1,"xxx")                         (now,1,"xxx")                         (now,1,"xxx")                         (now,1,"
xxx")                         (now,1,"xxx")                         (now,1,"xxx")                         (now,1,"xxx")                         (now,1,"xxx")                         (now,1,"x
xx")                         (now,1,"xxx")                         (now,1,"xxx")                         (now,1,"xxx")                         (now,1,"xxx")                         (now,1,"xx
x")                         (now,1,"xxx")                         (now,1,"xxx")                         (now,1,"xxx")                         (now,1,"xxx")                         (now,1,"xxx
")                         (now,1,"xxx")                         (now,1,"xxx")                         (now,1,"xxx")                         (now,1,"xxx")                         (now,1,"xxx"
)                         (now,1,"xxx");
Query OK, 1 row(s) affected (0.001944s)

taos> 

上面只是部分日志,看完整日志,是间歇性的报错, 而且在数据库中查询,数据最终也慢慢的写进去了。

taos> show tables;
           table_name           |      created_time       | columns |          stable_name           |
======================================================================================================
 link_msg_5fa3d07b902743ce859b7 | 2020-10-16 12:08:35.310 |       3 | link_msg                       |
 link_msg_5fa3d07b902743ce859b7 | 2020-10-16 12:08:39.261 |       3 | link_msg                       |
 comm_msg_5fa3d07b902743ce859b7 | 2020-10-16 12:09:14.422 |      14 | comm_msg                       |
 comm_msg_5fa3d07b902743ce859b7 | 2020-10-16 12:09:14.394 |      14 | comm_msg                       |
Query OK, 4 row(s) in set (0.002134s)

taos> select count(*) from link_msg;
       count(*)        |
========================
                123696 |
Query OK, 1 row(s) in set (0.003353s)

taos> 

Taos日志:

root@izwz9ew6olkvujaih3oi5xz:/var/log/taos  # cat taos* |grep link_msg|more
10/16 14:02:43.154013 0x7fef8cc94700 TDB vgId:3 table link_msg tid -1 uid 105042484446494738 is added to meta
10/16 14:02:43.154021 0x7fef8cc94700 TDB vgId:3 table link_msg_5fa3d07b902743ce859b7d5379d5b2d9_261608a0008b tid 1 uid 844424946914739 is added to meta
10/16 14:02:43.154034 0x7fef8cc94700 TDB vgId:3 table link_msg_5fa3d07b902743ce859b7d5379d5b2d9_00093ec10212 tid 2 uid 844424963692060 is added to meta
10/16 14:02:43.156686 0x7fef9b6f4740 SDB table:stables, record from wal/fwd is disposed, action:insert record:0.saftop_rt.link_msg ver:19
10/16 14:02:43.156690 0x7fef9b6f4740 SDB table:stables, insert record:0.saftop_rt.link_msg to hash, rowSize:423 numOfRows:4, msg:(nil)
10/16 14:02:43.156739 0x7fef9b6f4740 SDB table:ctables, record from wal/fwd is disposed, action:insert record:0.saftop_rt.link_msg_5fa3d07b902743ce859b7d5379d5b2d9_261608a0008b ver:22
10/16 14:02:43.156748 0x7fef9b6f4740 SDB table:ctables, insert record:0.saftop_rt.link_msg_5fa3d07b902743ce859b7d5379d5b2d9_261608a0008b to hash, rowSize:131 numOfRows:5, msg:(nil)
10/16 14:02:43.156756 0x7fef9b6f4740 MND table:0.saftop_rt.link_msg, vgId:3 is put into stable vgList, sizeOfVgList:1
10/16 14:02:43.156762 0x7fef9b6f4740 SDB table:ctables, record from wal/fwd is disposed, action:insert record:0.saftop_rt.link_msg_5fa3d07b902743ce859b7d5379d5b2d9_00093ec10212 ver:23
10/16 14:02:43.156770 0x7fef9b6f4740 SDB table:ctables, insert record:0.saftop_rt.link_msg_5fa3d07b902743ce859b7d5379d5b2d9_00093ec10212 to hash, rowSize:131 numOfRows:6, msg:(nil)
10/16 14:03:58.666770 0x7fef8cc94700 MND app:0x7f6d8d88eb60:0x7fef8402c590, table:0.saftop_rt.link_msg, is already exist
10/16 14:04:02.094123 0x7fef787f4700 MND app:0x7f6d5c01e5b0:0x7fef40000e20, table:0.log.link_msg, table meta msg is received from thandle:0xf9be30, createFlag:0
10/16 14:04:02.094132 0x7fef787f4700 MND ERROR app:0x7f6d5c01e5b0:0x7fef40000e20, table:0.log.link_msg, failed to get table meta, table not exist
10/16 14:04:02.184742 0x7fef787f4700 MND app:0x7f6d6001b000:0x7fef40000e80, table:0.log.link_msg, table meta msg is received from thandle:0xf9bfa8, createFlag:0
10/16 14:04:02.184756 0x7fef787f4700 MND ERROR app:0x7f6d6001b000:0x7fef40000e80, table:0.log.link_msg, failed to get table meta, table not exist
10/16 14:04:03.642112 0x7fef787f4700 MND app:0x7f6d68031720:0x7fef40000e30, table:0.log.link_msg, table meta msg is received from thandle:0xf9bfa8, createFlag:0
10/16 14:04:03.642120 0x7fef787f4700 MND ERROR app:0x7f6d68031720:0x7fef40000e30, table:0.log.link_msg, failed to get table meta, table not exist
10/16 14:04:03.695028 0x7fef8d495700 MND app:0x7f6d8d705590:0x7fef40000e30, table:0.log.link_msg, table meta msg is received from thandle:0xf9bfa8, createFlag:0
10/16 14:04:03.695037 0x7fef8d495700 MND ERROR app:0x7f6d8d705590:0x7fef40000e30, table:0.log.link_msg, failed to get table meta, table not exist
10/16 14:04:04.715011 0x7fef8d495700 MND app:0x1c02c90:0x7fef40000e30, table:0.log.link_msg, table meta msg is received from thandle:0xf9bfa8, createFlag:0
10/16 14:04:04.715021 0x7fef8d495700 MND ERROR app:0x1c02c90:0x7fef40000e30, table:0.log.link_msg, failed to get table meta, table not exist
10/16 14:04:04.854966 0x7fef8d495700 MND app:0x7f6d2c00bf00:0x7fef40000e80, table:0.saftop_rt.link_msg, table meta msg is received from thandle:0xf9c120, createFlag:0
10/16 14:04:04.855008 0x7fef8d495700 MND app:0x7f6d2c00bf00:0x7fef40000e80, stable:0.saftop_rt.link_msg, uid:105042484446494738 table meta is retrieved
10/16 14:04:04.855500 0x7fef787f4700 MND app:0x7f6d50005d30:0x7fef400008d0, table:0.saftop_rt.link_msg_5fa3d07b902743ce859b7d5379d5b2d9_00093ec10212, table meta msg is received from thandle:0
xf9c120, createFlag:1
10/16 14:04:04.855526 0x7fef787f4700 MND app:0x7f6d50005d30:0x7fef400008d0, table:0.saftop_rt.link_msg_5fa3d07b902743ce859b7d5379d5b2d9_00093ec10212, uid:844424963692060 table meta is retriev
ed, vgId:3 sid:2
10/16 14:04:05.888595 0x7fef787f4700 MND app:0x7f6d300aa0e0:0x7fef40000e30, table:0.log.link_msg, table meta msg is received from thandle:0xf9bfa8, createFlag:0
10/16 14:04:05.888604 0x7fef787f4700 MND ERROR app:0x7f6d300aa0e0:0x7fef40000e30, table:0.log.link_msg, failed to get table meta, table not exist
10/16 14:04:06.007244 0x7fef8d495700 MND app:0x7f6d3c024a00:0x7fef40000e30, table:0.log.link_msg, table meta msg is received from thandle:0xf9bfa8, createFlag:0
10/16 14:04:06.007254 0x7fef8d495700 MND ERROR app:0x7f6d3c024a00:0x7fef40000e30, table:0.log.link_msg, failed to get table meta, table not exist
10/16 14:04:06.949683 0x7fef787f4700 MND app:0x7f6d400136f0:0x7fef40000e30, table:0.log.link_msg, table meta msg is received from thandle:0xf9bfa8, createFlag:0
10/16 14:04:06.949693 0x7fef787f4700 MND ERROR app:0x7f6d400136f0:0x7fef40000e30, table:0.log.link_msg, failed to get table meta, table not exist
10/16 14:04:07.120497 0x7fef8d495700 MND app:0x7f6d4cae2810:0x7fef40000e30, table:0.log.link_msg, table meta msg is received from thandle:0xf9bfa8, createFlag:0
10/16 14:04:07.120506 0x7fef8d495700 MND ERROR app:0x7f6d4cae2810:0x7fef40000e30, table:0.log.link_msg, failed to get table meta, table not exist
10/16 14:04:08.106625 0x7fef8d495700 MND app:0x7f6d48244ce0:0x7fef40000cf0, table:0.log.link_msg, table meta msg is received from thandle:0xf9bfa8, createFlag:0
10/16 14:04:08.106635 0x7fef8d495700 MND ERROR app:0x7f6d48244ce0:0x7fef40000cf0, table:0.log.link_msg, failed to get table meta, table not exist
10/16 14:04:08.194085 0x7fef787f4700 MND app:0x7f6d50013590:0x7fef40000cf0, table:0.log.link_msg, table meta msg is received from thandle:0xf9bfa8, createFlag:0
10/16 14:04:08.194094 0x7fef787f4700 MND ERROR app:0x7f6d50013590:0x7fef40000cf0, table:0.log.link_msg, failed to get table meta, table not exist
10/16 14:04:09.330799 0x7fef787f4700 MND app:0x7f6d60026020:0x7fef40000cf0, table:0.log.link_msg, table meta msg is received from thandle:0xf9bfa8, createFlag:0
10/16 14:04:09.330809 0x7fef787f4700 MND ERROR app:0x7f6d60026020:0x7fef40000cf0, table:0.log.link_msg, failed to get table meta, table not exist
10/16 14:04:09.452915 0x7fef8d495700 MND app:0x7f6d5c08b350:0x7fef40000cf0, table:0.log.link_msg, table meta msg is received from thandle:0xf9bfa8, createFlag:0
10/16 14:04:09.452925 0x7fef8d495700 MND ERROR app:0x7f6d5c08b350:0x7fef40000cf0, table:0.log.link_msg, failed to get table meta, table not exist
10/16 14:04:10.410386 0x7fef8d495700 MND app:0x7f6d64017a70:0x7fef40000cf0, table:0.log.link_msg, table meta msg is received from thandle:0xf9bfa8, createFlag:0
10/16 14:04:10.410397 0x7fef8d495700 MND ERROR app:0x7f6d64017a70:0x7fef40000cf0, table:0.log.link_msg, failed to get table meta, table not exist

详细日志见附件:

log.zip

zyyang90 commented 4 years ago

感谢您的问题,我在尝试查找这个问题的原因

ljia310 commented 4 years ago

感谢及时回复,有需要其他方面的信息,可以联系我。

ljia310 commented 4 years ago

感谢您的问题,我在尝试查找这个问题的原因

请问进展如何?是bug还是我使用方式有问题?

zyyang90 commented 4 years ago

感谢您的问题,我在尝试查找这个问题的原因

请问进展如何?是bug还是我使用方式有问题?

我还在检查这个问题,建议您不要在批量插入时直接使用now来代替时间戳,因为重复的时间戳在插入数据时是无效的。如果可以,请提供一下客户端的日志。日志位于C:/TDegnine/log(windows客户端),或者/var/log/taos(linux)下,谢谢

ljia310 commented 4 years ago

感谢您的问题,我在尝试查找这个问题的原因

请问进展如何?是bug还是我使用方式有问题?

我还在检查这个问题,建议您不要在批量插入时直接使用now来代替时间戳,因为重复的时间戳在插入数据时是无效的。如果可以,请提供一下客户端的日志。日志位于C:/TDegnine/log(windows客户端),或者/var/log/taos(linux)下,谢谢

最上面的附件log.zip就是taos的日志,开启debug后记录的。

ljia310 commented 4 years ago

批量插入时直接使用now是手工验证时写的,实际代码是使用设备上报的时间写入的。 image

liangyuanpeng commented 4 years ago

也许可以发一个能够重现这个问题的最简代码

ljia310 commented 4 years ago

也许可以发一个能够重现这个问题的最简代码

预先创建超级表。 image

然后从rocketmq中批量订阅消息,批量写入(采用动态创建表的方式)。 image

mybatis map image xml image

RaykieLee commented 3 years ago

我也出现了这个问题,而且不是批量插入的,大概10s插入一条数据,用的也是自动建表语句

blydd commented 3 years ago

同样问题+1,不是批量插入,用的自动建表语句,之前测试环境遇到过没解决成功,后来自动好了,现在生产环境又出现了。。。

zyyang90 commented 2 years ago

This issue is stale because it has been open for 30 days with no activity.