Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v2.go:105] write tcp 192.168.65.1:57934->192.168.65.4:8443: write: protocol wrong type for socket #462

Closed
cmoulliard opened this issue Sep 7, 2018 · 1 comment

Comments

@cmoulliard
Copy link

Versions

  • client-go : kubernetes-1.9.1

Problem

We can copy a file to a pod using a command issued from a terminal

kubectl | oc cp ./target/ocp-fmp-build-install-1.0-exec.jar sb1-app-1-rxpc9:/deployments

that works fine but when we try to achieve the same thing using the client-go and remotecommand v2.go, then that fails with this error

E0907 06:53:18.293590   34159 v2.go:105] write tcp 192.168.65.1:57934->192.168.65.4:8443: write: protocol wrong type for socket
I0907 06:53:18.293718   34159 root.go:157] Error:
unable push files to pod: error while streaming command: Internal error occurred: error executing command in container: read unix @->/var/run/docker.sock: read: connection reset by peer

Why do we get protocol wrong type for socket ? Is there a workaround ?

@cmoulliard
Copy link
Author

The issue was related to the fact that it was not possible to store the file under the path defined /opt/app-root/src as src was a file and not a directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant