当我在Xshell终端中远程启动supervisorctl 时,进程却没有启动起来。
[python@xxxx-web scripts]$ supervisorctl
im FATAL can't find command '/home/python/scripts/im.sh'
xxxx:xxxx-app FATAL can't find command '/home/python/scripts/xxxx_app.sh'
supervisor> status
im FATAL can't find command '/home/python/scripts/im.sh'
xxxx:xxxx-app FATAL can't find command '/home/python/scripts/xxxx_app.sh'
检查了im.sh和xxxx_app.sh的路径和内容,没有问题,尝试单独的执行命令:/home/python/scripts/im.sh:
[python@xxxx-web scripts]$ /home/python/scripts/im.sh
-bash: /home/python/scripts/im.sh: Permission denied
权限不够,直接修改scripts的.sh文件权限--->进入scripts目录后执行:sudo chmod u+x *.sh
权限修改后,单独运行命令--->/home/python/scripts/im.sh,
单独执行.sh命令成功,但是进程管理器supervisorctl 依旧是FATAL状态。
执行---> supervisorctl reload,
再次启动 supervisorctl ,进程成功开启。
[python@xxxx-web scripts]$ /home/python/scripts/im.sh
(29415) wsgi starting up on http://0.0.0.0:8001
^[[A^Cwsgi exiting
(29415) wsgi exited, is_accepting=True
[python@xxxx-web scripts]$ supervisorctl
im FATAL can't find command '/home/python/scripts/im.sh'
xxxx:xxxx-app FATAL can't find command '/home/python/scripts/xxxx_app.sh'
supervisor>
[python@xxxx-web scripts]$ ^C
[python@xxxx-web scripts]$ supervisorctl reload
Restarted supervisord
[python@xxxx-web scripts]$ supervisorctl
im RUNNING pid 29919, uptime 0:00:05
xxxx:xxxx-app RUNNING pid 29920, uptime 0:00:05
来源:oschina
链接:https://my.oschina.net/u/4710565/blog/4844512