π Troubleshooting
This guide provides various commands and techniques to diagnose and troubleshoot common issues with Anteon Self-Hosted when deployed via Docker Compose or Kubernetes.
π Troubleshooting Docker Compose Deploymentβ
You can use a TUI tool like Ducker to easily analyze the containers.
Inspect Docker Containersβ
To list all running containers:
docker ps
To inspect a specific container for detailed information:
docker inspect <container_id>
You can also enter a running container for debugging purposes:
docker exec -it <container_id> /bin/sh
Check Logsβ
To view the logs for all services running under Docker Compose:
docker compose logs
To filter logs for a specific service, such as the frontend, use:
docker compose logs selfhosted-frontend-1
Restarting Servicesβ
If a service is not responding, you can restart it using:
docker compose restart <service_name>
Verify Network Connectivityβ
Ensure that all services are properly connected to the Docker network:
docker network inspect <network_name>
You can ping between containers to verify connectivity:
docker exec -it <container_id> ping <target_container_id_or_name>
Checking Resource Usageβ
To check CPU and memory usage of the containers:
docker stats
βΈοΈ Troubleshooting Kubernetes Deploymentβ
You can use a TUI tool like kubetui to easily analyze the containers.
Check Pod Statusβ
To check the status of all Pods in the namespace:
kubectl get pods -n <namespace>
To get detailed information about a specific Pod:
kubectl describe pod <pod_name> -n <namespace>
View Pod Logsβ
To view logs for a specific container within a Pod:
kubectl logs <pod_name> -n <namespace> -c <container_name>
If the Pod has multiple containers and you omit -c <container_name>
, logs from the first container will be shown.
Restarting Podsβ
To delete and restart a Pod (which forces Kubernetes to create a new one):
kubectl delete pod <pod_name> -n <namespace>
Check Service Endpointsβ
To verify that a service is correctly routing traffic:
kubectl get endpoints <service_name> -n <namespace>
This will show which Pods are connected to the service.
Inspecting Eventsβ
To check for any events that might indicate issues:
kubectl get events -n <namespace>
Debugging with a Temporary Podβ
You can create a temporary Pod to run debugging commands within the Kubernetes cluster:
kubectl run -i --tty --rm debug-pod --image=alpine -- sh
From within this Pod, you can ping services, check DNS resolution, etc.
Monitoring Resource Usageβ
To view resource usage across the cluster:
kubectl top nodes
For detailed resource usage per Pod:
kubectl top pods -n <namespace>
- π Troubleshooting Docker Compose Deployment
- Inspect Docker Containers
- Check Logs
- Restarting Services
- Verify Network Connectivity
- Checking Resource Usage
- βΈοΈ Troubleshooting Kubernetes Deployment
- Check Pod Status
- View Pod Logs
- Restarting Pods
- Check Service Endpoints
- Inspecting Events
- Debugging with a Temporary Pod
- Monitoring Resource Usage