supervisorctl restart all ERROR (spawn error) - supervisord

I install supervisor sudo apt install supervisor
I set wesocket.conf file in "/etc/supervisor/conf.d/websocket.conf".
In there
[program:websocket]
command=/usr/bin/php /var/www/project/artisan websocket:serve
directory = /var/www/project
numprocs=1
autostart=true
autorestart=true
user=root
Then, I run the command blow
In my ssh cmd
root#localhost:/etc/supervisor/conf.d# nano websocket.conf
root#localhost:/etc/supervisor/conf.d# supervisorctl update
websocket: stopped
websocket: updated process group
root#localhost:/etc/supervisor/conf.d# supervisorctl start websocket
websocket: ERROR (already started)
root#localhost:/etc/supervisor/conf.d# supervisorctl
websocket STARTING
supervisor> exit
root#localhost:/etc/supervisor/conf.d# supervisorctl restart all
websocket: stopped
websocket: ERROR (spawn error)
root#localhost:/etc/supervisor/conf.d#
** Where is wrong **
Please tip me
Thank

Related

job for mongod.service failed because a fatal signal was delivered to the control process to dump core

I followed the steps mentioned in the link: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/ to install and start the mongodb server in CentOS 8 server. After completing the steps when i try to execute "sudo systemctl start mongod" command to start the mongodb server, I am getting the error mentioned in the below screenshot.
error on executing "sudo systemctl start mongod" command
Below is the screenshot of the stack trace when I execute "journalctl -xe".
Stack trace on "journalctl -xe"

mongoDB: child process failed, exited with 1 & 14

I have already tried it with the following thread but it didn't help me:
ERROR: child process failed, exited with error number 1,mongodb
Tried that:
sudo mongod --fork --config /etc/mongod.conf --logpath /var/log/mongodb/mongod.log
Result:
forked process: 2887
ERROR: child process failed, exited with 48
To see additional information in this output, start without the "--fork" option.
Tried the following as well:
sudo systemctl start mongod
One of the lines in the error message say:
ERROR: child process failed, exited with 14
Would appreciate any help. mongod was working pretty well until I have started trying to implement a replica set.
Use this command on the terminal:
sudo mongod --dbpath /System/Volumes/Data/data/db
It should start the MongoDB server and allocate a port for it. You can exit out of the server and then try the command again and it should work.

Supervisord (exit status 2; not expected) ubuntu

I'm trying to run Celery with Supervisord on Ubuntu, but am getting:
INFO exited: celery (exit status 2; not expected)
INFO spawned: 'celery' with pid 15517
INFO gave up: celery entered FATAL state, too many start retries too
quickly
This is the Supervisord script:
cd into the directory and activate the virtual environment
celery -A [APP_NAME].celery worker -E -l info --concurrency=2
If I run this script manually, Celery starts up without any issues. But running sudo supervisorctl start celery errors out with the error messages above.

supervisord unknown error making dispatchers for : ENOENT

The supervisord config as below, myserver is golang executable put into dir /usr/tci/bin. And it indeed existed in the dir, why I still get the ENOENT error? ENOENT means can't find the entry.
[supervisord]
nodaemon=true
loglevel=debug
[program:myserver]
command=/usr/tci/bin/myserver
autostart=true
autorestart=true
Error msg:
2018-03-05 08:39:00,230 INFO spawnerr: unknown error making
dispatchers for 'myserver': ENOENT
Make sure the directory that holds your log files exists.
Supervisor was running when I removed its log directory /var/log/supervisor.
I first noticed the issue when I tried to restart a process which resulted in
an unknown error making dispatchers for ENOENT error
I readded the directory by running:
mkdir /var/log/supervisor
This fixed the issue and allowed me to restart my process sucessfully. I would also imagine a
sudo service supervisor restart
would fix it since it might generate the missing directory.
Make sure you have logfile set then restart the server:
sudo service supervisor restart
My logging config:
loglevel=debug
logfile =/var/log/supervisor/myserver.log
`
Laravel example config:

Supervisord does not start killed processes

I have supervisord installed on my Ubuntu 10.04 and it runs a Java process continuously and supposed to heal (reload) process when it somehow dies or crashes.
On my htop I send SIGKILL, SIGTERM, SIGHUP, SIGSEGV signals to that Java process and watch /etc/logs/supervisord.log file and it says.
08:09:46,182 INFO success: myprogram entered RUNNING state,[...]
08:38:10,043 INFO exited: myprogram (exit status 0; expected)
At 08:38 I kill the process with SIGSEGV. How come it is exited with code 0 and why does not supervisord restart it at all?
All my supervisord.conf about this specific program is as follows:
[program:play-9000]
command=play run /var/www/myprogram/ --%%prod
stderr_logfile = /var/log/supervisord/myprogram-stderr.log
stdout_logfile = /var/log/supervisord/myprogram-stdout.log
Process works really fine when I launch supervisord, however does not get healed.
By the way any ideas how to start supervisord as a service so that it automatically launches when the whole system reboots?
Try setting autorestart=true. By default, autorestart is set to "unexpected" which means it will only restart a process if it exits with an unexpected exit code. By default, exit code 0 is expected.
http://supervisord.org/configuration.html#program-x-section-settings
You can use the chkconfig program to make sure that supervisor starts on reboot.
$ sudo apt-get install chkconfig
$ chkconfig -l supervisor
supervisor 0:off 1:off 2:on 3:on 4:on 5:on 6:off
You can see that it's enabled for runlevels 2-5 by default when I installed it.
$ man 7 runlevel
for more info on run levels.