0

I'm attempting to set up Supervisord on a RHEL server where I do not have root access. When I SSH into the server and run supervisord, everything seems to work properly: supervisord and the two programs it starts do not appear when I run ps, but do appear when I run ps -A. I can see the output of the programs, supervisorctl reports that they're running, etc. However, once I exit from the SSH session, supervisord and the two client programs are killed off, no longer show up under ps -A, etc. There's no event in the supervisord log file from when I exit the SSH session and I'm running supervisord with nodaemon=false in the configuration file (see below). Is there something I'm doing wrong or have setup incorrectly in the configuration file? Let me know if additional details are needed.

Command I use to launch supervisord:

/home/foo/.local/bin/supervisord

Output of ps -f:

UID        PID  PPID  C STIME TTY          TIME CMD
foo       1     0  0 09:11 ?        00:00:00 -jailshell
foo      53     1  0 09:11 ?        00:00:00 ps -f

[unix_http_server]
file=/tmp/supervisor.sock   ; the path to the socket file

[supervisord]
logfile=/home/foo/logs/supervisord.log ; main log file; default 
$CWD/supervisord.log
logfile_maxbytes=50MB        ; max main logfile bytes b4 rotation; default 50MB
logfile_backups=10           ; # of main logfile backups; 0 means none, default 10
loglevel=trace                ; log level; default info; others: debug,warn,trace
pidfile=/home/foo/.local/supervisord.pid ; supervisord pidfile; default supervisord.pid
nodaemon=false               ; start in foreground if true; default false
minfds=50                    ; min. avail startup file descriptors; default 1024
minprocs=25                   ; min. avail process descriptors;default 200
directory=/home/foo/foo_bar/              ; default is not to cd during start

; The rpcinterface:supervisor section must remain in the config file for
; RPC (supervisorctl/web interface) to work.  Additional interfaces may be
; added by defining them in separate [rpcinterface:x] sections.

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

; The supervisorctl section configures how supervisorctl will connect to
; supervisord.  configure it match the settings in either the unix_http_server
; or inet_http_server section.

[supervisorctl]
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL  for a unix socket

; The sample program section below shows all possible program subsection values.
; Create one or more 'real' program: sections to be able to control them under
; supervisor.

[program:foo]
command=/home/foo/foo_bar/foo.py              ; the program (relative uses PATH, can take args)

[program:bar]
command=/home/foo/foo_bar/bar.py              ; the program (relative uses PATH, can take args)
2
  • You're logging into this system interactively (through ssh) and launching supervisord from the command line? What specific command do you run to launch supervisord? Could you edit your question to show the ps -f output of the supervisord process?
    – Kenster
    Commented Sep 7, 2017 at 22:14
  • @Kenster, I added the launch command and output of ps -f as requested to my question. I am logging into this system interactively through SSH and launching from the command line.
    – ericbdevil
    Commented Sep 8, 2017 at 14:17

1 Answer 1

0

You can use byobu if on Debian like system (Ubuntu). It keeps your session fully alive even when you close your SSH connection.

1
  • Please don't abuse `code` for formatting.
    – Arjan
    Commented Sep 8, 2017 at 16:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .