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