Skip to content

Streaming server stopped unexpectedly: listen tcp x.x.x.x:0: bind: cannot assign requested address

This document (000020350) is provided subject to the disclaimer at the end of this document.

Environment

Rancher v2.6+

Kubernetes v1.20+

Situation

Adding a new node to an existing cluster stuck in “registering”.

Kubelet pod is in Restarting state on the new node.

$ docker ps -a |grep kubelet
66bd40b36e76 rancher/hyperkube:v1.20.4-rancher1 "/opt/rke-tools/entr…" 7 minutes ago Restarting (255) 32 seconds ago kubelet

The kubelet is failing with below error.

$ docker logs kubelet
"2021-07-26T11:13:48.270162766Z F0726 11:13:48.270086   40730 docker_service.go:415] Streaming server stopped unexpectedly: listen tcp 27.0.0.1:0: bind: cannot assign requested address"

Resolution

Update /etc/hosts file with the correct entry.

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

After updating the file, the kubelet will restart itself and pick up the modified /etc/host file to bind to the loopback IP.

Cause

File /etc/hosts in the new node had below incorrect entry.

27.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.