Troubleshooting¶
Solutions to common issues with DataSci Homelab.
Quick Diagnostics¶
Run these commands to diagnose issues:
# Check container status
docker-compose ps
# View recent logs
docker-compose logs --tail=100
# Check container health
docker inspect datasci-homelab --format='{{.State.Health.Status}}'
# Test services inside container
docker-compose exec homelab curl -s http://localhost:8787 | head
docker-compose exec homelab curl -s http://localhost:8888 | head
Container Issues¶
Container Won't Start¶
Symptom: docker-compose up fails or container exits immediately.
Check logs:
Common causes:
Fix: Increase Docker memory allocation: - Docker Desktop → Settings → Resources → Memory → Increase to 8GB+
Container Keeps Restarting¶
Check why it's failing:
Common causes:
- Service crash inside container
- Health check failing
- Resource exhaustion
Fix: Try running without health check:
Container Running But Services Not Accessible¶
Verify services are listening:
Expected output shows ports 8787 and 8888 listening.
Check port mapping:
RStudio Issues¶
RStudio Login Fails¶
Symptom: Correct password rejected.
Reset password:
Check current user:
RStudio Blank Screen¶
Clear session data:
rm -rf volumes/home/.local/share/rstudio/sessions/*
rm -rf volumes/home/.rstudio/
docker-compose restart
RStudio "Unable to Connect to Service"¶
Check RStudio process:
Restart RStudio only:
docker-compose exec -u root homelab pkill rserver
docker-compose exec homelab sudo /usr/lib/rstudio-server/bin/rserver &
Package Installation Fails¶
Missing system dependency:
# Error message like:
# ERROR: configuration failed for package 'xxx'
# package 'xxx' requires 'libyyy'
Fix:
docker-compose exec -u root homelab apt-get update
docker-compose exec -u root homelab apt-get install -y libyyy-dev
Then retry installation in R.
Packages Not Persisting¶
Check volume mount:
Verify .libPaths() includes the volume:
Jupyter Issues¶
Jupyter Token Not Working¶
Get current token:
Or check logs:
Set a new token: Update JUPYTER_TOKEN in .env and restart:
Kernel Not Starting¶
List available kernels:
Reinstall Python kernel:
Reinstall R kernel:
Jupyter Extensions Not Loading¶
Rebuild JupyterLab:
Check extension status:
Notebook Won't Save¶
Check permissions:
Fix permissions:
Volume Issues¶
Data Disappeared¶
Volumes only deleted with -v flag:
Check volumes exist:
Recover from backup:
Volume Permissions Wrong¶
Symptom: "Permission denied" when accessing files.
Fix:
docker-compose exec -u root homelab chown -R rstudio:rstudio /home/rstudio/
docker-compose exec -u root homelab chown -R rstudio:rstudio /usr/local/lib/R/site-library/
Volume Mount Not Working¶
Verify mount points:
Check docker-compose.yml syntax:
Network Issues¶
Can't Access from Other Devices¶
By default, only accessible from localhost.
Allow LAN access: Edit .env:
Or modify docker-compose.yml:
Firewall Blocking Access¶
macOS: - System Preferences → Security → Firewall → Allow Docker
Linux:
Slow Connection¶
Check if health checks are failing:
Reduce logging:
Performance Issues¶
RStudio/Jupyter Slow¶
Check resource usage:
Increase resources in Docker Desktop: - Memory: 8GB minimum, 16GB recommended - CPUs: 4+ recommended
Check for runaway processes:
High Disk Usage¶
Check volume sizes:
Clean package cache:
# R package cache
docker-compose exec homelab rm -rf /tmp/Rtmp*
# Python package cache
docker-compose exec homelab pip cache purge
Recovery Procedures¶
Complete Reset (Last Resort)¶
This Deletes All Data
Only use if nothing else works.
# Stop everything
docker-compose down -v
# Remove volumes directory
rm -rf volumes/
# Re-run setup
./scripts/setup.sh
# Pull fresh image
docker-compose pull
# Start fresh
docker-compose up -d
Partial Reset (Keep Data)¶
# Stop container
docker-compose down
# Remove container (not volumes)
docker rm datasci-homelab
# Pull fresh image
docker-compose pull
# Start fresh container with existing volumes
docker-compose up -d
Export Data Before Reset¶
# Backup everything
tar -czf full-backup.tar.gz volumes/
# Backup just home directory
tar -czf home-backup.tar.gz volumes/home/
# Backup package lists
./scripts/backup-packages.sh
Getting Help¶
Information to Include¶
When asking for help, include:
- Docker version:
docker --version - Compose version:
docker-compose --version - OS and architecture:
uname -a - Container logs:
docker-compose logs --tail=100 - Container status:
docker-compose ps - Error messages: Exact text, not paraphrased
Where to Get Help¶
- GitHub Issues
- Search existing issues first
- Provide reproduction steps
Debug Mode¶
Run container in foreground to see all output:
Run a shell inside the container:
Run as root for debugging: