| 场景 | supervisor 进程起不来/秒退 |
|---|---|
| 组合 | status + tail + 手动复现 |
看现场
看现场
supervisorctl status # 看状态与最近 exit
supervisorctl tail app-worker stderr # 错误输出(当前缓冲)
tail -n 50 /var/log/supervisor/app-worker-stderr*.log手动复现
手动复现
grep -A15 'program:app-worker' /etc/supervisord.d/app-worker.ini
grep -E 'command|user|directory|environment' /etc/supervisord.d/app-worker.ini
sudo -u www-data bash -lc 'cd /opt/app && ./run.sh' # 按配置的条件手动跑一次环境差异类报错(找不到命令/模块):supervisor 不加载登录 shell 的 PATH——配置里用绝对路径或 environment= 显式声明。