This document helps you solve common issues you may encounter while using FuckRun.
- Start command returns error
- Process status shows not running
- Error messages in logs
- Incorrect program path
- Working directory doesn't exist
- Permission issues
- Port in use
- Python interpreter issues
- Check program path
# Verify program exists
ls <program_path>
# Check Python interpreter
python --version
- Check working directory
# Verify directory exists
ls <working_dir>
# Create directory
mkdir -p <working_dir>
- Check permissions
# View file permissions
ls -l <program_path>
# Modify permissions
chmod +x <program_path>
- Check ports
# Windows
netstat -ano | findstr <port>
# Linux
netstat -tulpn | grep <port>
- Python related
# Check dependencies
pip list
# Install dependencies
pip install -r requirements.txt
- Process starts but health check fails
- Logs show connection timeout or refused
- Program not fully started
- Incorrect health check URL
- Firewall blocking
- Internal program error
- Adjust wait times
process:
init_wait_secs: 10
health_check_timeout_secs: 10
- Verify health check
# Manual health check test
curl http://localhost:<port>/health
- Check firewall
# Windows
netsh advfirewall show currentprofile
# Linux
sudo ufw status
- Health check always fails
- Verify URL is correct
- Confirm port is correct
- Check application logs for errors
- Check firewall settings
- Check if proxy (like Clash) is causing failures (especially 502 Bad Gateway)
- Process restarts frequently
- Restart count exceeds limit
- Cannot exit normally
- Memory leak
- Misconfiguration
- Insufficient system resources
- Dependencies not ready
- Adjust restart strategy
processes:
web:
auto_restart: true
max_restarts: 5
start_delay: 5
- Monitor resource usage
# View process status
fuckrun list --watch
# System resources
top # Linux
taskmgr # Windows
# View FuckRun system logs
fuckrun logs --system
# Real-time tracking
fuckrun logs --system -f
# View standard output
fuckrun logs -n <process_name>
# View error logs
fuckrun logs -n <process_name> --type stderr
# View logs for specific date
fuckrun logs -n <process_name> --date 2024-01-22
- System logs:
.fuckrun/logs/<date>/fuckrun.log
- Process logs:
.fuckrun/processes/<process_name>/logs/<date>/{stdout,stderr}.log
- Status shows running but actually not
- PID mismatch
- Cannot stop process
- Reset process state
# Stop process
fuckrun stop -n <process_name>
# Clean state file
rm -f .fuckrun/processes/<process_name>/state.json
# Restart
fuckrun start -n <process_name>
- Force stop
# Windows
taskkill /F /PID <pid>
# Linux
kill -9 <pid>
- Child process remains after main process exits
- Cannot stop daemon normally
- Abnormal log output
- Check process tree
# Windows
wmic process where ParentProcessId=<pid> get ProcessId,CommandLine
# Linux
pstree -p <pid>
- Clean zombie processes
# Find related processes
ps aux | grep <process_name>
# Stop all related processes
pkill -f <process_name>
- Configuration file not found
- Configuration not taking effect
- Format errors
- Check configuration file location
# View configuration file
cat config.yaml
# Validate YAML syntax
python -c "import yaml; yaml.safe_load(open('config.yaml'))"
- Use default configuration
# Copy example configuration
cp config.yaml.example config.yaml
# Edit configuration
vim config.yaml
- Program cannot access environment variables
- Environment variables not taking effect
- Incorrect values
- Check environment variable configuration
processes:
web:
env:
PORT: 8000
DEBUG: true
- Verify environment variables
# Print environment variables at startup
fuckrun start -n web --env DEBUG=true
- Requires administrator privileges
- UAC restrictions
- Firewall blocking
- Run as administrator
- Adjust UAC settings
- Add firewall rules
- File permissions
- SELinux restrictions
- systemd integration
- Adjust file permissions
chmod +x /path/to/program
chown user:group /path/to/program
- SELinux settings
# Check SELinux status
sestatus
# Allow network access
semanage port -a -t http_port_t -p tcp <port>
- Insufficient memory
- High CPU usage
- File descriptor exhaustion
- Check system limits
# View limits
ulimit -a
# Adjust limits
ulimit -n 65535 # file descriptors
- Monitor resource usage
# Real-time monitoring
fuckrun list --watch --filter min-cpu=50
# View detailed status
fuckrun status -n <process_name>
- Optimize configuration
process:
# Adjust process priority
priority: normal
# Limit resource usage
max_memory: 1024m
max_cpu: 50