python命令行执行进程管理器时:can't find command。。。

扶醉桌前 提交于 2020-12-27 10:06:59

当我在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

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!