运用supervisord管理后台运行程序, 以及注意事项
来源:互联网 发布:win10 怎么修改mac 编辑:程序博客网 时间:2024/06/05 09:22
1. 安装 sudo pip install supervisor
2. 添加配置文件: sudo echo_supervisord_conf > /etc/supervisord.conf
3. 设置开机启动:
Supervisor is not running at startup. You can configure an init.d script to do this.
sudo vi /etc/init.d/supervisord
Add the following:
# Supervisord auto-start## description: Auto-starts supervisord# processname: supervisord# pidfile: /var/run/supervisord.pidSUPERVISORD=/usr/local/bin/supervisordSUPERVISORCTL=/usr/local/bin/supervisorctlcase $1 instart) echo -n "Starting supervisord: " $SUPERVISORD echo ;;stop) echo -n "Stopping supervisord: " $SUPERVISORCTL shutdown echo ;;restart) echo -n "Stopping supervisord: " $SUPERVISORCTL shutdown echo echo -n "Starting supervisord: " $SUPERVISORD echo ;;esac
And then...
sudo chmod +x /etc/init.d/supervisord
sudo update-rc.d supervisord defaults
sudo /etc/init.d/supervisord start
Obviously, this should probably go as added actions on cookbook.py and the init.d script as a template
遇到的问题
exit too quick
这个可能是某些python的库没有安装,然后也不报错
还有可能是之前启动没有成功,但是进程已经存在了,这里要手工kill掉之前的app进程再stall all
abnormal termination:
这个可以这样测试,如果不用supervisord来管理能正常运行的话,那一般是代码中可能有输出异常字符,比如中文什么的,解决办法有几个,最简单的就是去掉类似print 输出中文的地方 , 这个错误很郁闷,不会报错,但就是用supervisord运行不起来
0 0
- 运用supervisord管理后台运行程序, 以及注意事项
- Centos平台使用 Supervisord 管理后台进程
- 程序作业管理-背景后台运行管理
- Supervisord管理
- supervisord + docker run = web页面管理运行的docker
- centOS运行java程序以及后台运行的问题
- 程序作业管理-背景后台运行管理2
- Matlab中计算量较大的程序运行管理注意事项
- cadvisor + supervisord 运行
- 用supervisord管理uwsgi
- 用Supervisord管理进程
- supervisord管理进程详解
- 使用supervisord管理进程
- supervisord管理进程
- supervisord管理进程详解
- 用Supervisord管理进程
- Python-进程管理Supervisord
- Java程序后台运行
- C语言:详解指针
- CSDN:您的帐户被限制发帖,如有疑问请联系版主或论坛管理员。
- 敏捷开发流程总结
- 3.2.2 正则表达式的功能(1)
- struts1和struts2的特点和区别
- 运用supervisord管理后台运行程序, 以及注意事项
- 学习笔记(九)并发(三)
- 选择排序(java实现)
- Android Studio Windows 10 Terminal 无法输入的解决方法
- 父视图旋转,tabelView也会跟着旋转吗
- Python____初识+单线程爬虫
- 猫猫学iOS 之CoreLocation基本使用
- Codeforces 401C Team 贪心法
- EXCEL数据导入数据库表