想在本机虚拟机中部署Tidb v7.1.1报错。centos版本7.9

【 TiDB 使用环境】测试
【 TiDB 版本】v7.1.1
【复现路径】做过哪些操作出现的问题
【遇到的问题:问题现象及影响】
在部署tidb时,执行[Deploy TiDB instance]出现如图报错
【资源配置】
【附件:截图/日志/监控】
【部分日志】

2023-07-24T20:29:08.041+0800 ERROR CheckPoint {“host”: “127.0.0.1”, “port”: 22, “user”: “tidb”, “src”: “/root/.tiup/storage/cluster/packages/blackbox_exporter-v0.21.1-linux-amd64.tar.gz”, “dst”: “/home/hxl/tidb/tidb-deploy/monitor-9100/bin/blackbox_exporter-v0.21.1-linux-amd64.tar.gz”, “download”: false, “error”: “failed to scp /root/.tiup/storage/cluster/packages/blackbox_exporter-v0.21.1-linux-amd64.tar.gz to tidb@127.0.0.1:/home/hxl/tidb/tidb-deploy/monitor-9100/bin/blackbox_exporter-v0.21.1-linux-amd64.tar.gz: Process exited with status 1”, “errorVerbose”: “Process exited with status 1\nfailed to scp /root/.tiup/storage/cluster/packages/blackbox_exporter-v0.21.1-linux-amd64.tar.gz to tidb@127.0.0.1:/home/hxl/tidb/tidb-deploy/monitor-9100/bin/blackbox_exporter-v0.21.1-linux-amd64.tar.gz\ngithub.com/pingcap/tiup/pkg/cluster/executor.(*EasySSHExecutor).Transfer\n\tgithub.com/pingcap/tiup/pkg/cluster/executor/ssh.go:207\ngithub.com/pingcap/tiup/pkg/cluster/executor.(*CheckPointExecutor).Transfer\n\tgithub.com/pingcap/tiup/pkg/cluster/executor/checkpoint.go:114\ngithub.com/pingcap/tiup/pkg/cluster/task.(*InstallPackage).Execute\n\tgithub.com/pingcap/tiup/pkg/cluster/task/install_package.go:45\ngithub.com/pingcap/tiup/pkg/cluster/task.(*CopyComponent).Execute\n\tgithub.com/pingcap/tiup/pkg/cluster/task/copy_component.go:64\ngithub.com/pingcap/tiup/pkg/cluster/task.(*Serial).Execute\n\tgithub.com/pingcap/tiup/pkg/cluster/task/task.go:86\ngithub.com/pingcap/tiup/pkg/cluster/task.(*StepDisplay).Execute\n\tgithub.com/pingcap/tiup/pkg/cluster/task/step.go:111\ngithub.com/pingcap/tiup/pkg/cluster/task.(*Parallel).Execute.func1\n\tgithub.com/pingcap/tiup/pkg/cluster/task/task.go:144\nruntime.goexit\n\truntime/asm_amd64.s:1594”, “hash”: “57aeaf4ba0b87b1f9dd0abd6aa08b6c01fe05dd3”, “func”: “github.com/pingcap/tiup/pkg/cluster/executor.(*CheckPointExecutor).Transfer”, “hit”: false}
2023-07-24T20:29:08.041+0800 ERROR CheckPoint {“host”: “127.0.0.1”, “port”: 22, “user”: “tidb”, “src”: “/root/.tiup/storage/cluster/packages/node_exporter-v1.3.1-linux-amd64.tar.gz”, “dst”: “/home/hxl/tidb/tidb-deploy/monitor-9100/bin/node_exporter-v1.3.1-linux-amd64.tar.gz”, “download”: false, “error”: “failed to scp /root/.tiup/storage/cluster/packages/node_exporter-v1.3.1-linux-amd64.tar.gz to tidb@127.0.0.1:/home/hxl/tidb/tidb-deploy/monitor-9100/bin/node_exporter-v1.3.1-linux-amd64.tar.gz: Process exited with status 1”, “errorVerbose”: “Process exited with status 1\nfailed to scp /root/.tiup/storage/cluster/packages/node_exporter-v1.3.1-linux-amd64.tar.gz to tidb@127.0.0.1:/home/hxl/tidb/tidb-deploy/monitor-9100/bin/node_exporter-v1.3.1-linux-amd64.tar.gz\ngithub.com/pingcap/tiup/pkg/cluster/executor.(*EasySSHExecutor).Transfer\n\tgithub.com/pingcap/tiup/pkg/cluster/executor/ssh.go:207\ngithub.com/pingcap/tiup/pkg/cluster/executor.(*CheckPointExecutor).Transfer\n\tgithub.com/pingcap/tiup/pkg/cluster/executor/checkpoint.go:114\ngithub.com/pingcap/tiup/pkg/cluster/task.(*InstallPackage).Execute\n\tgithub.com/pingcap/tiup/pkg/cluster/task/install_package.go:45\ngithub.com/pingcap/tiup/pkg/cluster/task.(*CopyComponent).Execute\n\tgithub.com/pingcap/tiup/pkg/cluster/task/copy_component.go:64\ngithub.com/pingcap/tiup/pkg/cluster/task.(*Serial).Execute\n\tgithub.com/pingcap/tiup/pkg/cluster/task/task.go:86\ngithub.com/pingcap/tiup/pkg/cluster/task.(*StepDisplay).Execute\n\tgithub.com/pingcap/tiup/pkg/cluster/task/step.go:111\ngithub.com/pingcap/tiup/pkg/cluster/task.(*Parallel).Execute.func1\n\tgithub.com/pingcap/tiup/pkg/cluster/task/task.go:144\nruntime.goexit\n\truntime/asm_amd64.s:1594”, “hash”: “57aeaf4ba0b87b1f9dd0abd6aa08b6c01fe05dd3”, “func”: “github.com/pingcap/tiup/pkg/cluster/executor.(*CheckPointExecutor).Transfer”, “hit”: false}
【yaml配置文件】

# # Global variables are applied to all deployments and used as the default value of
# # the deployments if a specific deployment value is missing.
#tidb is system user
global:
 user: "tidb"
 ssh_port: 22
 deploy_dir: "/home/hxl/tidb/tidb-deploy"
 data_dir: "/home/hxl/tidb/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: 127.0.0.1

tidb_servers:
 - host: 127.0.0.1

tikv_servers:
 - host: 127.0.0.1
   port: 20160
   status_port: 20180
   config:
     server.labels: { host: "logic-host-1" }

 - host: 127.0.0.1
   port: 20161
   status_port: 20181
   config:
     server.labels: { host: "logic-host-2" }

 - host: 127.0.0.1
   port: 20162
   status_port: 20182
   config:
     server.labels: { host: "logic-host-3" }

tiflash_servers:
 - host: 127.0.0.1

monitoring_servers:
 - host: 127.0.0.1

grafana_servers:
 - host: 127.0.0.1

免密登录有搞好么?即便是本机连本机,也是需要在~/.ssh/authorized_keys里加上自己的公钥的

手工测试scp是否可以

tidb用户的免密再检查下

1 个赞

密码输错了?

用root装不用配置免密 也不用建tidb用户

可以参考一下这里

1 个赞

没有,root用户密码不会错的

感谢。在部署时需要加上自己用户的ssh秘钥

1 个赞

哦,那其实应该还是需要做互信 :thinking:

单机需要互信,这个应该可以优化一下

单机只是娱乐测试玩,对于tidb 来说部署专门设计单机流程没有意义

此话题已在最后回复的 60 天后被自动关闭。不再允许新回复。