Problem configuring Supervisor


#1

Running Ubuntu and followed the server install guide using all the defaults. I get figure out what the path should be for supervisor.conf.

Username is kegbot

Copy of kegbot.conf:

[group:kegbot]
programs=gunicorn,workers

[program:gunicorn]
command=/data/kb/bin/gunicorn pykeg.web.wsgi:application -w 3
directory=/data/kb
user=ubuntu
autostart=true
autorestart=true
redirect_stderr=true

[program:workers]
command=/data/kb/bin/kegbot run_workers
directory=/data/kb
stopasgroup=true
user=ubuntu
autostart=true
autorestart=true
redirect_stderr=true

Running: sudo supervisorctl start kegbot:gunicorn returns "kegbot:gunicorn: ERROR (no such process). same for kegbot:workers.

I’ve searched the forum and tried running the commands manually and simply can’t figure it out.

Any help appreciated.


#2

I’m a Linux novice which may be part of the problem.

“gunicorn pykeg.web.wsgi:application -w 3” and “kegbot run_workers” executes sucessfully form the prompt in /home/kegbot and /data/kb/bin but /home/kegbot/kegbot fails as does /data/kb/bin/kegbot. Same with gunicorn.

i cant’t locate the kegbot application so i have no clue where to point the command in kegbot.conf for Supervisor

It shouldn’t be this hard, just saying.


#3

Try making this edit

nano /etc/supervisor/conf.d/kegbot.conf

Replace what is there with this section of code minus the " at the beginning and end

"### Supervisor.conf for Kegbot – Kegberry edition.

[group:kegbot]
programs=gunicorn,workers

[program:gunicorn]
command=/home/kegbot/kegbot-server.venv/bin/gunicorn pykeg.web.wsgi:application -w 3
directory=/home/kegbot
user=kegbot
autostart=true
autorestart=true
redirect_stderr=true

[program:workers]
command=/home/kegbot/kegbot-server.venv/bin/kegbot run_workers
directory=/home/kegbot
stopasgroup=true
user=kegbot
autostart=true
autorestart=true
redirect_stderr=true"

Then reboot.


#4

Same results

[email protected]:~$ sudo supervisorctl start kegbot:gunicorn
[sudo] password for kegbot:
kegbot:gunicorn: ERROR (no such file)
[email protected]:~$ sudo supervisorctl start kegbot:workers
kegbot:workers: ERROR (no such file)
[email protected]:~$ sudo supervisorctl status
kegbot:gunicorn FATAL can’t find command '/home/kegbot/kegbot-server.venv/bin/gunicorn’
kegbot:workers FATAL can’t find command ‘/home/kegbot/kegbot-server.venv/bin/kegbot’

I think I may have mucked up the install somehow.

[email protected]:~$ whereis kegbot
kegbot: /usr/local/bin/kegbot

Changed the conf file to /usr/local/bin but get process is already running.


#5

possible that the install messed something up, you can follow the video I made in the post below on a fresh system. it was for an install on digital ocean using putty to ssh into the server. if you are running on your own physical Linux machine you can just start at the point that I start running the install script


#6

Thanks for the video. I have a VM hosted locally, will that script work outside of Digital Ocean?


#7

Just to close this out, the Digital Ocean script wouldn’t run on my locally hosted VM.

I finally got supervisor working and my kegbot is alive! Honestly not sure what finally fixed both me and a coworker worked on it.


#8

Good to know the the script runs differently on a VM. Glad you are up and running.


#9

What did you do to get supervisor working? I’m having the same issue. :frowning: