使用tiup安装tidb集群,检查时报错numactl not usable。

【 TiDB 使用环境】生产环境
【 TiDB 版本】8.5.1
【复现路径】使用tiup安装tidb,使用最小集群模式。 使用 TiUP 部署 TiDB 集群 | TiDB 文档中心 (pingcap.com) 在执行检查集群存在的潜在风险 步骤时,报错numactl not usable,
【遇到的问题:问题现象及影响】错numactl not usable, /etc/profile.d/devtoolset-7.sh: line 1: scl_source: No such file or directory /etc/profile.d/devtoolset-7.sh: line 2: scl_source: No such file or directory /etc/profile.d/llvm-toolset-7.sh: line 1: scl_source: No such file or directory /etc/profile.d/llvm-toolset-7.sh: line 2: scl_source: No such file or directory /etc/profile.d/llvm-toolset-7.sh: line 4: scl_source: No such file or directory bash: numactl: command not found
【资源配置】进入到 TiDB Dashboard -集群信息 (Cluster Info) -主机(Hosts) 截图此页面
【复制黏贴 ERROR 报错的日志】
【其他附件:截图/日志/监控】

最小配置的topology.yaml 配置如下:global:
user: “tidb”
ssh_port: 22
deploy_dir: “/tidb-deploy”
data_dir: “/tidb-data”
server_configs: {}
pd_servers:

  • host: 10.0.1.4
    tidb_servers:
  • host: 10.0.1.4
    tikv_servers:
  • host: 10.0.1.4
  • host: 10.0.1.2
  • host: 10.0.1.3
    monitoring_servers:
  • host: 10.0.1.4
    grafana_servers:
  • host: 10.0.1.4
    alertmanager_servers:
  • host: 10.0.1.4

已执行sudo yum -y install numactl
成功安装numactl,但检查后仍报上述错误。

检查一下环境变量里是否有numactl命令,which numactl

which numactl 是有输出的,执行numactl命令是没问题的。

所有节点都要安装 numactl

1 个赞

/etc/profile.d/devtoolset-7.sh: line 1: scl_source: No such file or directory /etc/profile.d/devtoolset-7.sh: line 2: scl_source: No such file or directory /etc/profile.d/llvm-toolset-7.sh: line 1: scl_source: No such file or directory /etc/profile.d/llvm-toolset-7.sh: line 2: scl_source: No such file or directory /etc/profile.d/llvm-toolset-7.sh: line 4: scl_source: No such file or directory
这个是环境变量设置有问题,执行一下source /etc/profile看是否报错
另外
bash: numactl: command not found 报错是没找到该命令,确认72.23.4.124已经安装numactl。

1 个赞

听取您建议在124也执行了 sudo yum -y install numactl 显示安装成功,但是在124执行source /etc/profile 有报错,

是的,您的建议是必要的。

建议先处理一下环境变量的问题,重新check

脚本能看下吗?/etc/profile.d/devtoolset-7.sh这个脚本里面有问题,124这台
/etc/profile.d/devtoolset-7.sh: line 1: scl_source: No such file or directory /etc/profile.d/devtoolset-7.sh: line 2: scl_source: No such file or directory /etc/profile.d/llvm-toolset-7.sh: line 1: scl_source: No such file or directory /etc/profile.d/llvm-toolset-7.sh: line 2: scl_source: No such file or directory /etc/profile.d/llvm-toolset-7.sh: line 4: scl_source: No such file or directory bash: numactl: command not found

脚本里面line1和line2,line4
看下

好的好的,您的建议很有必要。

scl_source这个换成绝对路径

明显这个scl_source在相对路径下没有相关文件

对应的文件拷贝过去也行,应该很简单

请问您说的这个scl_source 绝对路径是改哪一部分?

他报错里报哪行改哪行,报错说scl_source这个找不到,也就是说对应的相对路径没找到scl_source这个脚本,稍微调整下就好了

我好急 :joy:

/etc/profile.d/devtoolset-7.sh和/etc/profile.d/llvmtoolset-7.sh
这两个文件应该是之前做scl的gcc版本切换用的,如果不用了可以移动别的目录,重新check一下。