part error|maxSQLLength
rexel-cn opened this issue · comments
go版本:1.18
td版本:2.6.0.12
driver-go版本:github.com/taosdata/driver-go/v2 v2.0.5
尝试在通过客户端配置maxSQLLength连接参数,配置格式如下:
var taosUri = fmt.Sprintf("%s:%s@tcp(%s)/log?maxSQLLength=%d", td2.User, td2.Password, td2.Url, td2.MaxSQLLength)
客户端连接程序启动之后报错:
2022-11-14T18:12:35.912+0800 ERROR tdengine2/tdengine2.go:114 part error|maxSQLLength {"storage": "tdengine2"}
@rexel-cn what is the value of td2.MaxSQLLength?
@huskar-t 为配置文件中的配置参数,如下:
tdengine2:
url: td-1:6030
user: root
password: RexelRoot
replica: 1
maxSQLLength: 1048576
i have tested locally and no errors appear, please print taosUri
@rexel-cn
go 程序和 TDengine 分别运行在什么操作系统平台?看起来不像是同一台机器
td运行环境:Ubuntu 18.04.6(docker容器)
go客户端运行环境:ubuntu 22.04(docker容器)
package main
import (
"database/sql"
"fmt"
_ "github.com/taosdata/driver-go/v2/taosSql"
)
func main() {
url := "root:RexelRoot@tcp(td-1:6030)/log?maxSQLLength=1048576"
fmt.Println(url)
db, err := sql.Open("taosSql", url)
if err != nil {
panic(err)
}
defer db.Close()
err = db.Ping()
if err != nil {
panic(err)
}
}
试一下上面的代码是否出错
可以添加下微信我们做下远程排查 : 15652223354
先暂时关掉了,后面继续验证的时候再确认,多谢