Troubleshoot Portworx on Kubernetes
Troubleshoot problems
The following sections provide troubleshooting tips for common problem areas:
Portworx Node is down
sshinto your cluster node that haskubectlinstalled with yourkubeconfigand check the Kubernetes cluster status usingkubectlto ensure cluster nodes are in theReadystatus:kubectl get node -o wideIf a node is not ready, describe that node to see why and take corrective action:
kubectl describe node <nodename>If the previous command does not help identify the problem, log in as root and consider running the
journalctlcommand on the node in question to identify the problem:journalctl -u kubeletIf the Kubernetes cluster is healthy, check Portworx alerts using
pxctlfrom the node, either throughsshor usingkubectl exec. Alerts may help you understand why the Portworx node is down:pxctl alerts showYou can also enter the
pxctl statuscommand to check the status on the respective node where portworx is running:pxctl statusIf you find no useful information in the
pxctl statusoutput, check your Portworx pods to confirm they are up and running:kubectl get pods -n <name-space> -l name=portworxIf necessary, describe the respective Portworx pod to identify the problem:
kubectl describe pods <px-podname> -n <name-space>If necessary, check the
journalctllogs from the node in question to further help identify the problem:journalctl -lfu portworx*
Check all Portworx pods running in kube-system or other namespace and confirm they are up and running:
kubectl get pods -n <name-space>Describe the respective pod running in kube-system or other namespace to identify the problem.
kubectl describe pod <podname> -n <name-space>
Portworx logs reports "Node is not in quorum", kvdb error: "context deadline exceeded"
sshinto the respective nodes and runpxctl statuson each node to check the Portworx cluter status:pxctl status- If running internal KVDB check KVDB cluster members and confirm the health status using pxctl:
pxctl service kvdb members - If quorum has been lost perform the following before contacting technical support:
- Save px-diags on each affected node (captures all logs)
pxctl service diags -a - Make backups of your config map for px-bootstrap and px-cloud-drive
kubectl get cm -n kube-system | grep pxkubectl get cm <px-bootstrap> -n kube-system -o yaml > px-bootstrapbkp.yamlkubectl get cm <px-cloud-drive> -n kube-system -o yaml > px-cloud-drivebkp.yaml - Collect KVDB end points using pxctl:
pxctl service kvdb endpoints - Contact technical support (see below)
- Save px-diags on each affected node (captures all logs)
- If using external etcd, check your external etcd cluster status.
- Portworx container will fail to come up if it cannot reach etcd. For etcd installation instructions refer this doc.
- The etcd location specified when creating the Portworx cluster needs to be reachable from all nodes.
- For external Etcd run
curl <etcd_location>/versionfrom each node to ensure reachability. For e.gcurl "http://192.168.33.10:2379/version"
- If you deployed etcd as a Kubernetes service, use the ClusterIP instead of the kube-dns name. Portworx nodes cannot resolve kube-dns entries since Portworx containers are in the host network.
- Portworx container will fail to come up if it cannot reach etcd. For etcd installation instructions refer this doc.
Portworx pxctl cluster summary reports Status "Online", StorageStatus "(StorageDown)" "Full or Offline"
- Identify the node and the storage pool in question by running pxctl (ssh into the respective node) status:
pxctl status - From the same node, inspect the pool to identify the disk device that makes up the pool:
pxctl service pool show - Logged in as root, identify why the disk is failing by running dmesg
dmesg | grep error
To correct the problem:
Remove or replace the drive following these instructions: Remove or replace
If the pool is full follow these instructions: Expand your storage pool size
Performance related
- Run Grafana dashboard to identify volumes, pools, nodes, network and other components.
- Refer to the following performance tuning document: Tune Performance
- There are many performance tuning enhancements in the latest release of Portworx. Please see: Portworx release notes
PVC Controller pod failed to start
If you are running Portworx in managed Kubernetes service provider and run into port conflict in the PVC controller, you can overwrite the default PVC Controller ports using the portworx.io/pvc-controller-port and portworx.io/pvc-controller-secure-port annotations on the StorageCluster object:
apiVersion: core.libopenstorage.org/v1
kind: StorageCluster
metadata:
name: portworx
namespace: kube-system
annotations:
portworx.io/pvc-controller-port: "10261"
portworx.io/pvc-controller-secure-port: "10262"
...
Collect Portworx logs
Run the following command on the suspect or affected nodes running Portworx:
pxctl service diags -a
Note:
Include these logs when contacting Portworx support, along with generated diags located in /var/cores/<node-x-x-diags>-<timestamp>.tar.gz
Generate stack traces
Portworx support will occasionally request stack traces to help you troubleshoot. Enter the following command on the troubled node to create a *.stack file in the /var/cores directory with the latest timestamp:
pxctl service diags --profile
Contact support
View your options for contacting support by visiting the Portworx support page:
Portworx support