Troubleshooting Guide
General Issues
Services Not Running
Problem: Can't connect to IDE, Jenkins, Gitea, or MailHog
Solutions:
-
Check if services are running:
docker psShould show containers for code-server, jenkins, gitea, mailhog
-
Restart services:
docker-compose restart -
Check logs:
docker-compose logs -f [service_name]Replace
[service_name]with: code-server, jenkins, gitea, or mailhog -
If still down, full restart:
docker-compose down
docker-compose up -d
Can't Access IDE
Problem: Browser won't connect to code-server
Solutions:
-
Verify service is running:
docker ps | grep code-server -
Check that port 8080 is open:
curl http://localhost:8080Should return HTML (even if errors)
-
Check firewall/security group allows 8080
-
Restart code-server:
docker-compose restart code-server
Permission Denied on Files
Problem: Can't read/write exercises directory
Solutions:
-
Check permissions:
ls -la /opt/exercises/ -
Fix if needed:
sudo chown -R $USER:$USER /opt/exercises/
chmod -R 755 /opt/exercises/ -
In IDE, try opening a new terminal (sometimes helps)
Exercise-Specific Issues
Python Issues
ImportError / Module Not Found
Problem: ModuleNotFoundError: No module named 'xyz'
Solution:
-
Activate virtual environment:
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows -
Install dependencies:
pip install -r requirements.txt -
Verify installation:
python -c "import xyz; print(xyz.__version__)"
Virtual Environment Issues
Problem: Python packages not found even after pip install
Solution:
- Delete and recreate venv:
rm -rf venv
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Node.js / TypeScript Issues
npm Command Not Found
Problem: npm: command not found
Solution:
-
Verify Node.js is installed:
node --version # Should be 18+
npm --version # Should be 8+ -
If not installed, see Environment Setup
Dependencies Not Installing
Problem: npm install fails or hangs
Solution:
-
Clear cache:
npm cache clean --force -
Delete lock files:
rm -f package-lock.json -
Try again:
npm install
TypeScript Compilation Errors
Problem: error TS2307: Cannot find module
Solution:
-
Rebuild:
npm run clean
npm install
npm run build -
Check that all imports match actual file paths
LLM / API Issues
API Key Errors
Problem: 401 Unauthorized or Invalid API key
Solution:
-
Verify API key is set in
.env:cat .env | grep -i api_key -
Check it's in the right format (no quotes, proper prefix)
-
Test API connectivity:
curl -H "Authorization: Bearer YOUR_KEY" https://api-endpoint.com
Rate Limiting
Problem: rate_limit_exceeded or 429 Too Many Requests
Solution:
- Wait a few minutes before retrying
- Add delays between API calls
- Check if you're within free tier limits
- See API documentation for rate limits
Timeouts
Problem: API calls timeout or take forever
Solutions:
- Check network connection
- Verify API service is up
- Try a simpler request first
- Increase timeout values if possible
Git / Repository Issues
Git Config Missing
Problem: fatal: not a git repository
Solution:
- Initialize git:
git init
git add .
git commit -m "Initial commit"
SSH Key Issues
Problem: Permission denied (publickey)
Solution:
-
Generate SSH key:
ssh-keygen -t ed25519 -C "your@email.com" -
Add public key to Gitea (in web interface)
-
Test connection:
ssh -T git@localhost
Merge Conflicts
Problem: CONFLICT (content merge)
Solution:
-
Check conflicted files:
git status -
Edit files, remove conflict markers (
<<<<<<<,=======,>>>>>>>) -
Mark as resolved:
git add [file]
git commit -m "Resolve merge conflict"
Testing Issues
Tests Not Running
Problem: pytest or npm test command fails
Solution:
-
Verify test files exist:
ls test_*.py # Python
ls test/**/*.spec.ts # TypeScript -
Run with verbose output:
pytest -v # Python
npm test -- --verbose # TypeScript -
Check test syntax for errors
Tests Failing
Problem: Tests pass locally but fail in IDE or CI
Debugging Steps:
-
Run single test:
pytest test_file.py::test_name -v # Python
npm test -- --testNamePattern="test_name" # TypeScript -
Check test output for specific failure
-
Add debug prints/logging
-
Verify test data is correct
-
Check for environment variable issues
Getting Help
Check Documentation
- See Learning Path for exercise progression
- Review Environment Setup for services
- Check exercise-specific README in the exercises directory
Debug Systematically
- Read error message carefully
- Check exact line and code context
- Look at test output
- Trace backward from error
- Check logs:
docker-compose logs
Try Common Fixes
- Restart services:
docker-compose restart - Clear caches:
rm -rf .cache node_modules - Reinstall dependencies:
pip install -r requirements.txt && npm install - Rebuild:
npm run buildorpython setup.py build
Ask for Help
- Check if issue is on Known Issues page
- Ask instructor or TA
- Share:
- Error message (full text)
- Steps to reproduce
- What you tried already
- Current output/logs
Performance Issues
Slow Builds
Problem: npm run build or pytest takes forever
Solutions:
-
Clean build:
npm run clean && npm run build
pytest --cache-clear -
Run in parallel:
npm run build -- --parallel
pytest -n auto -
Check disk space:
df -h
High Memory Usage
Problem: System becomes slow, containers keep restarting
Solutions:
-
Check memory:
docker stats -
Reduce resource limits or restart containers:
docker-compose restart -
Clear caches:
docker system prune
npm cache clean --force
Still Stuck?
Collect Debug Information
# System info
uname -a
docker --version
python --version
node --version
# Service status
docker ps
docker-compose logs --tail=50
# Your code
git status
git log --oneline -10
cat .env | head
Next Steps
- Document the issue (exact error, steps to reproduce)
- Share debug info with instructor
- Review Architecture for system design
- Explore Contributing guide for community help
Good luck! You've got this. 🚀