Ubuntu: Failed to set up SSH tunneling for host

WARN[0000] Failed to set up SSH tunneling for host [172.17.87.253]: Can’t retrieve Docker Info: error during connect: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.24/info: Unable to access the service on /var/run/docker.sock. The service might be still starting up. Error: ssh: rejected: connect failed (open failed)
WARN[0000] Removing host [172.17.87.253] from node lists
WARN[0000] [state] can’t fetch legacy cluster state from Kubernetes: Cluster must have at least one etcd plane host: failed to connect to the following etcd host(s) [172.17.87.253]

This is my first attempt to use Rancher and it failed as soon as I started :frowning:
I was not expecting it to work though. It cannot be so simple.
What is required Rancher to work properly?
It does not like the ssh for some reason.
What should I do to solve this problem?

ubuntu@rancher:~$ ./rke --version
rke version v1.1.4

ubuntu@rancher:~$ uname -a
Linux rancher 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

ubuntu@rancher:~$ cat cluster.yml # This is the minimal config from Rancher web page
nodes:
- address: 172.17.87.253
user: ubuntu
role:
- controlplane
- etcd
- worker

Please share more details from the node you are using:

  • Output from sudo docker info
  • Output from ls -la /var/run/docker.sock
  • Output from docker ps as user ubuntu on 172.17.87.253
  • Output from dpkg -l openssh-server

The requirements are listed on https://rancher.com/docs/rke/latest/en/os/

I too facing same issue

Failed to set up SSH tunneling for host [52.167.170.100]: Can’t retrieve Docker Info: er24/info": Unable to access node with address [52.167.170.100:22] using SSH. Please check if you arend if you have configured the correct SSH username. Error: ssh: handshake failed: ssh: unable to auethods remain

You can use Rancher Docs: SSH Connectivity Errors or provide the information requested above.(+ the information in the start post)

Hi, I face the same error after upgrading to rke 1.3.2. It worked well prior to lower versions. I’m using ssh_agent.

Here is my output.

sudo docker info
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Docker Buildx (Docker Inc., v0.9.1-docker)
  compose: Docker Compose (Docker Inc., v2.17.2)
  scan: Docker Scan (Docker Inc., v0.23.0)

Server:
 Containers: 44
  Running: 19
  Paused: 0
  Stopped: 25
 Images: 23
 Server Version: 20.10.21
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 2806fc1057397dbaeefbea0e4e17bddfbd388f38
 runc version: v1.1.5-0-gf19387a
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 5.15.0-1030-gcp
 Operating System: Ubuntu 20.04.6 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 14.64GiB
 Name: k8s-m-9999
 ID: A4I7:GV4R:QRMN:DEUK:PTRD:24FI:YMSW:HZSY:3IGX:4JWZ:A2XN:46UC
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
type or paste code here
ls -la /var/run/docker.sock
srw-rw-rw- 1 root docker 0 Apr  6 16:09 /var/run/docker.sock
docker ps
CONTAINER ID   IMAGE                                                                                                                                                     COMMAND                  CREATED       STATUS       PORTS     NAMES
4108209ea8a7   rancher/rke-tools:v0.1.78                                                                                                                                 "/docker-entrypoint.…"   5 hours ago   Up 5 hours             etcd-rolling-snapshots
0037f896e0c3   da2f8238d86c                                                                                                                                              "run.sh"                 2 days ago    Up 2 days              k8s_cluster-register_cattle-cluster-agent-74fdc49df9-mdgx6_cattle-system_86b7d53d-b7e3-46c1-a487-aa6d992e288e_0
25fbc152fd59   rancher/mirrored-pause:3.5                                                                                                                                "/pause"                 2 days ago    Up 2 days              k8s_POD_cattle-cluster-agent-74fdc49df9-mdgx6_cattle-system_86b7d53d-b7e3-46c1-a487-aa6d992e288e_0
f1ea8d52d084   0da6a335fe13                                                                                                                                              "/bin/node_exporter …"   2 days ago    Up 2 days              k8s_node-exporter_node-exporter-drckl_kube-system_af639acc-ff21-42b6-a93c-edb2b0afdbd2_0
3a9822b5c4ee   rancher/mirrored-pause:3.5                                                                                                                                "/pause"                 2 days ago    Up 2 days              k8s_POD_node-exporter-drckl_kube-system_af639acc-ff21-42b6-a93c-edb2b0afdbd2_0
5f1a8354e0ce   fluent/fluent-bit                                                                                                                                         "/fluent-bit/bin/flu…"   2 days ago    Up 2 days              k8s_fluent-bit_fluent-bit-logging-v1-qkzcf_logging-ns_8dfa1fe7-2050-4899-9f20-3358a1730485_0
0bee7cbc0c71   rancher/mirrored-pause:3.5                                                                                                                                "/pause"                 2 days ago    Up 2 days              k8s_POD_fluent-bit-logging-v1-qkzcf_logging-ns_8dfa1fe7-2050-4899-9f20-3358a1730485_0
b82abaea692e   ca00244e54c7                                                                                                                                              "install-cni"            2 days ago    Up 2 days              k8s_install-cni_istio-cni-node-vbb6j_kube-system_090c1603-c82b-482f-ae99-5a7c20ef7b9e_0
35bf33a426cc   rancher/mirrored-pause:3.5                                                                                                                                "/pause"                 2 days ago    Up 2 days              k8s_POD_istio-cni-node-vbb6j_kube-system_090c1603-c82b-482f-ae99-5a7c20ef7b9e_0
46166ab36630   e6ea68648f0c                                                                                                                                              "/opt/bin/flanneld -…"   2 days ago    Up 2 days              k8s_kube-flannel_canal-r4v8k_kube-system_df5bd092-8896-4157-95f2-84112ea6a615_0
0340c6535222   9b7965ed4504                                                                                                                                              "start_runit"            2 days ago    Up 2 days              k8s_calico-node_canal-r4v8k_kube-system_df5bd092-8896-4157-95f2-84112ea6a615_0
ae037921aeba   rancher/mirrored-pause:3.5                                                                                                                                "/pause"                 2 days ago    Up 2 days              k8s_POD_canal-r4v8k_kube-system_df5bd092-8896-4157-95f2-84112ea6a615_0
833a7dc4281f   rancher/hyperkube:v1.22.4-rancher1                                                                                                                        "/opt/rke-tools/entr…"   2 days ago    Up 2 days              kube-proxy
75eaccdbcdd1   rancher/hyperkube:v1.22.4-rancher1                                                                                                                        "/opt/rke-tools/entr…"   2 days ago    Up 2 days              kubelet
09b61f3a7002   rancher/hyperkube:v1.22.4-rancher1                                                                                                                        "/opt/rke-tools/entr…"   2 days ago    Up 2 days              kube-scheduler
a83c174c15b7   rancher/hyperkube:v1.22.4-rancher1                                                                                                                        "/opt/rke-tools/entr…"   2 days ago    Up 2 days              kube-controller-manager
ff5f7904b542   rancher/hyperkube:v1.22.4-rancher1                                                                                                                        "/opt/rke-tools/entr…"   2 days ago    Up 2 days              kube-apiserver
2aa77215794f   rancher/mirrored-coreos-etcd:v3.5.0                                                                                                                       "/usr/local/bin/etcd…"   2 days ago    Up 2 days              etcd
c11b86ea28d2   e-gen-docker-local.docker.lowes.com/carbon-stores-clustercreation-image:jenkins-96_code-change-disable-destroy_e1b0c5d32a49d563ae21440d858d50f60777756e   "/bin/sh"                4 days ago    Up 4 days              roman-test
dpkg -l openssh-server
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version            Architecture Description
+++-==============-==================-============-=================================================================
ii  openssh-server 1:8.2p1-4ubuntu0.5 amd64        secure shell (SSH) server, for secure access from remote machines

config sshd.conf
AllowTcpForwarding yes

I’m facing the same issue.
Did you manage to fix it?
Im able to perform ssh and execute docker ps and so on.

Hi guys!!
I have manage to fix this issue.
In the server you want to perfom provisioning
$sudo nano /etc/ssh/sshd_config.

Leave all this section commented


then restart the sshd service
$sudo systemctl restart sshd

And try again