启动项目提示TDengine ERROR (0xb)

Blade 未结 2 129
14988
14988 2024-10-17 18:05

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

1. 启动项目

2. 

3.


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

启动正常

org.springframework.jdbc.UncategorizedSQLException: StatementCallback; uncategorized SQLException for SQL [CREATE DATABASE IF NOT EXISTS links PRECISION 'ms' CACHEMODEL 'last_value' KEEP 3650 DURATION 10 BUFFER 16 WAL_LEVEL 1

]; SQL state []; error code [11]; TDengine ERROR (0xb): sql: CREATE DATABASE IF NOT EXISTS links PRECISION 'ms' CACHEMODEL 'last_value' KEEP 3650 DURATION 10 BUFFER 16 WAL_LEVEL 1

, desc: Unable to establish connection

at org.springframework.jdbc.core.JdbcTemplate.translateException(JdbcTemplate.java:1549)

at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:408)

at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:567)

at org.springblade.iot.tsdb.tdengine.dao.TDEngineTemplate.createDatabase(TDEngineTemplate.java:67)

at org.springblade.iot.tsdb.tdengine.dao.TDEngineTemplate.afterSingletonsInstantiated(TDEngineTemplate.java:444)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:986)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:971)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:625)

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)

at org.springframework.boot.SpringApplication.run(SpringApplication.java:335)

at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:149)

at org.springblade.core.launch.BladeApplication.run(BladeApplication.java:49)

at org.springblade.mqtt.broker.BrokerApplication.main(BrokerApplication.java:43)

Caused by: java.sql.SQLException: TDengine ERROR (0xb): sql: CREATE DATABASE IF NOT EXISTS links PRECISION 'ms' CACHEMODEL 'last_value' KEEP 3650 DURATION 10 BUFFER 16 WAL_LEVEL 1

, desc: Unable to establish connection

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 org.springframework.jdbc.core.JdbcTemplate$1UpdateStatementCallback.doInStatement(JdbcTemplate.java:555)

at org.springframework.jdbc.core.JdbcTemplate$1UpdateStatementCallback.doInStatement(JdbcTemplate.java:552)

at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:393)

... 13 common frames omitted

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

bladex-links  windows

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


五、若有更多详细信息,请在下面提供。

2条回答
  •  14988
    14988 (楼主)
    2024-10-18 08:57

    tdengine访问链接成功的

    作者追问:2024-10-18 08:57

    先把你自己安装的tdengine服务关掉,再在本地跑一个tdengne默认的docker服务,然后后端的tdengine连接配置也先不改,启动后端看看控制台的日志是什么

    docker run -d \
      --name tdengine \
      -p 6030-6049:6030-6049 \
      -p 6030-6049:6030-6049/udp \
      -p 6060:6060 \
      tdengine/tdengine


提交回复