【解决了一个小问题】vmselect对应的vmstorage端口配置错误导致的问题

从vmselect查询的时候,出现如下错误:

error when executing query="up" on the time range (start=1639388706000, end=1639392306000, step=1441): cannot execute query: cannot evaluate "up": error occured during search: cannot fetch query results from vmstorage nodes: cannot perform search on vmstorage xx.145.68.171:8482: cannot obtain connection from a pool: cannot perform "vmselect" handshake with server "xx.145.68.171:8482": cannot read success response after sending hello: cannot read message with size 2: read tcp4 xx.145.69.165:38408->xx.145.68.171:8482: i/o timeout; read only 0 bytes

后来发现vmstorage启动后,有三个端口,分别是:expoter端口, 开放给vminsert的端口,开放给vmselect的端口。
see: https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#list-of-command-line-flags-for-vmstorage

  -vminsertAddr string
    	TCP address to accept connections from vminsert services (default ":8400")
  -vmselectAddr string
    	TCP address to accept connections from vmselect services (default ":8401")
  • 配置好以上端口后,可以访问vmselect的如下位置来查询:http://xxxx:8481/select/0/vmui
  • 此外:vmagent中,写入路径这里要配置为:-remoteWrite.url "http://{{.vm_insert_addr}}/api/v1/write"

posted on 2021-12-14 11:01  ahfuzhang  阅读(797)  评论(0编辑  收藏  举报