zoukankan      html  css  js  c++  java
  • tidb集群某个节点报错之:node_exporter-9100.service failed

    今天启动集群tidb时出现一个错误,是某个tikv节点报错:node_exporter-9100.service  failed

    一个节点的问题会导致整个集群启动失败。去此节点下的日志文件中查找,发现没有什么报错原因。无奈此时只能去系统日志中查看发生了什么问题

    果然发现了问题

    Jan 16 15:35:05 ip-172-31-26-133 systemd-logind: New session 2045 of user tidb.
    Jan 16 15:35:05 ip-172-31-26-133 systemd: Started Session 2045 of user tidb.
    Jan 16 15:35:05 ip-172-31-26-133 systemd: Starting Session 2045 of user tidb.
    Jan 16 15:35:05 ip-172-31-26-133 ansible-stat: Invoked with checksum_algorithm=sha1 get_checksum=False follow=False path=/home/tidb/deploy get_md5=False get_mime=True get_attributes=True
    Jan 16 15:35:05 ip-172-31-26-133 ansible-stat: Invoked with checksum_algorithm=sha1 get_checksum=False follow=False path=/data/data_tidb get_md5=False get_mime=True get_attributes=True
    Jan 16 15:35:08 ip-172-31-26-133 ansible-systemd: Invoked with no_block=False force=None name=node_exporter-9100.service enabled=False daemon_reload=False state=started user=False masked=None
    Jan 16 15:35:09 ip-172-31-26-133 ansible-wait_for: Invoked with host=172.31.26.133 send=GET /metrics HTTP/1.0#015#012#015#012 port=9100 delay=0 state=present sleep=1 timeout=300 exclude_hosts=None search_regex=200 OK path=None connect_timeout=5
    Jan 16 15:35:17 ip-172-31-26-133 systemd: node_exporter-9100.service holdoff time over, scheduling restart.
    Jan 16 15:35:17 ip-172-31-26-133 systemd: Started node_exporter-9100 service.
    Jan 16 15:35:17 ip-172-31-26-133 systemd: Starting node_exporter-9100 service...
    Jan 16 15:35:17 ip-172-31-26-133 systemd: Failed at step EXEC spawning /home/tidb/deploy/scripts/run_node_exporter.sh: No such file or directory
    Jan 16 15:35:17 ip-172-31-26-133 systemd: node_exporter-9100.service: main process exited, code=exited, status=203/EXEC
    Jan 16 15:35:17 ip-172-31-26-133 systemd: Unit node_exporter-9100.service entered failed state.
    Jan 16 15:35:17 ip-172-31-26-133 systemd: node_exporter-9100.service failed.
    Jan 16 15:35:32 ip-172-31-26-133 systemd: node_exporter-9100.service holdoff time over, scheduling restart.
    Jan 16 15:35:32 ip-172-31-26-133 systemd: Started node_exporter-9100 service.
    Jan 16 15:35:32 ip-172-31-26-133 systemd: Starting node_exporter-9100 service...
    Jan 16 15:35:32 ip-172-31-26-133 systemd: Failed at step EXEC spawning /home/tidb/deploy/scripts/run_node_exporter.sh: No such file or directory
    Jan 16 15:35:32 ip-172-31-26-133 systemd: node_exporter-9100.service: main process exited, code=exited, status=203/EXEC
    Jan 16 15:35:32 ip-172-31-26-133 systemd: Unit node_exporter-9100.service entered failed state.
    Jan 16 15:35:32 ip-172-31-26-133 systemd: node_exporter-9100.service failed.

    从日志中我们发现了问题所在,其实报错原因是不能启动9100这个node_exporter服务,因为缺少脚本导致的。后来对比一下其他集群节点,原来是集群中的每个节点的tidb用户的家目录下都有一个“deploy”的目录,但是报错的这个节点的deploy目录却没有,不知道是什么原因给删除了,所以我们不得不重新在tidb用户家目录下建立一个deploy目录,我们不必手工来创建,直接在中控机操作即可。解决方法如下:

    1、现在我们在中控机上执行这一步骤。

    这里的 -l 后面的ip是报错的这个节点的IP。

     2、执行成功之后,我们就可以看到这个家目录下的deploy目录了。

    3、有了这个目录,那我们就能启动成功了,这个时候再去中控机启动集群,就成功了。本次成功解决问题。

    所以我发现出先问题去两个地方找:一个是tidb节点的错误日志,还有一个是系统日志。

  • 相关阅读:
    生信入门-爱课程上的华中农业大学
    PAT 1115 Counting Nodes in a BST[构建BST]
    PAT 1133 Splitting A Linked List[链表][简单]
    PAT 1037 Magic Coupon[dp]
    PAT 1033 To Fill or Not to Fill[dp]
    畅通工程续 HDU1874
    Free DIY Tour HDU1224
    六度分离 HDU1869
    Arbitrage HDU1217
    floyed算法
  • 原文地址:https://www.cnblogs.com/FengGeBlog/p/10277917.html
Copyright © 2011-2022 走看看