I am trying to install Portworx operator on K3s, and I am getting this error:
portworx Could not talk to Docker/Containerd/CRI: Could not initialize container handler - please ensure '/var/run/docker.sock', '/run/containerd/containerd.sock' or '/var/run/crio/crio.sock' are mounted
K3s uses containerd, located at:
/run/k3s/containerd/containerd.sock
How do I resolve this, please? Is it possible to point portworx to /run/k3s/containerd/containerd.sock instead of /run/containerd/containerd.sock, if so, how?
I am unable to to get the Portworx cluster status because the pod is obviously not running… see the Gist above.
PX_POD=$(kubectl get pods -l name=portworx -n kube-system -o jsonpath='{.items[0].metadata.name}')
kubectl exec $PX_POD -n kube-system -- /opt/pwx/bin/pxctl status
~ $ kubectl exec $PX_POD -n kube-system -- /opt/pwx/bin/pxctl status
Defaulting container name to portworx.
Use 'kubectl describe pod/px-cluster-03732d57-45f2-48a3-80a2-97a0e48e3ad9-mfxs6 -n kube-system' to see all of the containers in this pod.
error: unable to upgrade connection: container not found ("portworx")
List Portworx volumes:
$ PX_POD=$(kubectl get pods -l name=portworx -n kube-system -o jsonpath='{.items[0].metadata.name}')
~ $ kubectl exec $PX_POD -n kube-system -- /opt/pwx/bin/pxctl volume list
Defaulting container name to portworx.
Use 'kubectl describe pod/px-cluster-03732d57-45f2-48a3-80a2-97a0e48e3ad9-mfxs6 -n kube-system' to see all of the containers in this pod.
error: unable to upgrade connection: container not found ("portworx")
kubectl logs -n kube-system -l name=portworx --tail=99999
error: a container name must be specified for pod px-cluster-03732d57-45f2-48a3-80a2-97a0e48e3ad9-q94sx, choose one of: [portworx csi-node-driver-registrar]
This command failed because there are two containers in the pod. So I specified the container as shown below:
k describe po px-cluster-03732d57-45f2-48a3-80a2-97a0e48e3ad9-nrjq5 -n kube-system
output:
https://gist.github.com/iogbole/6857fbf846dad6823de2bdb586ed1aa6#file-describe_pod-out
FWIW, I decided to create a symb link to the location that portworx expects the containerd.sock to be located on all my nodes (master and worker nodes inclusive) as shown below:
… our YAML-generation will use the version’s extension ( +k3s1 ) to add the appropriate tweaks into the YAML. These K3S-specific tweaks are currently missing in your deployment, which is likely root-cause for PX deployment failure.
Hi! I’m having a similar problem trying to set up portworx with Microk8s (Ubuntu Server 22.04). I am trying to install portworx v2.12. I’ve modified my manifest files to expose the containerd runtime directly as shown below.
This results in the same error message as the OP. I’ve also tried directing the /var/run/docker.sock to point to the containerd socket but getting a different error.
time="2023-02-02T22:43:23Z" level=info msg="OCI-Monitor computed version v2.12.1-ge0f0777f-dirty"
time="2023-02-02T22:43:23Z" level=info msg="REAPER: Starting ..."
time="2023-02-02T22:43:23Z" level=info msg="Service handler initialized via as DBus{type:dbus,svc:portworx.service,id:0xc0004cd9a0}"
time="2023-02-02T22:43:23Z" level=info msg="Setting up container handler"
time="2023-02-02T22:43:23Z" level=info msg="> run-host: /bin/sh -c cat /etc/crictl.yaml || cat /var/vcap/store/crictl.yaml"
time="2023-02-02T22:43:23Z" level=warning msg="Could not retrieve my container ID (will search by labels)" error="Container not found"
time="2023-02-02T22:43:23Z" level=info msg="Locating my container handler"
time="2023-02-02T22:43:23Z" level=info msg="> Attempt to use Docker as container handler failed, trying next..." error="Error pinging docker-server: Get \"http://%2Fvar%2Frun%2Fdocker.sock/_ping\": net/http: HTTP/1.x transport connection broken: malformed HTTP response \"\\x00\\x00\\x06\\x04\\x00\\x00\\x00\\x00\\x00\\x00\\x05\\x00\\x00@\\x00\".\n* Are you trying to connect to a TLS-enabled daemon without TLS?"
time="2023-02-02T22:43:23Z" level=info msg="> Using ContainerD as container handler"
time="2023-02-02T22:43:23Z" level=info msg="Activating REST server"
time="2023-02-02T22:43:23Z" level=info msg="Activating node-watcher"
time="2023-02-02T22:43:23Z" level=error msg="Could not extract my container's configuration: could not load container : container \"\" in namespace \"k8s.io\": not found"