安装tidb时自定义路径,报错说没有这个文件或者路径

【TiDB 使用环境】测试
【TiDB 版本】v8.5.2
【操作系统】centos7
tiup cluster deploy tidb145 v8.5.2 /root/tidb-cluster-config/topology.yaml --user root -p
执行以上安装命令以后 运行tiup命令提示错误信息 请教下安装自定义路径时需要修改哪些配置?
以下是报错信息
Error: initial repository from mirror(https://tiup-mirrors.pingcap.com/) failed: error loading manifest root.json: open /root/.tiup/bin/root.json: no such file or directory

你直接ls这个路径有东西嘛?

就2个可能,路径就不存在/没访问权限。

另外很有可能之前装tiup就不是root装的。所以这个.tiup目录就不在/root/下,会在/home/{装tiup的用户}/下面。

/root/.tiup/bin/root.json 这个路径是没有的
我安装前指定了路径 home
export TIUP_HOME=/home/tiup
/home/tiup/bin/root.json 是有的

1 个赞

感觉是哪里的配置没调好 运行时还在读默认安装的这个路径

设置TIUP_HOME=/home/tiup 有关,在查查这块内容

不行就弄个软连接过去。

看一下TiUP 的安装路径或配置路径

参照 迁移操作 执行一下试试

https://docs.pingcap.com/zh/tidb/stable/tiup-cluster#迁移中控机与备份

感谢各位大佬的回复 应该是之前没有卸载好导致的 我把服务器上的tiup tidb彻底卸载后重新安装 正常了
不过还是卡在那个系统设置ssh上了 有没有指定路径安装的详细图文教程?

系统设置 ssh 是指啥操作?

这个错误 与自定义安装路径无关,而是 TiUP 初始化失败导致的。

应该是的 这个应该怎么解决呢?
我把home/tiup/bin/root.json复制到root/.tiup/bin/root.json中 程序能跑起来

  • Detect CPU Arch Name
    • Detecting node 192.168.40.145 Arch info … Error

Error: failed to fetch cpu-arch or kernel-name: executor.ssh.execute_failed: Failed to execute command over SSH for ‘tidb@192.168.40.145:22’ {ssh_stderr: , ssh_stdout: , ssh_command: export LANG=C; PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin; /usr/bin/sudo -H bash -c “uname -m”}, cause: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none], no supported methods remain
我这边设定了home的路径后 安装tiup以后 在执行tiup命令就会报这个错

账号密码输入的对么?

账号密码是对的

接个 --ssh=“system”

试试



这是我的执行步骤

# Global variables are applied to all deployments and used as the default value of

# the deployments if a specific deployment value is missing.

global:
user: “tidb”
ssh_port: 22
deploy_dir: “/home/tidb-deploy”
data_dir: “/home/tidb-data”

# Monitored variables are applied to all the machines.

monitored:
node_exporter_port: 9100
blackbox_exporter_port: 9115

server_configs:
tidb:
instance.tidb_slow_log_threshold: 300
tikv:
readpool.storage.use-unified-pool: false
readpool.coprocessor.use-unified-pool: true
pd:
replication.enable-placement-rules: true
replication.location-labels: [“host”]
tiflash:
logger.level: “info”

pd_servers:

  • host: 192.168.40.145

tidb_servers:

  • host: 192.168.40.145

tikv_servers:

  • host: 192.168.40.145
    port: 20160
    status_port: 20180
    config:
    server.labels: { host: “logic-host-1” }

  • host: 192.168.40.145
    port: 20161
    status_port: 20181
    config:
    server.labels: { host: “logic-host-2” }

  • host: 192.168.40.145
    port: 20162
    status_port: 20182
    config:
    server.labels: { host: “logic-host-3” }

tiflash_servers:

  • host: 192.168.40.145

monitoring_servers:

  • host: 192.168.40.145

grafana_servers:

  • host: 192.168.40.145

这个是配置