Kegbot Server v1.2 Released


#1

Kegbot Server v1.2.1 has just been released. Get it while it’s hot!

New features include improved keg management in the Keg Room:

Sexy new keg illustrations:

… and the usual host of bugfixes and minor feature improvements. (By popular demand, you can now edit a keg after creating it; imagine that!)

Feel free to report issues here on the forum, or (even better) in the issue tracker.

cheers,
mike


#2

Awesome! You guys rock! Same upgrade procedures for those of us on digital ocean as v1.1.1?


#3

Yep, same procedure ought to do the trick!


#4

I just did the upgrade, everything was successful however now I am getting a 502 Bad Gateway (ngix/1.4.6 (Ubuntu)) error when I try to open the server web page. I restarted the entire server but still getting the 502 error.


#5

I just did the upgrade, everything was successful however now I am getting a 502 Bad Gateway (ngix/1.4.6 (Ubuntu)) error when I try to open the server web page.

Can you run kegbot version and ensure you’ve got 1.2.1 (and not 1.2.0)? If not, upgrade again.

If it isn’t that, we should check supervisor for gunicorn logs:

sudo supervisorctl status
sudo supervisorctl tail -f gunicorn

#6

kegbot version returns:
kegbot-server 1.2.1

sudo supervisorctl status
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


#7

After restarting the server those same commands give:

[email protected]:~$ sudo supervisorctl status
kegbot:celery RUNNING pid 1146, uptime 0:02:43
kegbot:gunicorn FATAL Exited too quickly (process log may have details)
[email protected]:~$ sudo supervisorctl tail -f gunicorn
==> Press Ctrl-C to exit <==
unix:///var/run/supervisor.sock/logtail/gunicorn/stdout Cannot read, status code 404
[email protected]:~$


#8

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.


#9

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).


#10

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


#11

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’
[email protected]:~$ sudo supervisorctl tail -f gunicorn
==> Press Ctrl-C to exit <==
unix:///var/run/supervisor.sock/logtail/gunicorn/stdout Cannot read, status code 404


#12

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
[email protected]:~$ sudo supervisorctl tail -f gunicorn
==> Press Ctrl-C to exit <==
unix:///var/run/supervisor.sock/logtail/gunicorn/stdout Cannot read, status code 404


#13

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.


#14

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.


#15

Should I hold off then on upgrading? Seems like people are having some issues.


#16

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.


#17

Markarmer:

I was able to get mine working by modifying my kegbot.conf to:

[email protected]:~# 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.


#18

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?


#19

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.


#20

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