Joe Doliner
Joe Doliner

Reputation: 2230

Unable to do port forwarding: socat not found. Kubernetes on Docker

I'm running a dev kubernetes cluster on Docker Machine with GCE as provider. Cluster was setup using this tutorial: https://github.com/kubernetes/kubernetes/blob/master/docs/getting-started-guides/docker.md. Everything's working fine except when I try to do port-forward. I get:

E1104 00:58:23.210982   18552 portforward.go:310] An error occurred forwarding 650 -> 650: Error forwarding port 650 to pod pfsd-rc-7xrq1_default, uid : Unable to do port forwarding: socat not found.
I1104 00:58:23.220147   18552 portforward.go:251] Handling connection for 650
E1104 00:58:23.480593   18552 portforward.go:310] An error occurred forwarding 650 -> 650: Error forwarding port 650 to pod pfsd-rc-7xrq1_default, uid : Unable to do port forwarding: socat not found.
I1104 00:58:23.481531   18552 portforward.go:251] Handling connection for 650
E1104 00:58:23.851200   18552 portforward.go:310] An error occurred forwarding 650 -> 650: Error forwarding port 650 to pod pfsd-rc-7xrq1_default, uid : Unable to do port forwarding: socat not found.
I1104 00:58:23.852122   18552 portforward.go:251] Handling connection for 650

I've tried installing locally, on the GCE machine and inside the container and nothing did the trick. Anyone else hit this?

Upvotes: 12

Views: 23609

Answers (4)

Milen John Thomas
Milen John Thomas

Reputation: 109

The error clearly says "socat not found". So we need to install it(SOcket CAT), here I'm using a Ubuntu. So it can be install with apt install socat.

Upvotes: 3

Rewanth Tammana
Rewanth Tammana

Reputation: 1593

It's a bit late but still, I think it will be helpful for other people.

It says socat isn't installed. Running apt-get -y install socat on the host machine resolves the problem. It worked for me.

Upvotes: 22

Joe Doliner
Joe Doliner

Reputation: 2230

This was a bug with socat not being include in the kubelet container. It's now fixed.

Release 1.1.2 is the first one to include the fix.

Upvotes: 3

Robert Bailey
Robert Bailey

Reputation: 18200

What image did you use for the virtual machine? If you use the container VM image, it already has socat installed.

Upvotes: 0

Related Questions