Code Monkey home page Code Monkey logo

Comments (18)

kim-up avatar kim-up commented on May 29, 2024 3

@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.

kim-up avatar kim-up commented on May 29, 2024

@sangshuduo @liuyq-617 @liu0x54 @fangpanpan 有时间帮忙看看么

from bailongma.

sangshuduo avatar sangshuduo commented on May 29, 2024

在同一台机器上跑 tdengine,blm 和 prometheus 可以吗?

from bailongma.

kim-up avatar kim-up commented on May 29, 2024

@sangshuduo 都在同一台机器就可以,这是什么原因,主要是这几台机器之前网络也是通的。

from bailongma.

kim-up avatar kim-up commented on May 29, 2024

telnet 目标的TDengine 机器的 6030 端口也是通的

from bailongma.

sangshuduo avatar sangshuduo commented on May 29, 2024

tcpdump 抓包看看有没有数据包

from bailongma.

anjia0532 avatar anjia0532 commented on May 29, 2024

没有自动建库,手动创建后,又报表没有创建
image

from bailongma.

anjia0532 avatar anjia0532 commented on May 29, 2024
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.

anjia0532 avatar anjia0532 commented on May 29, 2024

创建表和数据库的连接字符串不对吧?
官方文档golang的是user:password@/tcp(host:port)/dbname
但是实际建表用的rpc连接,打开连接时用的daemonIP的取值是ip:0,也就是端口写死的是0,不知道跟这个有没有关系
image
image
https://github.com/taosdata/Bailongma/blob/master/blm_prometheus/server.go#L132-L144
image

from bailongma.

sangshuduo avatar sangshuduo commented on May 29, 2024

@hendsame 这个问题还存在吗?

from bailongma.

kim-up avatar kim-up commented on May 29, 2024

之前是都在一台机器是可以的,后来还没来得及验证多台机器情况。刚好这几天准备再试试,到时候我在这里反馈下

from bailongma.

kim-up avatar kim-up commented on May 29, 2024

@sangshuduo

会报这些错误,和上面的 @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.

sangshuduo avatar sangshuduo commented on May 29, 2024

@hendsame 可以试一下在跑 BLM 这台机器上用 taos 客户端连另一个机器的 taosd 进行一些基本操作,比如建库、建表、插入数据、查询,看是不是网络端口没开或者 FQDN 不一致导致的连接问题

from bailongma.

kim-up avatar kim-up commented on May 29, 2024

@sangshuduo
用taos 客户端是可以的

image

from bailongma.

zitsen avatar zitsen commented on May 29, 2024

@hendsame 使用taos 客户端create database 和 create table 是否正常?

from bailongma.

kim-up avatar kim-up commented on May 29, 2024

@zitsen
这个有异常。

image

from bailongma.

zitsen avatar zitsen commented on May 29, 2024

经验来看,应该是fqdn没有配置好。您的情况应该是TDengine和客户端运行节点不一样,而客户端的host没有配置的原因。解决方法应该是:

  1. 添加hostname解析到/etc/hosts
  2. 使用hostname作为configHost

from bailongma.

zitsen avatar zitsen commented on May 29, 2024

我今天休假了,不方便处理,你可以搜下文档对fqdn的说明,有什么问题可以加我同名微信。

from bailongma.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.