- Overview
- Quick Diagnostics
- Installation Issues
- Hardware and Network Issues
- Pose Detection Issues
- Performance Issues
- API and WebSocket Issues
- Database and Storage Issues
- Authentication and Security Issues
- Deployment Issues
- Monitoring and Logging
- Common Error Messages
- Support and Resources
This guide helps diagnose and resolve common issues with WiFi-DensePose. Issues are organized by category with step-by-step troubleshooting procedures.
- Check System Status: Always start with a health check
- Review Logs: Check application and system logs for errors
- Verify Configuration: Ensure environment variables are correct
- Test Connectivity: Verify network and hardware connections
# System health check
curl http://localhost:8000/api/v1/health
# Check system information
python -c "import wifi_densepose; wifi_densepose.print_system_info()"
# View logs
docker-compose logs -f wifi-densepose
kubectl logs -f deployment/wifi-densepose -n wifi-densepose#!/bin/bash
# quick-health-check.sh
echo "=== WiFi-DensePose Health Check ==="
# Check if service is running
if curl -s http://localhost:8000/api/v1/health > /dev/null; then
echo "✅ API service is responding"
else
echo "❌ API service is not responding"
fi
# Check database connection
if curl -s http://localhost:8000/api/v1/health | grep -q "postgres.*healthy"; then
echo "✅ Database connection is healthy"
else
echo "❌ Database connection issues detected"
fi
# Check hardware status
if curl -s http://localhost:8000/api/v1/health | grep -q "hardware.*healthy"; then
echo "✅ Hardware service is healthy"
else
echo "❌ Hardware service issues detected"
fi
# Check pose detection
if curl -s http://localhost:8000/api/v1/pose/current > /dev/null; then
echo "✅ Pose detection is working"
else
echo "❌ Pose detection issues detected"
fi
echo "=== End Health Check ==="# Check for common error patterns
grep -i "error\|exception\|failed" /var/log/wifi-densepose.log | tail -20
# Check hardware warnings
grep -i "hardware\|router\|csi" /var/log/wifi-densepose.log | tail -10
# Check pose processing issues
grep -i "pose\|detection\|confidence" /var/log/wifi-densepose.log | tail -10Symptoms:
- Package not found on PyPI
- Dependency conflicts
- Build errors
Solutions:
- Update pip and setuptools:
pip install --upgrade pip setuptools wheel- Install with specific Python version:
python3.9 -m pip install wifi-densepose- Install from source:
git clone https://github.com/ruvnet/wifi-densepose.git
cd wifi-densepose
pip install -e .- Resolve dependency conflicts:
pip install --no-deps wifi-densepose
pip install -r requirements.txtSymptoms:
- OpenCV import errors
- PyTorch installation failures
- Build tool errors
Solutions:
- Ubuntu/Debian:
sudo apt update
sudo apt install -y build-essential cmake
sudo apt install -y libopencv-dev python3-opencv
sudo apt install -y python3.9-dev python3.9-venv- CentOS/RHEL:
sudo yum groupinstall -y "Development Tools"
sudo yum install -y opencv-devel python39-devel- macOS:
brew install cmake opencv python@3.9Symptoms:
- Build context too large
- Network timeouts
- Permission errors
Solutions:
- Optimize build context:
# Add to .dockerignore
echo "data/" >> .dockerignore
echo "logs/" >> .dockerignore
echo "*.pyc" >> .dockerignore
echo "__pycache__/" >> .dockerignore- Build with specific target:
docker build --target production -t wifi-densepose:latest .- Fix permission issues:
sudo usermod -aG docker $USER
newgrp dockerSymptoms:
- "Router main_router is unhealthy" warnings
- No CSI data received
- Connection timeouts
Diagnostic Steps:
- Check network connectivity:
ping 192.168.1.1 # Replace with your router IP
telnet 192.168.1.1 22 # Check SSH access- Verify router configuration:
ssh admin@192.168.1.1
# Check if CSI extraction is enabled
cat /etc/config/wireless | grep csi- Test CSI data stream:
# Listen for CSI data
nc -l 5500 # Default CSI portSolutions:
- Restart router service:
ssh admin@192.168.1.1
/etc/init.d/csi-tools restart- Reconfigure CSI extraction:
# On router
echo "csi_enable=1" >> /etc/config/wireless
echo "csi_rate=30" >> /etc/config/wireless
wifi reload- Update router firmware:
# Flash OpenWRT with CSI patches
sysupgrade -v openwrt-csi-enabled.binSymptoms:
- Low signal strength
- High noise levels
- Inconsistent data rates
Solutions:
-
Optimize antenna placement:
- Ensure 3×3 MIMO configuration
- Position antennas for optimal coverage
- Avoid interference sources
-
Adjust CSI parameters:
# Increase sampling rate
echo "csi_rate=50" >> /etc/config/wireless
# Filter noise
echo "csi_filter=1" >> /etc/config/wireless- Calibrate environment:
curl -X POST http://localhost:8000/api/v1/pose/calibrateSymptoms:
- Connection refused errors
- Timeouts on specific ports
- Intermittent connectivity
Solutions:
- Configure firewall rules:
# Ubuntu/Debian
sudo ufw allow 8000/tcp # API port
sudo ufw allow 5500/tcp # CSI data port
sudo ufw allow 8080/tcp # Metrics port
# CentOS/RHEL
sudo firewall-cmd --permanent --add-port=8000/tcp
sudo firewall-cmd --permanent --add-port=5500/tcp
sudo firewall-cmd --reload- Check iptables rules:
sudo iptables -L -n | grep -E "8000|5500"- Disable firewall temporarily for testing:
sudo ufw disable # Ubuntu
sudo systemctl stop firewalld # CentOSSymptoms:
- API returns empty pose arrays
- Zero detection count in metrics
- No activity in pose logs
Diagnostic Steps:
- Check CSI data reception:
curl http://localhost:8000/api/v1/system/status | jq '.hardware'- Verify confidence threshold:
curl http://localhost:8000/api/v1/config | jq '.detection.confidence_threshold'- Test with lower threshold:
curl -X PUT http://localhost:8000/api/v1/config \
-H "Content-Type: application/json" \
-d '{"detection": {"confidence_threshold": 0.3}}'Solutions:
- Recalibrate system:
curl -X POST http://localhost:8000/api/v1/pose/calibrate-
Check environment setup:
- Ensure people are in detection area
- Verify router placement and coverage
- Check for interference sources
-
Adjust detection parameters:
curl -X PUT http://localhost:8000/api/v1/config \
-H "Content-Type: application/json" \
-d '{
"detection": {
"confidence_threshold": 0.5,
"max_persons": 10,
"enable_tracking": true
}
}'Symptoms:
- Confidence scores below 0.7
- Ghost detections
- Missed detections
Solutions:
-
Improve environment conditions:
- Remove metallic objects that cause reflections
- Ensure stable WiFi signal strength
- Minimize movement of non-human objects
-
Retrain or update models:
# Download latest models
curl -O https://models.wifi-densepose.com/latest/densepose_model.pth
mv densepose_model.pth /app/models/- Adjust processing parameters:
# In configuration
{
"pose_processing": {
"batch_size": 32,
"nms_threshold": 0.5,
"keypoint_threshold": 0.3
}
}Symptoms:
- People detected in wrong zones
- Zone boundaries not respected
- Inconsistent zone occupancy
Solutions:
- Verify zone configuration:
curl http://localhost:8000/api/v1/zones | jq '.'- Recalibrate zone boundaries:
curl -X PUT http://localhost:8000/api/v1/zones/zone_001 \
-H "Content-Type: application/json" \
-d '{
"coordinates": {
"x": 0, "y": 0,
"width": 500, "height": 300
}
}'- Test zone detection:
curl "http://localhost:8000/api/v1/pose/zones/zone_001/occupancy"Symptoms:
- Slow response times
- High system load
- Processing delays
Diagnostic Steps:
- Check CPU usage by component:
top -p $(pgrep -f wifi-densepose)
htop -p $(pgrep -f python)- Monitor processing metrics:
curl http://localhost:8080/metrics | grep cpuSolutions:
- Optimize processing parameters:
# Reduce batch size
export POSE_PROCESSING_BATCH_SIZE=16
# Lower frame rate
export STREAM_FPS=15
# Reduce worker count
export WORKERS=2- Enable GPU acceleration:
export ENABLE_GPU=true
export CUDA_VISIBLE_DEVICES=0- Scale horizontally:
# Docker Compose
docker-compose up -d --scale wifi-densepose=3
# Kubernetes
kubectl scale deployment wifi-densepose --replicas=5Symptoms:
- Out of memory errors
- Gradual memory increase
- System swapping
Solutions:
- Configure memory limits:
# Docker
docker run --memory=4g wifi-densepose
# Kubernetes
resources:
limits:
memory: 4Gi- Optimize buffer sizes:
export CSI_BUFFER_SIZE=500
export POSE_HISTORY_LIMIT=1000- Enable garbage collection:
import gc
gc.set_threshold(700, 10, 10)Symptoms:
- High latency in API calls
- Timeout errors
- Poor user experience
Solutions:
- Enable caching:
export REDIS_URL=redis://localhost:6379/0
export ENABLE_CACHING=true- Optimize database queries:
-- Add indexes
CREATE INDEX idx_pose_detections_timestamp ON pose_detections (timestamp);
CREATE INDEX idx_csi_data_timestamp ON csi_data (timestamp);- Use connection pooling:
export DATABASE_POOL_SIZE=20
export DATABASE_MAX_OVERFLOW=30Symptoms:
- Cannot connect to API
- Internal server errors
- Service unavailable
Diagnostic Steps:
- Check service status:
curl -I http://localhost:8000/api/v1/health
systemctl status wifi-densepose- Check port availability:
netstat -tlnp | grep 8000
lsof -i :8000Solutions:
- Restart service:
# Docker
docker-compose restart wifi-densepose
# Systemd
sudo systemctl restart wifi-densepose
# Kubernetes
kubectl rollout restart deployment/wifi-densepose- Check configuration:
# Verify environment variables
env | grep -E "HOST|PORT|DATABASE_URL"- Review logs for errors:
tail -f /var/log/wifi-densepose.logSymptoms:
- Connection refused on WebSocket endpoint
- Frequent disconnections
- No real-time updates
Solutions:
- Test WebSocket connectivity:
const ws = new WebSocket('ws://localhost:8000/ws/pose/stream');
ws.onopen = () => console.log('Connected');
ws.onerror = (error) => console.error('Error:', error);- Check proxy configuration:
# Nginx WebSocket support
location /ws/ {
proxy_pass http://backend;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}- Increase connection limits:
export WEBSOCKET_MAX_CONNECTIONS=100
export WEBSOCKET_TIMEOUT=300Symptoms:
- 401 Unauthorized errors
- Token expired messages
- Authentication failures
Solutions:
- Verify token validity:
# Decode JWT token
echo "eyJ..." | base64 -d- Check token expiration:
curl -H "Authorization: Bearer <token>" \
http://localhost:8000/api/v1/auth/verify- Refresh token:
curl -X POST http://localhost:8000/api/v1/auth/refresh \
-H "Authorization: Bearer <refresh-token>"Symptoms:
- "Connection refused" errors
- Database timeout errors
- Service startup failures
Diagnostic Steps:
- Check database status:
# Docker
docker-compose logs postgres
# Direct connection test
psql -h localhost -U postgres -d wifi_densepose- Verify connection string:
echo $DATABASE_URLSolutions:
- Restart database:
docker-compose restart postgres
sudo systemctl restart postgresql- Check database configuration:
-- Check connections
SELECT * FROM pg_stat_activity;
-- Check database size
SELECT pg_size_pretty(pg_database_size('wifi_densepose'));- Fix connection limits:
-- Increase max connections
ALTER SYSTEM SET max_connections = 200;
SELECT pg_reload_conf();Symptoms:
- "No space left on device" errors
- Database write failures
- Log rotation issues
Solutions:
- Check disk usage:
df -h
du -sh /app/data /app/logs /app/models- Clean old data:
# Remove old logs
find /app/logs -name "*.log" -mtime +7 -delete
# Clean old pose data
psql -c "DELETE FROM pose_detections WHERE timestamp < NOW() - INTERVAL '30 days';"- Configure log rotation:
# /etc/logrotate.d/wifi-densepose
/app/logs/*.log {
daily
rotate 7
compress
delaycompress
missingok
notifempty
}Symptoms:
- Certificate validation failures
- Browser security warnings
- SSL handshake errors
Solutions:
- Check certificate validity:
openssl x509 -in /etc/ssl/certs/wifi-densepose.crt -text -noout- Renew Let's Encrypt certificate:
certbot renew --nginx- Update certificate in Kubernetes:
kubectl create secret tls tls-secret \
--cert=path/to/tls.crt \
--key=path/to/tls.keySymptoms:
- HTTP 429 errors
- "Rate limit exceeded" messages
- Blocked API access
Solutions:
- Check rate limit status:
curl -I http://localhost:8000/api/v1/pose/current
# Look for X-RateLimit-* headers- Adjust rate limits:
export RATE_LIMIT_REQUESTS=1000
export RATE_LIMIT_WINDOW=3600- Implement authentication for higher limits:
curl -H "Authorization: Bearer <token>" \
http://localhost:8000/api/v1/pose/currentSymptoms:
- Container exit codes
- Dependency failures
- Network connectivity issues
Solutions:
- Check service dependencies:
docker-compose ps
docker-compose logs- Rebuild containers:
docker-compose down
docker-compose build --no-cache
docker-compose up -d- Fix network issues:
docker network ls
docker network inspect wifi-densepose_defaultSymptoms:
- Pods in Pending/CrashLoopBackOff state
- Image pull errors
- Resource constraints
Solutions:
- Check pod status:
kubectl get pods -n wifi-densepose
kubectl describe pod <pod-name> -n wifi-densepose- Check resource availability:
kubectl top nodes
kubectl describe node <node-name>- Fix image issues:
# Check image availability
docker pull wifi-densepose:latest
# Update deployment
kubectl set image deployment/wifi-densepose \
wifi-densepose=wifi-densepose:latest- Error patterns:
grep -E "ERROR|CRITICAL|Exception" /var/log/wifi-densepose.log- Performance patterns:
grep -E "slow|timeout|latency" /var/log/wifi-densepose.log- Hardware patterns:
grep -E "router|hardware|csi" /var/log/wifi-densepose.log-
System metrics:
- CPU usage
- Memory usage
- Disk I/O
- Network traffic
-
Application metrics:
- Request rate
- Response time
- Error rate
- Pose detection rate
-
Hardware metrics:
- CSI data rate
- Signal strength
- Router connectivity
Cause: Router connectivity or CSI extraction issues
Solution:
- Check router network connectivity
- Verify CSI extraction configuration
- Restart router CSI service
- Check firewall rules
Cause: PostgreSQL connectivity issues
Solution:
- Check database service status
- Verify connection string
- Check network connectivity
- Review database logs
Cause: GPU memory exhaustion
Solution:
- Reduce batch size
- Enable mixed precision
- Clear GPU cache
- Use CPU processing
Cause: Too many API requests
Solution:
- Implement request throttling
- Use authentication for higher limits
- Cache responses
- Optimize request patterns
Cause: Processing taking too long
Solution:
- Optimize processing parameters
- Scale processing resources
- Check hardware performance
- Review model complexity
-
Documentation:
-
Community Support:
- GitHub Issues: https://github.com/ruvnet/wifi-densepose/issues
- Discord Server: https://discord.gg/wifi-densepose
- Stack Overflow: Tag
wifi-densepose
-
Professional Support:
- Enterprise support available
- Custom deployment assistance
- Performance optimization consulting
When reporting issues, include:
- System Information:
# System details
uname -a
python --version
docker --version
# WiFi-DensePose version
python -c "import wifi_densepose; print(wifi_densepose.__version__)"- Configuration:
# Environment variables (sanitized)
env | grep -E "WIFI|POSE|DATABASE" | sed 's/=.*/=***/'- Logs:
# Recent logs
tail -100 /var/log/wifi-densepose.log
# Error logs
grep -E "ERROR|CRITICAL" /var/log/wifi-densepose.log | tail -20- Health Status:
curl http://localhost:8000/api/v1/health | jq '.'- Stop all services:
docker-compose down
kubectl delete deployment wifi-densepose- Backup critical data:
pg_dump wifi_densepose > backup.sql
cp -r /app/data /backup/- Restore from backup:
psql wifi_densepose < backup.sql
cp -r /backup/data /app/- Restart with minimal configuration:
# Use safe defaults
export DEBUG=true
export MOCK_HARDWARE=true
docker-compose up -dFor additional support, contact the WiFi-DensePose team or consult the community resources listed above.