sudo supervisorctl status
sudo supervisorctl tail -f gunicorn
Kegbot: celery RUNNING pid 1192
Kegbot:gunicorn RUNNING pid 1193
sudo supervisorctl tail -f gunicorn
error: <class 'socket.error;>, [Errno 13] Permission Denied: file: /usr/lib/python2.7/socket.py line: 224
After restarting the server those same commands give:
kegbot@kegbot-server:~$ sudo supervisorctl status
kegbot:celery RUNNING pid 1146, uptime 0:02:43
kegbot:gunicorn FATAL Exited too quickly (process log may have details)
kegbot@kegbot-server:~$ sudo supervisorctl tail -f gunicorn
==> Press Ctrl-C to exit <==
unix:///var/run/supervisor.sock/logtail/gunicorn/stdout Cannot read, status code 404
kegbot@kegbot-server:~$
I’m also getting the “Server Error (500)” when I try to open the Keg Room page after updating. I checked version number and it says 1.2.1.
I don’t really know where to go from here.
Please try adjusting your supervisor.conf to match the command
shown here: https://github.com/Kegbot/kegbot-server/blob/master/deploy/kegbot-supervisor.conf
After editing, sudo superisorctl reload
(or simply restart).
Do you mean this file: /etc/supervisor/conf.d/kegbot.conf
If so, I edited per the instructions but still get the 502 error (I did the reload first then restarted the entire server).
Here is how the file looks now:
Supervisor.conf for Kegbot – Kegberry edition.
[group:kegbot]
programs=gunicorn,celery
[program:gunicorn]
command=/data/kegbot/kb/bin/gunicorn pykeg.web.wsgi:application -w 3
settings=pykeg.settings --timeout=120 -w 2’
directory=/home/kegbot
autostart=true
autorestart=true
redirect_stderr=true
startsecs=30
[program:celery]
command=/data/kegbot/kb/bin/kegbot run_workers
directory=/home/kegbot
autostart=true
autorestart=true
redirect_stderr=true
startsecs=40
After making those changes I now get:
sudo supervisorctl status
[sudo] password for kegbot:
kegbot:celery FATAL can’t find command '/data/kegbot/kb/bin/kegbot’
kegbot:gunicorn FATAL can’t find command '/data/kegbot/kb/bin/gunicorn’
kegbot@kegbot-server:~$ sudo supervisorctl tail -f gunicorn
==> Press Ctrl-C to exit <==
unix:///var/run/supervisor.sock/logtail/gunicorn/stdout Cannot read, status code 404
I changed the file again to match the installation path and have this:
[group:kegbot]
programs=gunicorn,celery
[program:gunicorn]
command=/home/kegbot/kegbot-server.venv/bin/gunicorn pykeg.web.wsgi:application -w 3
settings=pykeg.settings --timeout=120 -w 2’
directory=/home/kegbot
autostart=true
autorestart=true
redirect_stderr=true
startsecs=30
[program:celery]
command=/home/kegbot/kegbot-server.venv/bin/kegbot run_workers
directory=/home/kegbot
autostart=true
autorestart=true
redirect_stderr=true
startsecs=40
Now the browser sits for ages then eventually gives a 504 Gateway Time-Out error.
The commands you told me to run earlier now give this output:
sudo supervisorctl status
[sudo] password for kegbot:
kegbot:celery FATAL Exited too quickly (process log may have details)
kegbot:gunicorn RUNNING pid 1182, uptime 0:04:30
kegbot@kegbot-server:~$ sudo supervisorctl tail -f gunicorn
==> Press Ctrl-C to exit <==
unix:///var/run/supervisor.sock/logtail/gunicorn/stdout Cannot read, status code 404
I just tried leaving the Celery command as it was originally and updating only the gunicorn command in the conf file.
command=/home/kegbot/kegbot-server.venv/bin/gunicorn pykeg.web.wsgi:application -w 3
Now when testing both celery & gunicorn show as running however the 2nd command still gives: unix:///var/run/supervisor.sock/logtail/gunicorn/stdout Cannot read, status code 404 and the browser shows a 504 time-out.
Incase it helps - I just tried installing 1.2.0a5 and it does exactly the same thing as 1.2.1 in terms of getting the errors.
1.1.1 works but neither upgrade from there does even when they say both celery and gunicorn are running.
I couldn’t get it working, but then again I don’t know Linux well enough to troubleshoot without help from this forum so it may be that theres an easy fix. For now I reverted back to v1.1.1 as it works perfectly and after 3 attempts at upgrading to 1.2.1 I had to give up until Mike or someone is able to help as my system was unusable after the update.
Markarmer:
I was able to get mine working by modifying my kegbot.conf to:
root@my-kegbot:~# nano /etc/supervisor/conf.d/kegbot.conf
[group:kegbot]
programs=gunicorn,workers
[program:gunicorn]
command=/home/kegbot/kegbot-server.venv/bin/gunicorn pykeg.web.wsgi:application$
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
sudo service supervisor restart
Hope that helps. Thanks Mike, looks great. I’ve been running off a raspberryPi without much success, switched over to Digital Ocean and love it.
Thank You very much kmz850 - I copied & Pasted your code in place of mine for the kegbot.conf file and when I run
sudo supervisorctl status
it says both gunicorn and workers are running
When I run:
sudo supervisorctl tail -f gunicorn
I’m still getting the error: unix:///var/run/supervisor.sock/logtail/gunicorn/stdout Cannot read, status code 404
In a browser I continue to get the 504 Gateway Timeout Error
Back to 1.1.1 I go - Mike do you have any other suggestions?
fwiw I created a new droplet to test the upgrade (side bar: why doesn’t a fresh install install the new version?) but I had the same 502 issue and it was fix by making the edit from github. Also I recomend using filezilla for file transfers to you digital ocean server, so much easier than the command line tranfers. ill post how the restore goes.
i try to restore from back up and after I erase I run
kegbot restore josh-whites-kegbot-20141204-050945-5e411714cb853562a27ede7ea93655a40d1843a4.zip
and get
2014-12-04 07:30:49,727 INFO (pykeg.backup.backup) Restoring from josh-whites-kegbot-20141204-050945-5e411714cb853562a27ede7ea93655a40d1843a4.zip …
2014-12-04 07:30:49,939 INFO (pykeg.backup.backup) Restoring from /tmp/tmpq599wI/josh-whites-kegbot-20141204-050945 …
2014-12-04 07:30:49,941 INFO (pykeg.backup.mysql) command: mysql --batch --user=root kegbot -e 'show tables like “core_kegbotsite”;'
2014-12-04 07:30:49,950 INFO (pykeg.backup.mysql) result:
Error: Unsupported backup format: 1
wtf? is it a problem from trying to restore from a back that was made on a different server version?
I also get the same error when I run it from an uzipped directory:
kegbot restore josh-whites-kegbot-20141204-050945
both commands are run from the virtual environment fyi