Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
1
answers
3576
views
Why doesn't supervisor log the output of a child process?
When I run the script `server.sh` (runs a quake dedicated server) in the terminal it will create initialization output like ------- Game Initialization ------- gamename: baseqz gamedate: May 25 2016 initializing access list... loaded 0 steam ids into the access list Not logging to disk. 0 teams with...
When I run the script
server.sh
(runs a quake dedicated server) in the terminal it will create initialization output like
------- Game Initialization -------
gamename: baseqz
gamedate: May 25 2016
initializing access list...
loaded 0 steam ids into the access list
Not logging to disk.
0 teams with 0 entities
21 items registered
And when some person connects to the server then this script will output something like Person xyz has connected
I want supervisor to manage this *server.sh* script but supervisor does not output any kind of initialization messages or connecting message (if someone connects).
Stdout and stderr are both logged. Why does supervisor not log the output of *server.sh*?
Here is my **supervisord.conf**
[program:prog]
command=/home/user/.steam/steamapps/common/qlds/server.sh
stdout_logfile=stdout.txt
stderr_logfile=stdout.txt
[supervisord]
nodaemon=true
[supervisorctl]
serverurl=http://127.0.0.1:9001
[inet_http_server]
port=127.0.0.1:9001
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
EDIT:
I noticed a strange behaviour of server.sh
server.sh &> out.txt
generates no output in out.txt (no Game initialization, nothink). But only after i typed in stdin "quit" (server.sh quits now) then the Game initialization and so on got written into file out.txt
mankind86
(21 rep)
Jan 14, 2022, 11:49 AM
• Last activity: Jun 16, 2025, 08:05 PM
0
votes
2
answers
2963
views
Supervisord removing a process after successfully running
I have the following configuration for a process to run continuously. Apparently, it works very fine but after few hours or sometimes few minutes, the process gets terminated. Any kind of help is highly appreciated. **Supervisord Config:** [program:action_consumer] process_name=%(program_name)s_%(pr...
I have the following configuration for a process to run continuously. Apparently, it works very fine but after few hours or sometimes few minutes, the process gets terminated.
Any kind of help is highly appreciated.
**Supervisord Config:**
[program:action_consumer]
process_name=%(program_name)s_%(process_num)02d
command = php /var/www/the_api/web/index.php actionCron
numprocs = 2
autostart=true
autorestart=true
user=console_api
redirect_stderr=true
stdout_logfile=/var/www/the_api/logs/action_consumer.log
RestartSec=3
Restart=3
WatchdogSec=3
**OS Info:**
Debian GNU/Linux 8 (jessie)
Log file:
The log file contains the following error:
FATAL state, too many start retries too quickly
**Important:**
It is obvious that the process terminates too quickly, it is my requirement. I don't want to run the script in an infinite loop. Is setting
startretries
a valid solution?
Jason Kruger
(1 rep)
Apr 3, 2018, 06:37 AM
• Last activity: Apr 8, 2025, 12:03 PM
0
votes
0
answers
1009
views
Problem with permissions when supervisor used in php docker image
I am building my app using official php docker image. **Case 1:** When I run supervisord with root user and subprocess php-fpm with www-data user. I always get this error log: ``` FPM initialization failed failed to open error_log (/proc/self/fd/2): Permission denied (13) ``` My supervisor config: `...
I am building my app using official php docker image.
**Case 1:** When I run supervisord with root user and subprocess php-fpm with www-data user. I always get this error log:
FPM initialization failed
failed to open error_log (/proc/self/fd/2): Permission denied (13)
My supervisor config:
[unix_http_server]
file=/run/supervisord.sock ; the path to the socket file
[supervisord]
logfile=/var/log/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; supervisord pidfile; default supervisord.pid
nodaemon=true ; start in foreground if true; default false
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///run/supervisord.sock ; use a unix:// URL for a unix socket
[include]
files = /etc/supervisor.d/*.conf
My subprocess php-fpm config:
[program:php-fpm]
process_name=%(program_name)s
command=php-fpm
user=www-data
autostart=true
autorestart=true
redirect_stderr=false
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
**Note that if I change user of subprocess php-fpm from www-data to root, it worked perfectly**
**Case 2:** When I run supervisord with www-data user (with a little change in config file in order to run it) and subprocess php-fpm also with www-data user, everything works fine.
My supervisor config:
[unix_http_server]
file=/app/supervisord.sock ; the path to the socket file
[supervisord]
logfile=/app/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/app/supervisord.pid ; supervisord pidfile; default supervisord.pid
nodaemon=true ; start in foreground if true; default false
user=www-data ; setuid to this UNIX account at startup; recommended if root
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///run/supervisord.sock ; use a unix:// URL for a unix socket
[include]
files = /etc/supervisor.d/*.conf
My subprocess php-fpm config:
[program:php-fpm]
process_name=%(program_name)s
command=php-fpm
user=www-data
autostart=true
autorestart=true
redirect_stderr=false
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
What is the difference between these 2 cases? Thank you!
Hải Phạm
(1 rep)
Mar 24, 2024, 05:30 PM
• Last activity: Mar 25, 2024, 10:37 AM
0
votes
1
answers
143
views
How to detect if a process runs longer than X seconds, then do something with it?
I’m on debian. I am calling a ffmpeg process to generate a mp3. this gets called from a php script using shell_exec. This works fine 99% of the time. Sometimes, the ffmpeg process doesn’t exit and I’m left with ffmpeg running for hours. I”m slowly tweaking the params and its happening less, but stil...
I’m on debian.
I am calling a ffmpeg process to generate a mp3. this gets called from a php script using shell_exec. This works fine 99% of the time.
Sometimes, the ffmpeg process doesn’t exit and I’m left with ffmpeg running for hours. I”m slowly tweaking the params and its happening less, but still crops up on occasion.
When I look at the top processes I sometimes find it sitting there eating the cpu and disk, the process hasn’t terminated.
993 www-data 20 0 252012 38904 27384 R 99.7 1.9 390:09.84 ffmpeg
I normally look for the process (and confirm it’s the right one by ensuring the params it executed with match my php script:
ps -eo args | grep ffmpeg
then get its process id and kill it, and go hunt down the file it was working on and trash that too
-rw-r--r-- 1 www-data www-data 14G Feb 9 21:20 cfcd208495d565ef66e7dff9f98764da.mp3
- uh oh
I’m not sure what words I should be googling for.
I’m looking for ideas for a supervisory process or script that I can run through a supervisord/cron job that can output all processes that run for longer than X seconds, and pipe their process details into a script that can match the process with arguments matching a pattern (using some kind of nasty regex I imagine), kill the process and go trash any files matching on their arguments.
frumbert
(125 rep)
Feb 9, 2024, 09:34 PM
• Last activity: Feb 9, 2024, 10:12 PM
2
votes
0
answers
155
views
Permission errors when running program using supervisor, but not in the shell
I have a program which is supposed to always be running. This program listens for commands in a message broker, does a file system operation upon request, and publishes the result through the same broker. In order to access the files, it needs to run as the user `scicat`. To ensure that the program...
I have a program which is supposed to always be running. This program listens for commands in a message broker, does a file system operation upon request, and publishes the result through the same broker. In order to access the files, it needs to run as the user
scicat
. To ensure that the program is always running, I installed supervisord
and ran the program through it.
The program starts and listens properly, but when it's time for the file system operation, it encounters permission errors. However, if I do sudo su - scicat
and run it through the shell, the program works as intended.
This is how the service is defined in supervisord:
[program:biomax-file-size-helper]
command=/opt/exp-lc/venvs/biomax-file-size-helper/bin/python /opt/exp-lc/biomax-file-size-helper/main.py
user=scicat
If I run both programs alongside – one working and one not – and do ps aux
, I see the following:
scicat 29867 0.2 0.4 124640 19444 ? Sl 15:44 0:03 /opt/exp-lc/venvs/biomax-file-size-helper/bin/python /opt/exp-lc/biomax-file-size-helper/main.py
scicat 30012 2.8 0.4 124096 19668 pts/0 Sl+ 16:07 0:00 /opt/exp-lc/venvs/biomax-file-size-helper/bin/python /opt/exp-lc/biomax-file-size-helper/main.py
I.e. two more or less identical processes in any relevant regard. What is it that makes the program unable to access files when run through supervisord, but not when run in the shell?
Hannes Petri
(121 rep)
May 17, 2018, 03:16 PM
• Last activity: Jul 31, 2023, 07:35 AM
0
votes
0
answers
2734
views
supervisorctl add & remove commands
Context ======= In the [supervisor documentation][1], I can read the following parameters, for the `supervisorctl add` and `supervisorctl remove` control commands: > add \ […] > > Activates any updates in config for process/group >remove \ […] > > Removes process/group from active config Problem ===...
Context
=======
In the supervisor documentation , I can read the following parameters, for the
supervisorctl add
and supervisorctl remove
control commands:
> add \ […]
>
> Activates any updates in config for process/group
>remove \ […]
>
> Removes process/group from active config
Problem
=======
I am not sure to get what it means concretely for the processes running on the system to "activate" an update in config, neither to "remove" a process/group from "active config".
Question
========
What do these two commands exactly do?
- when no supervisord config file has been modified beforehand?
- when config files have been modified prior to using these? (both when supervisorctl reread
has been used and not)
Bonus (optional) question
-------------------------
- Does supervisorctl update
internally uses remove
and add
? If so, how?
Totor
(21020 rep)
Jul 11, 2023, 10:51 AM
• Last activity: Jul 11, 2023, 11:03 AM
1
votes
1
answers
133
views
How to set supervisord to start after the /etc/fstab mount
I am using supervisord to control and monitor my application. My application uses the mount configured in /etc/fstab and the application needs to start after entries in /etc/fstab are mounted during every restart of the machine. But in rare cases, my application starts before the /etc/fstab entries...
I am using supervisord to control and monitor my application. My application uses the mount configured in /etc/fstab and the application needs to start after entries in /etc/fstab are mounted during every restart of the machine. But in rare cases, my application starts before the /etc/fstab entries are mounted and picks up the unmounted directory.
I am looking for options for supervisord / solution as in the below thread.
https://unix.stackexchange.com/questions/246935/set-systemd-service-to-execute-after-fstab-mount
Do we have any option in supervisord which is similar to 'After=' option which available in systemd ?
pavan kumar
(11 rep)
Nov 3, 2022, 06:04 AM
• Last activity: Jun 5, 2023, 02:08 PM
1
votes
0
answers
329
views
Autorestart not working for supervisord programs
I am working with supervisord and I am facing issues in automatic restart of supervisord programs. ## `supervisord.conf` ``` [supervisord] logfile=/dev/null pidfile=/tmp/supervisord.pid nodaemon=true [unix_http_server] file = /tmp/supervisor.sock [rpcinterface:supervisor] supervisor.rpcinterface_fac...
I am working with supervisord and I am facing issues in automatic restart of supervisord programs.
##
supervisord.conf
[supervisord]
logfile=/dev/null
pidfile=/tmp/supervisord.pid
nodaemon=true
[unix_http_server]
file = /tmp/supervisor.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[program:worker]
command=./manage.py rq worker %(ENV_QUEUES)s
process_name=%(program_name)s-%(process_num)s
numprocs=%(ENV_WORKERS_COUNT)s
directory=/app
stopsignal=TERM
autostart=true
autorestart=true
startsecs=300
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[eventlistener:worker_healthcheck]
autorestart=true
serverurl=AUTO
command=./manage.py rq healthcheck
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
events=TICK_60
## Supervisorctl Status
abc@abc-adhocworker-c89d9667b-9lqbd:/app$ exec supervisorctl -c worker.conf status
worker:worker-0 FATAL Exited too quickly (process log may have details)
worker:worker-1 FATAL Exited too quickly (process log may have details)
worker_healthcheck RUNNING pid 14, uptime 7:43:34
Status shows they are in fatal state but not recovering automatically even I've configured autorestart=true
.
## What else do i need to make sure automatic recovery/restart of programs in case of errors ?
Is it possible that restart is relying on healthcheck eventlistener
and it might be sending false signal i.e. everything is good and thus automatic restart not working for programs ?
My supervisord.conf doesn't have supervisorctl section so not sure if it is added then it can trigger auto restart correctly as without that supervisorctl status
might be failing for supervisord programs ?
SRJ
(111 rep)
Feb 3, 2023, 01:02 AM
0
votes
1
answers
262
views
Spawn workers to use up nearly all available CPU
Say I have a CLI app that I want to do some work (e.g. process some media files). When I run one instance of the app it takes say 20% CPU. The rest 80% is idle. I want some sort of process manager that will run as many app instances as it takes to use nearly all the CPU up. The app knows what to do...
Say I have a CLI app that I want to do some work (e.g. process some media files). When I run one instance of the app it takes say 20% CPU. The rest 80% is idle.
I want some sort of process manager that will run as many app instances as it takes to use nearly all the CPU up. The app knows what to do and how not to interfere with its siblings, but it can't spawn/manage itself.
Is there any manager like that? I've been using supervisor to run fixed sets of different apps one instance each, but I don't know if it can be used to run variable amount of instances of the same app depending on CPU availability.
Greendrake
(459 rep)
Jul 5, 2022, 01:37 PM
• Last activity: Jul 5, 2022, 03:50 PM
47
votes
6
answers
69660
views
ubuntu server 16.04: cannot get supervisor to start automatically
I installed supervisor on ubuntu server 16.04. $ sudo apt-get install supervisor $ sudo update-rc.d supervisor defaults After rebooting, supervisor didn't get started automatically. Checked the status: qinking126@nas:~$ sudo service supervisor status [sudo] password for qinking126: ● supervisor.serv...
I installed supervisor on ubuntu server 16.04.
$ sudo apt-get install supervisor
$ sudo update-rc.d supervisor defaults
After rebooting, supervisor didn't get started automatically. Checked the status:
qinking126@nas:~$ sudo service supervisor status
[sudo] password for qinking126:
● supervisor.service - Supervisor process control system for UNIX
Loaded: loaded (/lib/systemd/system/supervisor.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: http://supervisord.org
I'm not sure why it's inactive (dead). What do I need to check to get it fixed?
qinking126
(581 rep)
May 8, 2016, 12:04 AM
• Last activity: Mar 24, 2022, 01:27 PM
2
votes
1
answers
358
views
Why is Supervisord configured to exec/run in the tmp folder by default?
I've got a question regarding supervisord. After running echo_supervisord_conf, I noticed that the directory it runs in is configured as /tmp by default. Why is this the case? Is it because the /tmp folder can be written to by any of the users on the system, or does supervisord put files there becau...
I've got a question regarding supervisord. After running echo_supervisord_conf, I noticed that the directory it runs in is configured as /tmp by default. Why is this the case? Is it because the /tmp folder can be written to by any of the users on the system, or does supervisord put files there because they need to be treated appropratly as temporary?
The reason I'm asking is because we've got an application running on a redhat box, and it seems like redhat automatically clears certain files out of the /tmp folder. This seems to be crashing our supervisord and our application from time to time. So I want to know why supervisord puts files in that folder and then determine if it appropriate to have it put them somewhere else.
Any help would be greatly appreciated!
T_R_O_N
(23 rep)
Mar 4, 2022, 02:36 PM
• Last activity: Mar 4, 2022, 03:45 PM
0
votes
2
answers
2575
views
How to allow `www-data` to call `supervisorctl status`?
I have a PHP script that calls `exec('supervisorctl status 2>&1', $output);`, which runs as `www-data` user (through Apache). However this user does not have access to this command. I would like to allow permissions for `www-data` only for this exact `supervisorctl status` command. It outputs the ru...
I have a PHP script that calls
exec('supervisorctl status 2>&1', $output);
, which runs as www-data
user (through Apache).
However this user does not have access to this command. I would like to allow permissions for www-data
only for this exact supervisorctl status
command. It outputs the running supervisor processes very nicely and I'd like to show that in my webinterface.
# Running supervisorctl status
under any user except root:
$ supervisorctl status
error: , [Errno 13] Permission denied: file: /usr/lib/python2.7/socket.py line: 228
I've tried adding this part to the /etc/sudoers
file (using visudo
) but it results in the same error (I possibly need more permissions since the error refers to python?) :
# /etc/sudoers
Cmnd_Alias SUPERVISOR_STATUS = /usr/bin/supervisorctl status
www-data ALL=(ALL) NOPASSWD: SUPERVISOR_STATUS
Flame
(111 rep)
Jul 16, 2020, 07:05 PM
• Last activity: Jul 21, 2021, 09:44 PM
1
votes
2
answers
274
views
Restart a process if a message is detected on stdout
Is there a way of monitoring a process (like for example with supervisord), and then restarting the process if the stdout outputs a specific line of text? In my case the line to check for would be: Net Exception [in file "src/ErrorHandler.cpp", line 38] If this line is put out on stdout, I would lik...
Is there a way of monitoring a process (like for example with supervisord), and then restarting the process if the stdout outputs a specific line of text?
In my case the line to check for would be:
Net Exception [in file "src/ErrorHandler.cpp", line 38]
If this line is put out on stdout, I would like the process to restart.
Any help would be greatly appreciated.
Armand Jordaan
(111 rep)
Feb 22, 2021, 04:03 PM
• Last activity: Feb 23, 2021, 10:24 PM
3
votes
2
answers
6992
views
How to make sure that a child process of a supervisor job dies when I kill supervisor
My app is a jar file that requires some environment variables. I have all the environment variables in one file, which looks like this: export VAR=value export VAR2=value2 #....etc My supervisor config file looks like this: [program:programname] command=bash -c "source /path/to/env/file && java -jar...
My app is a jar file that requires some environment variables. I have all the environment variables in one file, which looks like this:
export VAR=value
export VAR2=value2
#....etc
My supervisor config file looks like this:
[program:programname]
command=bash -c "source /path/to/env/file && java -jar /path/to/jar.jar"
ps -ef | grep programname
shows two processes on two separate lines: one is bash -c "source blah && java blah"
and the other one is just java blah
.
Now, here's the problem: whether I do supervisorctl stop programname
or service supervisor stop
or even kill -9 whatever the supervisor pid is
, the first process dies, but the regular java process stays and becomes orphaned, with parent pid now 1. How do I make the jar die without manually killing it?
snetch
(187 rep)
Jun 3, 2016, 02:44 PM
• Last activity: Nov 19, 2020, 03:58 AM
23
votes
2
answers
14348
views
Have SystemD spawn N processes?
At my organization, we have a number of queue consuming worker processes. We're currently using SupervisorD to manage them, but would like to use SystemD if possible for certain advantages therein. I'm fairly experienced with writing custom units, but I don't immediately have an analog in SystemD la...
At my organization, we have a number of queue consuming worker processes. We're currently using SupervisorD to manage them, but would like to use SystemD if possible for certain advantages therein. I'm fairly experienced with writing custom units, but I don't immediately have an analog in SystemD land for this.
In the [SupervisorD documentation](http://supervisord.org/configuration.html#program-x-section-settings) a parameter called
numprocs
is detailed which allows one to set the number of processes they'd like to be started with the service. If I want 30 processes started, it's a one-line change.
Is there a setting in SystemD units that will allow me to specify how many of these processes I'd like started?
Naftuli Kay
(41346 rep)
Jun 7, 2016, 06:13 PM
• Last activity: Oct 12, 2020, 05:24 PM
0
votes
1
answers
560
views
supervisord unable to start jenkins service
i have created a Dockerimage which is using supervisord to start multiple services, 2 of them are working but the 3rd jenkins service start and then gets killed on its own. supervisord ubuntu@kops:~/cluster/gui$ cat supervisord.conf [supervisord] nodaemon=true [program:sshd] command=/usr/sbin/sshd -...
i have created a Dockerimage which is using supervisord to start multiple services, 2 of them are working but the 3rd jenkins service start and then gets killed on its own.
supervisord
ubuntu@kops:~/cluster/gui$ cat supervisord.conf
[supervisord]
nodaemon=true
[program:sshd]
command=/usr/sbin/sshd -D
[program:jenkins]
command=/usr/bin/java -jar /usr/share/jenkins/jenkins.war
autostart=true
[program:vnc]
command=/usr/bin/vncserver :1 -geometry 1280x800 -depth 24 && tail -f /root/.vnc/*:1.log
autostart=true
Inside docker container, when i manually start jenkins service,
*************************************************************
*************************************************************
*************************************************************
Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:
aa9c8e22a95c4fcd8a7966983b6ff065
This may also be found at: /root/.jenkins/secrets/initialAdminPassword
*************************************************************
*************************************************************
*************************************************************
Killed
Mohammed Ali
(691 rep)
Mar 7, 2018, 05:28 AM
• Last activity: Jul 14, 2020, 11:35 AM
3
votes
1
answers
5584
views
Run supervisord without root access
Hi I'm really new to writing scripts and I searched a lot but all that I've found is scripts with full access. I don't have access to the /etc. I'm working in a host in the cloud but I have limited access this is why all my attempts were unsuccessful. So far I have this: #!/bin/sh prog="supervisord"...
Hi I'm really new to writing scripts and I searched a lot but all that I've found is scripts with full access. I don't have access to the /etc. I'm working in a host in the cloud but I have limited access this is why all my attempts were unsuccessful.
So far I have this:
#!/bin/sh
prog="supervisord"
prefix="/usr/local/"
exec_prefix="${prefix}"
prog_bin="${exec_prefix}/bin/supervisord -c /home/user/supervisor/supervisord.conf"
PIDFILE="/var/run/$prog.pid"
start()
{
echo -n $"Starting $prog: "
daemon $prog_bin --pidfile $PIDFILE
[ -f $PIDFILE ] && success $"$prog startup" || failure $"$prog startup"
echo
}
stop()
{
echo -n $"Shutting down $prog: "
[ -f $PIDFILE ] && killproc $prog || success $"$prog shutdown"
echo
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status $prog
;;
restart)
stop
start
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
;;
esac
But I always get this error:
Starting supervisord: script.sh: 27: script.sh: daemon: not found
script.sh: 28: script.sh: failure: not found
Please help I have no idea what is going on ...
ocespedes
May 5, 2014, 08:35 PM
• Last activity: Dec 27, 2019, 05:01 AM
2
votes
1
answers
1848
views
Changing user for supervisor - error CRIT Set uid to user
I changed user for supervisor from root to non-root called dev. All is good, supervisor is running as dev: ``` me@server$ ps aux | grep supervisor dev 25230 0.2 1.0 60404 21392 ? Ss 21:42 0:00 /usr/bin/python /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf ``` ...but logs shows this mess...
I changed user for supervisor from root to non-root called dev.
All is good, supervisor is running as dev:
me@server$ ps aux | grep supervisor
dev 25230 0.2 1.0 60404 21392 ? Ss 21:42 0:00 /usr/bin/python /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf
...but logs shows this message:
Nov 15 21:45:00 server supervisord: 2019-11-15 21:45:00,880 CRIT Set uid to user 1003
This is uid for user dev:
me@server$ id dev
uid=1003(dev) gid=1000(ww) groups=1000(ww)
What does it mean? How should I change uid when user with this uid is already running supervisor?
Brzozova
(144 rep)
Nov 15, 2019, 09:15 PM
• Last activity: Nov 15, 2019, 10:06 PM
0
votes
1
answers
85
views
When restarting Ubuntu quit supervisor sooner than other services
I have supervisor that is handling a queue process that is dependent on Redis being available. When I restart the server (Ubuntu 18.04) the Redis server is quitting before Supervisor and the queue process spams me with hundreds of errors in Slack because of the missing Redis server. I need to set Su...
I have supervisor that is handling a queue process that is dependent on Redis being available.
When I restart the server (Ubuntu 18.04) the Redis server is quitting before Supervisor and the queue process spams me with hundreds of errors in Slack because of the missing Redis server.
I need to set Supervisor quit before the other services that are used in the subprocesses of Supervisor so I do not get all these errors. I know it should be in the systemd but haven't done it so far and couldn't find a good way to find it in Google.
Ivan Dokov
(205 rep)
Oct 31, 2019, 02:47 PM
• Last activity: Oct 31, 2019, 03:27 PM
2
votes
0
answers
339
views
Ubuntu Supervisor command expansion in bash
I need to run a command via `supervisor` (bash on Ubuntu 18.04) that launches a parallel process with a number of cores equals to a fraction of the machine cores. From the command line I can successfully run mpiexec -np $(($(nproc)/2)) pvserver --mesa --force-offscreen-rendering This works as expect...
I need to run a command via
supervisor
(bash on Ubuntu 18.04) that launches a parallel process with a number of cores equals to a fraction of the machine cores.
From the command line I can successfully run
mpiexec -np $(($(nproc)/2)) pvserver --mesa --force-offscreen-rendering
This works as expected. I then try to add the same command (with absolute paths) in the supervisor config file
cmd=mpiexec -np $(($(nproc)/2)) pvserver --mesa --force-offscreen-rendering
but I receive the error
[mpiexec@ip-172-31-16-210] HYD_pmcd_pmi_alloc_pg_scratch (pm/pmiserv/pmiserv_utils.c:527): assert (pg->pg_process_count * sizeof(struct HYD_pmcd_pmi_ecount)) failed
[mpiexec@ip-172-31-16-210] HYD_pmci_launch_procs (pm/pmiserv/pmiserv_pmci.c:108): error allocating pg scratch space
[mpiexec@ip-172-31-16-210] main (ui/mpich/mpiexec.c:340): process manager returned error launching processes
It seems that mpiexec
is receiving the wrong argument. It goes without saying that everything works if I hardcode the np argument.
I have also tried with xargs, but its syntax is not very clear to me. This is what I tried
echo $(($(nproc)/2)) | xargs mpiexec -np {} pvserver --mesa --force-offscreen-rendering
but I cannot get this to work even from the command line.
Any suggestion?
Rojj
(213 rep)
Oct 27, 2019, 09:12 AM
Showing page 1 of 20 total questions