精华内容
下载资源
问答
  • Supervisorctl学习

    2020-06-27 22:38:07
    1.Supervisorctl supervisorctl 是一个进程托管工具,好比一组灯泡开关,负责操作灯泡的点亮、关闭。 supervisorctl ----- 前台运行 supervisorctl status xxxx ----- 查询xxxx的进程状态 supervisorctl start...

    1.Supervisorctl

    supervisorctl 是一个进程托管工具,好比一组灯泡开关,负责操作灯泡的点亮、关闭。


    supervisorctl ----- 前台运行
    supervisorctl status xxxx ----- 查询xxxx的进程状态
    supervisorctl start xxx ----- 启动xxx进程
    supervisorctl stop xxx ----- 停止xxx进程
    supervisorctl restart xxx ----- 重启xxx进程


    上面说了supervisorctl是一个托管工具,所以我们即使把进程A交给了supervisorctl托管,我们也是可以自己手动启动\停止进程的

    找到进程启动指令:

    	ps -efww | grep xxx
    	# ww是为了让结果显示完全
    	root     11859  2698  0 618 ?       00:17:29 /opt/release/xc-app/app -cf /opt/release/xc-app/app/service.conf -log_dir=/opt/release/xc-app/app/logs -logger.out=file -host=true
    	#最后一串就是此进程的启动指令
    

    将服务停掉,ps将查不到此进程:
    supervisorctl stop xxx

    使用上面得到启动指令启动进程
          1.使用ps查看进程状态
          2.使用supervisorctl status查看进程状态
    结果:可以发现ps能够查到进程但supervisorctl status显示进程依然是STOP状态,这是因为supervisorctl监控不到人为对进程的操作,但是这个时候我们还是能够正常使用此进程功能的。

    展开全文
  • supervisorctl 报错

    2019-11-10 00:33:49
    输入 supervisorctl 之后,提示错误。 unix:///tmp/supervisor.sock no such file 首先杀掉所有 server kill -9 $(ps -ef|grep server | awk '{print $2}') 然后启动 supervisord,启动正常。但是有几个 server...

    输入 supervisorctl 之后,提示错误。

    unix:///tmp/supervisor.sock no such file
    

    首先杀掉所有 server

    kill -9 $(ps -ef|grep server | awk '{print $2}')
    

    然后启动 supervisord,启动正常。但是有几个 server没有启动,报错

     BACKOFF   Exited too quickly (process log may have details)
     FATAL     Exited too quickly (process log may have details)
    

    ps -ef |grep 对应的 server,查看是否有多余进程,杀掉多余的进程。
    然后发现还有两个 server 无法启动,看了一下报错日志,发现是 redis 没有启动。启动 redis 之后,一切正常。

    展开全文
  • Allow supervisorctl override

    2020-12-26 19:56:38
    <div><p>Allow supervisorctl override and maintain the sockfile during stop actions</p><p>该提问来源于开源项目:Supervisor/initscripts</p></div>
  • add supervisorctl completion

    2021-01-10 08:02:42
    <div><p>Completion for the <code>supervisorctl</code> command in supervisord.</p><p>该提问来源于开源项目:zsh-users/zsh-completions</p></div>
  • supervisorctl使用记录

    2020-08-26 10:20:52
    supervisorctl status #查看单个服务状态 supervisorctl status 服务名 #启动/停止/重启服务 supervisorctl start/stop/restart 服务名 新增一个服务: [program:<服务名>] command=<启动命令> ...

    常用命令:

    #查看所有服务状态
    supervisorctl status
    #查看单个服务状态
    supervisorctl status 服务名
    #启动/停止/重启服务
    supervisorctl start/stop/restart 服务名
    

    新增一个服务:

    [program:<服务名>]
    command=<启动命令>
    process_name=%(program_name)s ; process_name expr (default %(program_name)s)
    numprocs=1                    ; number of processes copies to start (def 1)
    directory=<运行目录>                ; directory to cwd to before exec (def no cwd)
    ;umask=022                     ; umask for process (default None)
    ;priority=999                  ; the relative start priority (default 999)
    autostart=true                ; start at supervisord start (default: true)
    autorestart=unexpected        ; whether/when to restart (default: unexpected)
    startsecs=1                   ; number of secs prog must stay running (def. 1)
    startretries=3                ; max # of serial start failures (default 3)
    exitcodes=0,2                 ; 'expected' exit codes for process (default 0,2)
    stopsignal=QUIT               ; signal used to kill process (default TERM)
    stopwaitsecs=10               ; max num secs to wait b4 SIGKILL (default 10)
    stopasgroup=false             ; send stop signal to the UNIX process group (default false)
    killasgroup=false             ; SIGKILL the UNIX process group (def false)
    ;user=skywell                  ; setuid to this UNIX account to run the program
    ;redirect_stderr=true          ; redirect proc stderr to stdout (default false)
    stdout_logfile=/var/log/<服务名>.log        ; stdout log path, NONE for none; default AUTO
    stdout_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)
    stdout_logfile_backups=1     ; # of stdout logfile backups (default 10)
    stdout_capture_maxbytes=1MB   ; number of bytes in 'capturemode' (default 0)
    stdout_events_enabled=false   ; emit events on stdout writes (default false)
    stderr_logfile=/var/log/<服务名>.err        ; stderr log path, NONE for none; default AUTO
    stderr_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)
    stderr_logfile_backups=10     ; # of stderr logfile backups (default 10)
    stderr_capture_maxbytes=1MB   ; number of bytes in 'capturemode' (default 0)
    stderr_events_enabled=false   ; emit events on stderr writes (default false)
    environment=A="1",B="2",HOME="/home/skywell"       ; process environment additions (def no adds)
    serverurl=AUTO                ; override serverurl computation (childutils)
    

    首先添加任务描述文件,在/etc/supervisor目录下新建文件sparkportal.conf, 将上面任务模板内容复制进文件sparkportal.conf中,将<服务名>替换为任务名sparkportal,将<启动命令>替换为node www.js,将<运行目录>替换为程序所在目录/usr/local/sparkportal/bin。

    sparkportal的配置文件为
    [program:sparkportal]
    command=node www.js
    process_name=%(program_name)s ; process_name expr (default %(program_name)s)
    numprocs=1                    ; number of processes copies to start (def 1)
    directory=/usr/local/sparkportal/bin                ; directory to cwd to before exec (def no cwd)
    ;umask=022                     ; umask for process (default None)
    ;priority=999                  ; the relative start priority (default 999)
    autostart=true                ; start at supervisord start (default: true)
    autorestart=unexpected        ; whether/when to restart (default: unexpected)
    startsecs=1                   ; number of secs prog must stay running (def. 1)
    startretries=3                ; max # of serial start failures (default 3)
    exitcodes=0,2                 ; 'expected' exit codes for process (default 0,2)
    stopsignal=QUIT               ; signal used to kill process (default TERM)
    stopwaitsecs=10               ; max num secs to wait b4 SIGKILL (default 10)
    stopasgroup=false             ; send stop signal to the UNIX process group (default false)
    killasgroup=false             ; SIGKILL the UNIX process group (def false)
    ;user=skywell                  ; setuid to this UNIX account to run the program
    ;redirect_stderr=true          ; redirect proc stderr to stdout (default false)
    stdout_logfile=/var/log/sparkportal.log        ; stdout log path, NONE for none; default AUTO
    stdout_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)
    stdout_logfile_backups=1     ; # of stdout logfile backups (default 10)
    stdout_capture_maxbytes=1MB   ; number of bytes in 'capturemode' (default 0)
    stdout_events_enabled=false   ; emit events on stdout writes (default false)
    stderr_logfile=/var/log/sparkportal.err        ; stderr log path, NONE for none; default AUTO
    stderr_logfile_maxbytes=1MB   ; max # logfile bytes b4 rotation (default 50MB)
    stderr_logfile_backups=10     ; # of stderr logfile backups (default 10)
    stderr_capture_maxbytes=1MB   ; number of bytes in 'capturemode' (default 0)
    stderr_events_enabled=false   ; emit events on stderr writes (default false)
    environment=A="1",B="2",HOME="/home/skywell"       ; process environment additions (def no adds)
    serverurl=AUTO                ; override serverurl computation (childutils)
    
    
    最小必要配置
    [program:easyswoole-xxx-xxx-com]
    #process_name=%(process_num)02d
    command=php /home/www/xx.xxx.com/easyswoole start produce
    autostart=true
    autorestart=true
    user=root
    #numprocs=1
    redirect_stderr=true
    stdout_logfile=/home/www/xxx.xxx.com/Log/supervisor.log
    

    增加任务

    supervisorctl update
    

    该命令会将sparkportal.conf所描述的任务启动并纳入管理。然后运用查看任务命令即可查看新增任务的运行状态,如若运行失败,可查看/usr/log目录下的相关日志分析原因。

    设置环境变量
    在配置文件找到environment所在行,若没有没有最下面增加environment=变量名="变量值"即可,如果多个环境变量用逗号分隔,例如environment=变量名1=“变量值1”,变量名2=“变量值2”。

    将nodejs运行环境设置为生产环境,增加如下代码:

    environment=NODE_ENV=production
    

    转载自:https://www.jianshu.com/p/f8735b039c67?from=groupmessage

    展开全文
  • <p>supervisorctl <h5>ANSIBLE VERSION <pre><code> ansible 2.1.2.0 config file = /home/mike/installer configured module search path = Default w/o overrides </code></pre> <h5>CONFIGURATION ...
  • supervisorctl error

    2016-09-25 18:18:00
    ----------supervisorctl error: <class 'socket.error'>---------------------- http://stackoverflow.com/questions/18859063/supervisor-socket-error-issue ----------------------------------------.....

    ----------supervisorctl error: <class 'socket.error'>----------------------

    http://stackoverflow.com/questions/18859063/supervisor-socket-error-issue

    ------------------------------------------------------------------------------------

    supervisorctl reread
    error: <class 'socket.error'>, [Errno 111] Connection refused: file: /usr/lib64/python2.6/socket.py line: 56

    You have to start supervisord before you can use supervisorctl. In my case:

    supervisord -c /etc/supervisor/supervisord.conf
    supervisorctl -c /etc/supervisor/supervisord.conf


    ----------supervisorctl error: <class 'socket.error'>----------------------

    转载于:https://www.cnblogs.com/misstaste/p/5906498.html

    展开全文
  • supervisorctl的使用

    2020-08-25 10:15:21
    supervisorctl的使用 查看配置文件 cat /etc/supervisord.conf ; Sample supervisor config file. [unix_http_server] file=/var/run/supervisor/supervisor.sock ; (the path to the socket file) ;chmod=0700 ...
  • Ubuntu安装supervisorctl

    千次阅读 2016-08-20 15:51:50
    Linux安装supervisorctl
  • supervisorctl命令的使用

    万次阅读 2019-06-28 10:09:47
    supervisorctl 进程管理 1.查看所有子进程的状态 [root@wghpt_tomcat2031_8006 ~]# supervisorctl status dfs RUNNING pid 56001, uptime 151 days, 0:26:28 sshd...
  • supervisorctl 管理django

    2019-09-20 04:33:56
    supervisorctl 进入命令行,运行shutdown 结束所有启动的程序 supervisord -c /etc/supervisord.conf 转载于:https://my...
  • supervisorctl 基本命令

    万次阅读 2018-06-22 14:05:52
    1) 查看所有子进程的状态root@hdp11:/etc/supervisord.d#supervisorctl statusredash_celery RUNNING pid 6815, uptime 64 days, 19:32:07redash_celery_scheduled RUNNING pid 6817, up...
  • <div><p>When running <code>flock deploy</code> everything appears to be going well up until the point of <code>supervisorctl</code> reloading. <p>When it comes to loading up vapor, it fails. The ...
  • supervisorctl: name: "{<!-- -->{item}}" state: restarted with_items: - "a:" - "b:" sudo: yes <p>Time to restart two applications is around 10 - 15 minutes. This doesn&#...
  • supervisorctl BAD_NAME error

    2021-01-11 15:19:17
    <p>sudo supervisorctl stop cuckoo: <p>...results in the error... <p>error: , : file: /usr/lib/python2.7/xmlrpclib.py line: 794</p><p>该提问来源于开源项目:cuckoosandbox/cuckoo</p></div>
  • 部署环境:linux,nginx,supervisorctl  安装supervisorctl  sudo yum install python-setuptools sudo easy_install supervisor sudo echo_supervisord_conf &gt; /etc/supervisord.conf demo.conf ...
  • sudo -E supervisorctl -c security_monkey.ini", it fails every time. I am not an expert in Python, so getting a resolution here has been challenging. If you need further information, let me know. ...
  • supervisorctl部署服务器背景supervisorctl配置Nginx配置服务器配置其它备忘 背景 通过Python编写服务端,Vue编写前端,实现一个博客网站,并通过nginx&supervisorctl部署到云服务器,比如腾讯云。 ...
  • supervisorctl stop kippo" is issued, the only process killed is the first process (start.sh) but not the subprocesses. <p>I find a workaround for this, the file /etc/supervisor/conf.d/kippo.cfg ...
  • default: Error: /Stage[main]/Supervisord::Reload/Exec[supervisorctl_reread]: Failed to call refresh: /usr/bin/supervisorctl reread returned 1 instead of one of [0] ==> default: Error: /...
  • <div><p><a href="http://docs.ansible.com/supervisorctl_module.html">supervisorctl</a> manages the state of a program without checking that a supervised program exists. Even if program does not exist ...
  • <p>supervisorctl module <h5>ANSIBLE VERSION <pre><code> ansible 2.0.0.1 </code></pre> <h5>SUMMARY <p>Add support for <code>all</code> variable, so commands like: <pre><code> supervisorctl restart all ...
  • <h1>supervisorctl status #要检查是否都是running状态,uptime是不是递增 这些命令也都没有 前面的步骤都是成功的,请大佬指教,在线等</p><p>该提问来源于开源项目:welliamcao/OpsManage...
  • 我在线上使用supervisorctl管理服务时遇到程序文件更新了,但是下次supervisorctl执行的时候并没有更新, 原因是supervisor更新后必须重新读取加载文件才行 (2)解决 supervisorctl reread #重新读取 ...
  • supervisorctl status //查看所有进程的状态 supervisorctl stop supervisorctl start supervisorctl restart supervisorctl update //配置文件修改后使用该命令加载新的配置 supervisorctl reload //重新启动配置中...
  • <p>supervisorctl <h5>Ansible Version: <p>N/A <h5>Ansible Configuration: <p>N/A <h5>Environment: <p>N/A <h5>Summary: <p><a href=...
  • 1. 对于supervisor 而言,配置文件在不手动指定的情况下 -c 参数$CWD/supervisord.conf$CWD/etc/supervisord.conf/etc/... supervisorctl 与supervisord 进程进行通讯默认使用的是 tcp 连接[inet_http_server...
  • <p>supervisorctl <h5>ANSIBLE VERSION <pre><code> 2.2 </code></pre> <h5>SUMMARY <p><code>supervisorctl</code> module has no way to conditionally restart a service only if the config changed. This is ...
  • <p>supervisorctl <h5>ANSIBLE VERSION <p>ansible 2.1.0.0 <h5>SUMMARY <p>Implements #3229 partially, by adding a "reloaded" state that uses the new "signal" command in supervisor 3.2.0 ...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 742
精华内容 296
关键字:

supervisorctl