Comments (18)
@sangshuduo
解决了。
重现场景:
BLM运行的节点(虚拟机)和TDengine服务端的运行节点(集群中的任意一个)不是同一个时。
问题原因:
1、BLM所在节点的客户端的hosts没有配置
2、需要使用hostname作为configHost
3、taos.config,配置文件的keep值不符合“keep>=days”条件。(默认keep=3650和days=10,keep被我改小了)
解决办法:
1、添加TDengine所在节点的hostname解析到BLM所在节点的 /etc/hosts
2、使用hostname作为configHost
nohup ./blm_prometheus --tdengine-ip {hostname} --dbname prometheus --port {port} > /dev/null 2>&
1 &
3、keep属性改大于days
@zitsen 感谢!
from bailongma.
@sangshuduo @liuyq-617 @liu0x54 @fangpanpan 有时间帮忙看看么
from bailongma.
在同一台机器上跑 tdengine,blm 和 prometheus 可以吗?
from bailongma.
@sangshuduo 都在同一台机器就可以,这是什么原因,主要是这几台机器之前网络也是通的。
from bailongma.
telnet 目标的TDengine 机器的 6030 端口也是通的
from bailongma.
tcpdump 抓包看看有没有数据包
from bailongma.
from bailongma.
BLM_PRM2021/03/11 10:24:11 server.go:155: host: ip
BLM_PRM2021/03/11 10:24:11 server.go:156: 172.18.5.18:0
BLM_PRM2021/03/11 10:24:11 server.go:157: port:
BLM_PRM2021/03/11 10:24:11 server.go:158: 10203
BLM_PRM2021/03/11 10:24:11 server.go:159: database:
BLM_PRM2021/03/11 10:24:11 server.go:160: prometheus
BLM_PRM2021/03/11 10:24:19 server.go:596: taos_connect() fail!
BLM_PRM2021/03/11 10:24:23 server.go:588: execSql Error: taos_connect() fail! sqlcmd: alter table apisix_etcd_modify_indexes add tag t_instance binary(128)
BLM_PRM2021/03/11 10:24:23 server.go:403: taos_connect() fail!
from bailongma.
创建表和数据库的连接字符串不对吧?
官方文档golang的是user:password@/tcp(host:port)/dbname
但是实际建表用的rpc连接,打开连接时用的daemonIP的取值是ip:0,也就是端口写死的是0,不知道跟这个有没有关系
https://github.com/taosdata/Bailongma/blob/master/blm_prometheus/server.go#L132-L144
from bailongma.
@hendsame 这个问题还存在吗?
from bailongma.
之前是都在一台机器是可以的,后来还没来得及验证多台机器情况。刚好这几天准备再试试,到时候我在这里反馈下
from bailongma.
会报这些错误,和上面的 @anjia0532 说的一样
BLM_PRM2021/05/07 13:40:45 server.go:155: host: ip
BLM_PRM2021/05/07 13:40:45 server.go:156: 10.70.21.224:0
BLM_PRM2021/05/07 13:40:45 server.go:157: port:
BLM_PRM2021/05/07 13:40:45 server.go:158: 8989
BLM_PRM2021/05/07 13:40:45 server.go:159: database:
BLM_PRM2021/05/07 13:40:45 server.go:160: prometheus
BLM_PRM2021/05/07 13:40:45 server.go:596: Invalid database name
BLM_PRM2021/05/07 13:40:48 server.go:588: execSql Error: taos_connect() fail! sqlcmd: create table if not exists go_gc_duration_seconds (ts timestamp,
value double) tags(taghash binary(34),t_instance binary(128),t_job binary(128),t_quantile binary(128))
from bailongma.
@hendsame 可以试一下在跑 BLM 这台机器上用 taos 客户端连另一个机器的 taosd 进行一些基本操作,比如建库、建表、插入数据、查询,看是不是网络端口没开或者 FQDN 不一致导致的连接问题
from bailongma.
@sangshuduo
用taos 客户端是可以的
from bailongma.
@hendsame 使用taos 客户端create database 和 create table 是否正常?
from bailongma.
@zitsen
这个有异常。
from bailongma.
经验来看,应该是fqdn没有配置好。您的情况应该是TDengine和客户端运行节点不一样,而客户端的host没有配置的原因。解决方法应该是:
- 添加hostname解析到/etc/hosts
- 使用hostname作为configHost
from bailongma.
我今天休假了,不方便处理,你可以搜下文档对fqdn的说明,有什么问题可以加我同名微信。
from bailongma.
Related Issues (16)
- fatal error: 'taos.h' file not found HOT 8
- error:too many open files HOT 3
- 启动报错 connection refused HOT 1
- 接入 TDEngine 后的 grafana 表达式 HOT 3
- 重新发一个docker镜像吧 HOT 1
- Bailongma can not connect to taos db cluster in kubernetes HOT 8
- 有没有考虑适配Opentsdb HOT 1
- 工程编译问题 HOT 16
- 离线环境无法编译 HOT 3
- 编译 blm_prometheus 报错 HOT 2
- The file "server.go" can't build in TDengine 2.0.3.1 (blm_promepheus) HOT 1
- 提供主流平台的预编译二进制文件会更方便
- blm_prometheus 可能存在内存泄漏,使用内存一直在增长 HOT 3
- 启动后运行一会儿报错 HOT 2
- 能支持prometheus读么? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bailongma.