Kubectl copy command gives 0325 07:58:31.996067 1479837 v2.go:104] write tcp : write: connection reset by peer

Asking for help? Comment out what you need so we can get more information to help you!

Cluster information:

Kubernetes version: v1.26.5
Cloud being used: bare-metal
Installation method: through kube-adm
Host OS: Linux
CNI and version:v3.25.0(calico)
CRI and version: podman version 4.4.1

While executing the kubectl copy command I am getting
0325 07:58:31.996067 1479837 v2.go:104] write tcp write: connection reset by peer error

The command is
kubectl cp test default/test2:/root/ --retries 999 -v=8

Below is the o/p
container=test2&stderr=true&stdin=true&stdout=true 101 Switching Protocols in 12 milliseconds
I0325 06:58:32.255588 1434376 round_trippers.go:570] HTTP Statistics: DNSLookup 0 ms Dial 0 ms TLSHandshake 0 ms Duration 12 ms
I0325 06:58:32.255593 1434376 round_trippers.go:577] Response Headers:
I0325 06:58:32.255602 1434376 round_trippers.go:580] Connection: Upgrade
I0325 06:58:32.255610 1434376 round_trippers.go:580] Upgrade: SPDY/3.1
I0325 06:58:32.255617 1434376 round_trippers.go:580] X-Stream-Protocol-Version: v4.channel.k8s.io

E0325 07:14:21.883766 1434376 v2.go:104] write write: connection reset by peer
I0325 07:14:21.883818 1434376 connection.go:198] SPDY Ping failed: EOF
I0325 07:14:21.883846 1434376 connection.go:198] SPDY Ping failed: EOF