Troubleshooting Guide
Common issues and solutions when using Asantiya for application deployment.
Quick Diagnostics
Before diving into specific issues, run these diagnostic commands:
# Check system health
asantiya doctor
 
# Validate configuration
asantiya config validate
 
# Check application status
asantiya status
 
# View recent logs
asantiya logs --tail 50Installation Issues
Command Not Found: asantiya
Problem: asantiya: command not found
Solutions:
- 
Check installation location: pip show asantiya
- 
Add to PATH (Linux/macOS): export PATH="$HOME/.local/bin:$PATH" echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
- 
Reinstall with user flag: pip install --user asantiya
- 
Use full path: ~/.local/bin/asantiya --version
Python Version Issues
Problem: Python version conflicts or missing Python
Solutions:
- 
Check Python version: python --version python3 --version
- 
Install Python 3.10+: # Ubuntu/Debian sudo apt update sudo apt install python3.10 python3.10-pip # macOS with Homebrew brew install [email protected] # Windows # Download from python.org
- 
Use virtual environment: python3 -m venv asantiya-env source asantiya-env/bin/activate # Linux/macOS # or asantiya-env\Scripts\activate # Windows pip install asantiya
Docker Issues
Docker Not Found
Problem: Docker not found or Cannot connect to Docker daemon
Solutions:
- 
Install Docker: # Ubuntu/Debian sudo apt update sudo apt install docker.io sudo systemctl start docker sudo systemctl enable docker # macOS/Windows # Install Docker Desktop
- 
Start Docker service: # Linux sudo systemctl start docker # macOS/Windows # Start Docker Desktop application
- 
Add user to docker group (Linux): sudo usermod -aG docker $USER # Log out and log back in
- 
Test Docker: docker --version docker run hello-world
Permission Denied
Problem: Permission denied while trying to connect to Docker daemon
Solutions:
- 
Add user to docker group (Linux): sudo usermod -aG docker $USER newgrp docker
- 
Use sudo (temporary solution): sudo asantiya deploy
- 
Check Docker socket permissions: ls -la /var/run/docker.sock sudo chmod 666 /var/run/docker.sock
Docker Build Failures
Problem: Docker build fails with various errors
Solutions:
- 
Check Dockerfile syntax: docker build -t test-image .
- 
Clear Docker cache: docker system prune -a
- 
Check disk space: df -h docker system df
- 
Build with verbose output: asantiya deploy --verbose
Configuration Issues
Invalid YAML Syntax
Problem: YAML syntax error or Invalid configuration
Solutions:
- 
Validate YAML syntax: asantiya config validate
- 
Check indentation: # Correct (2 spaces) service: myapp image: myapp # Incorrect (tabs or wrong spacing) service: myapp image: myapp
- 
Use YAML validator: # Online: yamlchecker.com # CLI: yamllint deploy.yaml
Missing Required Fields
Problem: Missing required field: service
Solutions:
- 
Check required fields: service: myapp # Required image: myapp # Required
- 
Use asantiya init: asantiya init
Environment Variable Issues
Problem: Environment variables not being set correctly
Solutions:
- 
Check .env file: cat .env
- 
Use proper syntax: env: - NODE_ENV=production - API_KEY=${API_KEY} # From .env file
- 
Export variables: export API_KEY=your-key asantiya deploy
Deployment Issues
Port Already in Use
Problem: Port 8080 is already in use
Solutions:
- 
Check what’s using the port: # Linux/macOS lsof -i :8080 # Windows netstat -ano | findstr :8080
- 
Use a different port: port: "8081:3000"
- 
Stop conflicting service: # Find and stop the process sudo kill -9 <PID>
Connection Refused
Problem: Connection refused when accessing application
Solutions:
- 
Check if application is running: asantiya status docker ps
- 
Check application logs: asantiya logs
- 
Verify port mapping: port: "8080:3000" # Host:Container
- 
Check firewall: # Linux sudo ufw status sudo ufw allow 8080
Application Won’t Start
Problem: Application container exits immediately
Solutions:
- 
Check container logs: asantiya logs docker logs <container-name>
- 
Check Dockerfile CMD: # Make sure CMD is correct CMD ["npm", "start"] # or CMD ["python", "app.py"]
- 
Test container locally: docker build -t test-app . docker run -p 8080:3000 test-app
- 
Check environment variables: asantiya config show
Accessory Issues
Database Connection Failed
Problem: Application can’t connect to database
Solutions:
- 
Check database status: asantiya accessory status postgres
- 
Check database logs: asantiya accessory logs postgres
- 
Verify connection string: env: - DATABASE_URL=postgres://user:password@postgres:5432/myapp
- 
Check network connectivity: docker network ls docker network inspect asantiya
Accessory Won’t Start
Problem: Accessory service fails to start
Solutions:
- 
Check accessory configuration: accessories: postgres: service: postgres image: postgres:15-alpine port: "5432:5432" env: - POSTGRES_DB=myapp - POSTGRES_USER=user - POSTGRES_PASSWORD=password
- 
Check for port conflicts: lsof -i :5432
- 
Remove and redeploy: asantiya accessory remove postgres asantiya accessory deploy postgres
Network Issues
SSH Connection Failed
Problem: Can’t connect to remote server via SSH
Solutions:
- 
Test SSH connection: 
- 
Check SSH key: ssh-add -l ssh-copy-id [email protected]
- 
Use SSH config: # ~/.ssh/config Host myserver HostName your-server.com User user Port 22 IdentityFile ~/.ssh/id_rsa
- 
Check SSH configuration: Ensure your SSH config is properly set up in ~/.ssh/config
Remote Build Failures
Problem: Remote Docker build fails
Solutions:
- 
Check remote Docker: ssh user@server "docker --version"
- 
Test remote connection: ssh user@server "docker run hello-world"
- 
Check remote builder config: builder: local: false remote: ssh://docker@builder-server
Performance Issues
Slow Builds
Problem: Docker builds are very slow
Solutions:
- 
Use .dockerignore: node_modules .git *.log .env
- 
Optimize Dockerfile: # Use multi-stage builds FROM node:18-alpine as build WORKDIR /app COPY package*.json ./ RUN npm install COPY . . RUN npm run build FROM nginx:alpine COPY --from=build /app/build /usr/share/nginx/html
- 
Use build cache: docker build --cache-from myapp:latest -t myapp .
High Memory Usage
Problem: Containers using too much memory
Solutions:
- 
Set memory limits: accessories: postgres: service: postgres image: postgres:15-alpine options: memory: 512m cpus: 0.5
- 
Monitor resource usage: docker stats
- 
Optimize application: - Reduce memory footprint
- Use smaller base images
- Implement proper garbage collection
 
Logging and Debugging
Enable Verbose Logging
# Enable verbose output
asantiya --verbose deploy
 
# Set environment variable
export ASANTIYA_VERBOSE=true
asantiya deployDebug Mode
# Dry run to see what would happen
asantiya deploy --dry-run
 
# Test configuration
asantiya config testLog Analysis
# Follow logs in real-time
asantiya logs --follow
 
# Show logs with timestamps
asantiya logs --timestamps
 
# Show last 100 lines
asantiya logs --tail 100
 
# Show logs since specific time
asantiya logs --since 2hGetting Help
Self-Help Resources
- 
Check documentation: 
- 
Run diagnostics: asantiya doctor asantiya config validate asantiya status
- 
Check logs: asantiya logs asantiya accessory logs
Community Support
- 
GitHub Issues: 
- 
Search existing issues: - Check if your issue has been reported
- Look for similar problems and solutions
 
- 
Provide information: When reporting issues, include: - Asantiya version: asantiya --version
- Configuration file (remove secrets)
- Error messages and logs
- System information: asantiya doctor
 
- Asantiya version: 
Professional Support
For enterprise support or complex issues:
- Contact maintainers through GitHub
- Check documentation for enterprise features
- Consider consulting for custom deployments
Prevention Tips
Best Practices
- Use version control for configuration files
- Test locally before deploying to production
- Use environment-specific configurations
- Monitor resources and set appropriate limits
- Keep dependencies updated
- Use health checks in your applications
- Implement proper logging
- Backup important data
Regular Maintenance
# Clean up unused resources
docker system prune -a
 
# Update Asantiya
pip install --upgrade asantiya
 
# Check for security updates
docker scan myapp:latestStill having issues? Check out our Examples for working configurations or join the community for help.