Error Starting TiDB on Mac

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 使用mac启动tidb报错

| username: Alan

{“code”: 1, “error”: “failed to fetch cpu-arch or kernel-name: executor.ssh.execute_failed: Failed to execute command over SSH for ‘alan@192.168.122.23: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 publickey], no supported methods remain”, “errorVerbose”: “executor.ssh.execute_failed: Failed to execute command over SSH for ‘alan@192.168.122.23: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 publickey], no supported methods remain at github.com/pingcap/tiup/pkg/cluster/executor.(*EasySSHExecutor).Execute() github.com/pingcap/tiup/pkg/cluster/executor/ssh.go:174 at github.com/pingcap/tiup/pkg/cluster/executor.(*CheckPointExecutor).Execute() github.com/pingcap/tiup/pkg/cluster/executor/checkpoint.go:85 at github.com/pingcap/tiup/pkg/cluster/task.(*Shell).Execute() github.com/pingcap/tiup/pkg/cluster/task/shell.go:43 at github.com/pingcap/tiup/pkg/cluster/task.(*Serial).Execute() github.com/pingcap/tiup/pkg/cluster/task/task.go:86 at github.com/pingcap/tiup/pkg/cluster/task.(*StepDisplay).Execute() github.com/pingcap/tiup/pkg/cluster/task/step.go:111 at github.com/pingcap/tiup/pkg/cluster/task.(*Parallel).Execute.func1() github.com/pingcap/tiup/pkg/cluster/task/task.go:144 at runtime.goexit() runtime/asm_arm64.s:1263 github.com/pingcap/errors.AddStack github.com/pingcap/errors@v0.11.5-0.20201126102027-b0a155152ca3/errors.go:174 github.com/pingcap/errors.Trace github.com/pingcap/errors@v0.11.5-0.20201126102027-b0a155152ca3/juju_adaptor.go:15 github.com/pingcap/tiup/pkg/cluster/task.(*Shell).Execute github.com/pingcap/tiup/pkg/cluster/task/shell.go:50 github.com/pingcap/tiup/pkg/cluster/task.(*Serial).Execute github.com/pingcap/tiup/pkg/cluster/task/task.go:86 github.com/pingcap/tiup/pkg/cluster/task.(*StepDisplay).Execute github.com/pingcap/tiup/pkg/cluster/task/step.go:111 github.com/pingcap/tiup/pkg/cluster/task.(*Parallel).Execute.func1 github.com/pingcap/tiup/pkg/cluster/task/task.go:144 runtime.goexit runtime/asm_arm64.s:1263 failed to fetch cpu-arch or kernel-name”}

| username: Alan | Original post link

Using ssh alan@192.168.122.23 can connect, but ssh alan@192.168.122.23:22 has no response. Please help solve this.

| username: wink | Original post link

I suggest using TiUP for deployment.

| username: Alan | Original post link

It is started using tiup
tiup cluster deploy tidb-test 6.1.0 /Users/alan/.tiup/topology.yaml --user alan

| username: Alan | Original post link

It automatically added port 22 to my SSH, but the SSH connection on Mac doesn’t require specifying the port. I don’t know what to do.

| username: xiaohetao | Original post link

The default port for SSH connection is 22. Adding a port should be parsed as the hostname. What if no port is added?

| username: Alan | Original post link

There’s no problem without adding the port, but it automatically adds it for me and then reports an error.

| username: Hi70KG | Original post link

Check the permissions
The .ssh directory must be 744, and the authorized_keys file must be 600

| username: Hi70KG | Original post link

It is recommended to use a script for mutual trust:

./sshUserSetup.sh -user tidb \
-hosts "192.168.80.111 192.168.0.114 192.168.80.117 192.168.80.118 192.168.80.119" -advanced \  exverify -confirm

The script is as follows:
sshUserSetup.sh (32.6 KB)
Keep pressing yes, yes
Just press enter without any prompts

| username: Alan | Original post link

thanks

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.