将测试数据插入到TDengine服务器中,但返回了[0x15]错误。

huangapple go评论64阅读模式
英文:

insert test data into TDengine server but it return [0x15] err

问题

我写了一段Go代码来连接Windows上的TDengine服务器,代码如下:

var taosuri = "root:taosdata/tcp(10.233.65.65:6030)/"
s, err := sql.Open("taosSql", taosuri)

if err != nil {
    fmt.Errorf("failed to connect TDengine, err:%v", err)
    return nil, nil, err
}
fmt.Println(s.Ping())
fmt.Println(s.Exec(`insert into test.tb1 values(now+1s, 2)`))

但是我得到了一个错误码0x15。

为什么会出现这个错误?

英文:

I wrote a piece of go code to connect TDengine server from Windows as below:

var taosuri = "root:taosdata/tcp(10.233.65.65:6030)/"
s, err := sql.Open("taosSql", taosuri)

if err != nil {
fmt.Errorf("failed to connect TDengine, err:%v", err)
return nil, nil, err
}
fmt.Println(s.Ping())
fmt.Println(s.Exec(`insert into test.tb1 values(now+1s, 2)`))

But I got an error 0x15.

Why?

答案1

得分: 0

你可以从源代码 src/inc/taoserror.h 中找到 0x15 表示 "无法解析 FQDN"。

#define TSDB_CODE_RPC_FQDN_ERROR                TAOS_DEF_ERROR_CODE(0, 0x0015)  //"Unable to resolve FQDN"
英文:

You can find 0x15 means "Unable to resolve FQDN" from the source code src/inc/taoserror.h.

#define TSDB_CODE_RPC_FQDN_ERROR                TAOS_DEF_ERROR_CODE(0, 0x0015)  //"Unable to resolve FQDN"

huangapple
  • 本文由 发表于 2022年3月2日 14:16:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/71318199.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定