Skip to content

wrong scp command with ipv6 address #2541

@ayhhyhh

Description

@ayhhyhh

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

tiup deploy yaml:

global:
  user: "user"
  systemd_mode: "user"
  deploy_dir: "/data00/tikv/tikv-deploy"
  data_dir: "/data00/tikv/tikv-data"
  arch: "amd64"

server_configs:
  tikv:
    server.grpc-compression-type: gzip
    raftstore.raft-entry-max-size: 1GB
    raftstore.raft-max-size-per-msg: 1GB
    server.max-grpc-send-msg-len: 1073741824
    
pd_servers:
  - host: "fdbd:dc0c:1:121a::51"
  - .....
 tikv_servers:
  - host: "fdbd:dc0c:1:121a::51"
    port: 20160
    status_port: 20180
    deploy_dir: "/data00/tikv/tikv-deploy/tikv-20160"
    data_dir: "/data00/tikv/tikv-data/tikv-20160"
    log_dir: "/data00/tikv/tikv-20160/log"
  - ...

tiup cluster check deploy-online.yaml --user user --ssh=system

  1. What did you expect to see?

everything is good.

  1. What did you see instead?
Error: failed to scp /home/user/.tiup/storage/cluster/packages/insight-v0.4.2-linux-amd64.tar.gz to fdbd:dc0c:1:121a::51:/tmp/tiup/bin/insight-v0.4.2-linux-amd64.tar.gz: executor.ssh.execute_failed: Failed to transfer file over SCP for 'user@fdbd:dc0c:1:121a::51:22' {ssh_stderr: ssh: Could not resolve hostname fdbd: Name or service not known
lost connection
, ssh_stdout: , ssh_command: scp -r -o StrictHostKeyChecking=no -o ConnectTimeout=5 /home/user/.tiup/storage/cluster/packages/insight-v0.4.2-linux-amd64.tar.gz user@fdbd:dc0c:1:121a::51:/tmp/tiup/bin/insight-v0.4.2-linux-amd64.tar.gz}, cause: exit status 1

it seems that the problem is caused by missing '[]' at ipv6 address in scp command

  1. What version of TiUP are you using (tiup --version)?
$ tiup --version
1.16.2 tiup
Go Version: go1.21.13
Git Ref: v1.16.2
GitHash: 678c52de0c0ef30634b8ba7302a8376caa95d50d

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugCategorizes issue as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions