tidb集群某个节点报错之:node_exporter-9100.service failed
2024-10-11 03:31:59
今天启动集群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节点的错误日志,还有一个是系统日志。
最新文章
- c模拟c++ const 转换
- Chrome开发者工具不完全指南(五、移动篇)
- iOS10 UI教程视图的生命周期
- Radar Installation
- bzoj 1637: [Usaco2007 Mar]Balanced Lineup
- MySQL 中的 FOUND_ROWS() 与 ROW_COUNT() 函数
- WPF捕捉Windows关机事件
- anisotropy texture filtering
- C char** 的一点儿理解
- 剑指Offer:面试题11——数值的整数次方(java实现)
- c++ 获取本地ip地址
- 【MongoDB】应用场景
- Hibernate(四)
- Spring Security入门(3-5)Spring Security 的鉴权 - 决策管理器和投票器
- 从三个开源项目认识OpenFlow交换机 - OVS
- python之路-模块初识
- 【Beta Scrum】冲刺! 1/5
- linux优化之全过程
- Silverlight 图表控件 Visifire 常用属性
- CodeForces 985D Sand Fortress
热门文章
- Ajax经典交互讲解
- 关系型数据库 VS NOSQL
- #11 Python字典
- Java设计模式学习记录-责任链模式
- Mybatis缓存(1)--------系统缓存及简单配置介绍
- 所生成项目的处理器架构“MSIL”与引用“Microsoft.AspNet.Scaffolding.12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=x86”的处理器架构“x86”不匹配。
- angularjs学习第四天笔记(第一篇:简单的表单验证)
- [PHP] 算法-复制复杂链表的PHP实现
- 【Servlet】1、Servlet监听器及相关接口
- Ubuntu(14.04LTS)学习札记