Upgraded tablet app, now not working

Hey guys been a while.

I was playing around on my tablet and noticed that there was a updated kegbot app. I was previously running build 55 and see that it was at 83.Everything worked great before I upgraded the tablet app, but me being me, I jumped on the upgrade before reading anything. I seem to always want the latest and greatest. its a curse I know…

I upgraded to the new app and tried to run the set-up wizard
I input my server IP address and it goes to the next screen and asks for user name/psw.
when I input my user name and password, hit next, this error pops up

Error logging in: org.codehaus.jackson.JsonParseException: Unexpexted character (’<’(code60)):expected a valid value (number,String,array,object,‘true’,‘false’ or 'nul) at [source:buffer([email protected]).inputStream();line: 2, column: 2]

also when I am at the “new controller connected screen”, I select the number of meters I have (1), hit “Add Controller” I get

New Controller connected
error creating controller (org.codehaus.jacks

I suspect this error is from not being connected to the server.

I thought maybe my kegbot server just needed to be upgraded to work with the new android app. (It took me days getting the kegbot server working over a year ago in the first place. Not at all good at Linux), so I tried to follow the directions in the documentation for the upgrade.

I stepped in to my virtualenv (which took me a bit to remember how to do this)

(kb) $ pip install --upgrade kegbot

but I get the following

Cannot fetch indexbase url https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement kegbot in the /usr/local/lib/python2.7.dist-packages
downloading/unpacking kegbot
cleaningup…
No distributions at all found for kegbot in /usr/local/lib/python2.7.dist-packages
Storing complete log in /home/kegbotserver/.pip/pip.log

I’m at a loss…

not sure at this point if it is a server issue or a app issue. I suspect I need to update my server but not sure why its not updating.

Any help is highly appreciated!

Thanks in advance!

update:

further reading indicates that, yes, I need to update the server for the updated app

I managed to update the server. I rebooted , and tried a few more times and it seemed to update. after the update I ran “kegbot upgrade”

I started the server and seems to start.

validating models…

0 errors found
October 19, 2014 - 02:28:45
Django version 1.6.6, using settings 'pykeg.settings’
starting devolpment server at http://0.0.0.0:8000
Quit the server with CONTROL-C.

now when I open up a webpage to connect to the webserver I ger a error on the webpage as well as this line pops up on the terminal window

[19/Oct/2014 02:31:29] “GET / HTTP/1.1” 500 15931

and the following on the webpage

OperationalError at /
no such column: core_kegbotsite.server_version
Request Method: GET
Request URL: http://192.168.1.86:8000/
Django Version: 1.6.6
Exception Type: OperationalError
Exception Value:
no such column: core_kegbotsite.server_version
Exception Location: /usr/local/lib/python2.7/dist-packages/django/db/backends/sqlite3/base.py in execute, line 452
Python Executable: /usr/bin/python
Python Version: 2.7.5
Python Path:
[’/usr/local/bin’,
’/usr/lib/python2.7’,
’/usr/lib/python2.7/plat-i386-linux-gnu’,
’/usr/lib/python2.7/lib-tk’,
’/usr/lib/python2.7/lib-old’,
’/usr/lib/python2.7/lib-dynload’,
’/usr/local/lib/python2.7/dist-packages’,
’/usr/local/lib/python2.7/dist-packages/PIL’,
’/usr/lib/python2.7/dist-packages’,
’/usr/lib/python2.7/dist-packages/gtk-2.0’,
’/usr/lib/python2.7/dist-packages/ubuntu-sso-client’,
’/usr/lib/python2.7/dist-packages/ubuntuone-client’,
’/usr/lib/python2.7/dist-packages/ubuntuone-control-panel’,
’/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol’,
’/home/kegbotserver/.kegbot’,
’/etc/kegbot’,
’/usr/local/etc/kegbot’]
Server time: Sun, 19 Oct 2014 02:31:29 +0000

What’s the output from kegbot upgrade?

Thanks Mike for the quick reply.

Here is the output from Kegbot upgrade (although I can’t remember if this is the same from the first time.

Traceback (most recent call last):
File “/usr/local/bin/kegbot”, line 39, in
management.execute_from_command_line()
File “/usr/local/lib/python2.7/dist-packages/django/core/management/init.py”, line 399, in execute_from_command_line
utility.execute()
File “/usr/local/lib/python2.7/dist-packages/django/core/management/init.py”, line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “/usr/local/lib/python2.7/dist-packages/django/core/management/base.py”, line 242, in run_from_argv
self.execute(*args, **options.dict)
File “/usr/local/lib/python2.7/dist-packages/django/core/management/base.py”, line 285, in execute
output = self.handle(*args, **options)
File “/usr/local/lib/python2.7/dist-packages/pykeg/core/management/commands/upgrade.py”, line 61, in handle
installed_version = models.KegbotSite.get_installed_version()
File “/usr/local/lib/python2.7/dist-packages/pykeg/core/models.py”, line 283, in get_installed_version
if not rows:
File “/usr/local/lib/python2.7/dist-packages/django/db/models/query.py”, line 100, in nonzero
self._fetch_all()
File “/usr/local/lib/python2.7/dist-packages/django/db/models/query.py”, line 857, in _fetch_all
self._result_cache = list(self.iterator())
File “/usr/local/lib/python2.7/dist-packages/django/db/models/query.py”, line 946, in iterator
for row in self.query.get_compiler(self.db).results_iter():
File “/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py”, line 713, in results_iter
for rows in self.execute_sql(MULTI):
File “/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py”, line 786, in execute_sql
cursor.execute(sql, params)
File “/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py”, line 69, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File “/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py”, line 53, in execute
return self.cursor.execute(sql, params)
File “/usr/local/lib/python2.7/dist-packages/django/db/utils.py”, line 99, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File “/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py”, line 53, in execute
return self.cursor.execute(sql, params)
File “/usr/local/lib/python2.7/dist-packages/django/db/backends/sqlite3/base.py”, line 452, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such column: core_kegbotsite.server_version

Here is a screen capture from start to finish.

*[email protected]:~$ . ~/kb/bin/activate
(kb)[email protected]:~$ sudo pip install --upgrade kegbot
[sudo] password for kegbotserver:
Requirement already up-to-date: kegbot in /usr/local/lib/python2.7/dist-packages
Requirement already up-to-date: kegbot-pyutils==0.1.7 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: kegbot-api==1.1.0 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: Django==1.6.6 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: django-imagekit==3.1 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: django-registration==1.0 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: django-socialregistration==0.5.10 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: django-bootstrap-pagination==0.1.10 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: Celery==3.1.11 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: kombu==3.0.16 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: South==0.8.4 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: django-crispy-forms==1.2.8 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: foursquare==2014.04.10 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: gunicorn==18.0 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: MySQL-python==1.2.5 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: pillow==2.4.0 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: protobuf==2.5.0 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: python-gflags==2.0 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: django-redis==3.6.1 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: pytz==2014.2 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: redis==2.9.1 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: requests==2.2.1 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: tweepy==2.2 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: jsonfield==0.9.20 in /usr/local/lib/python2.7/dist-packages (from kegbot)
Requirement already up-to-date: isodate==0.4.9 in /usr/local/lib/python2.7/dist-packages (from kegbot-pyutils==0.1.7->kegbot)
Requirement already up-to-date: django-appconf>=0.5 in /usr/local/lib/python2.7/dist-packages (from django-imagekit==3.1->kegbot)
Requirement already up-to-date: pilkit>=0.2.0 in /usr/local/lib/python2.7/dist-packages (from django-imagekit==3.1->kegbot)
Requirement already up-to-date: oauth2 in /usr/local/lib/python2.7/dist-packages (from django-socialregistration==0.5.10->kegbot)
Requirement already up-to-date: python-openid in /usr/local/lib/python2.7/dist-packages (from django-socialregistration==0.5.10->kegbot)
Requirement already up-to-date: mock in /usr/local/lib/python2.7/dist-packages (from django-socialregistration==0.5.10->kegbot)
Requirement already up-to-date: billiard>=3.3.0.17,<3.4 in /usr/local/lib/python2.7/dist-packages (from Celery==3.1.11->kegbot)
Requirement already up-to-date: anyjson>=0.3.3 in /usr/local/lib/python2.7/dist-packages (from kombu==3.0.16->kegbot)
Downloading/unpacking amqp>=1.4.5,<2.0 (from kombu==3.0.16->kegbot)
Downloading amqp-1.4.6.tar.gz (77kB): 77kB downloaded
Running setup.py egg_info for package amqp

Downloading/unpacking setuptools from https://pypi.python.org/packages/source/s/setuptools/setuptools-7.0.tar.gz#md5=6245d6752e2ef803c365f560f7f2f940 (from protobuf==2.5.0->kegbot)
Downloading setuptools-7.0.tar.gz (793kB): 793kB downloaded
Running setup.py egg_info for package setuptools

Requirement already up-to-date: six in /usr/local/lib/python2.7/dist-packages (from django-appconf>=0.5->django-imagekit==3.1->kegbot)
Requirement already up-to-date: httplib2 in /usr/local/lib/python2.7/dist-packages (from oauth2->django-socialregistration==0.5.10->kegbot)
Installing collected packages: amqp, setuptools
Found existing installation: amqp 1.4.3
Can’t uninstall ‘amqp’. No files were found to uninstall.
Running setup.py install for amqp

Found existing installation: setuptools 2.2
Can’t uninstall ‘setuptools’. No files were found to uninstall.
Running setup.py install for setuptools

Installing easy_install script to /usr/local/bin
Installing easy_install-2.7 script to /usr/local/bin

Successfully installed amqp setuptools
Cleaning up…
(kb)[email protected]:~$ sudo kegbot upgrade
Traceback (most recent call last):
File “/usr/local/bin/kegbot”, line 39, in
management.execute_from_command_line()
File “/usr/local/lib/python2.7/dist-packages/django/core/management/init.py”, line 399, in execute_from_command_line
utility.execute()
File “/usr/local/lib/python2.7/dist-packages/django/core/management/init.py”, line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “/usr/local/lib/python2.7/dist-packages/django/core/management/base.py”, line 242, in run_from_argv
self.execute(*args, **options.dict)
File “/usr/local/lib/python2.7/dist-packages/django/core/management/base.py”, line 285, in execute
output = self.handle(*args, *options)
File “/usr/local/lib/python2.7/dist-packages/pykeg/core/management/commands/upgrade.py”, line 61, in handle
installed_version = models.KegbotSite.get_installed_version()
File “/usr/local/lib/python2.7/dist-packages/pykeg/core/models.py”, line 283, in get_installed_version
if not rows:
File “/usr/local/lib/python2.7/dist-packages/django/db/models/query.py”, line 100, in nonzero
self._fetch_all()
File “/usr/local/lib/python2.7/dist-packages/django/db/models/query.py”, line 857, in _fetch_all
self._result_cache = list(self.iterator())
File “/usr/local/lib/python2.7/dist-packages/django/db/models/query.py”, line 946, in iterator
for row in self.query.get_compiler(self.db).results_iter():
File “/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py”, line 713, in results_iter
for rows in self.execute_sql(MULTI):
File “/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py”, line 786, in execute_sql
cursor.execute(sql, params)
File “/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py”, line 69, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File “/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py”, line 53, in execute
return self.cursor.execute(sql, params)
File “/usr/local/lib/python2.7/dist-packages/django/db/utils.py”, line 99, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File “/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py”, line 53, in execute
return self.cursor.execute(sql, params)
File “/usr/local/lib/python2.7/dist-packages/django/db/backends/sqlite3/base.py”, line 452, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such column: core_kegbotsite.server_version
(kb)[email protected]:~$

wow looks like I have missed a lot since I have first set up my kegbot last year.

I think the answer to all my problems is Keghub, what a great idea! as I am not overly concerned with my old data/stats I think this is a win for me.

You should not be using sudo with any of these commands. Have you tried that?

I did try that as per the docs, but I’m pretty sure i messed up the orginal install installing it under sudo.

Here is the output when not using sudo, looks like i get a access denied

[email protected]:~$ . ~/kb/bin/activate
(kb)[email protected]:~$ pip install --upgrade kegbot
Downloading/unpacking kegbot from https ://pypi.python.org/packages/source/k/kegbot/kegbot-1.1.0.tar.gz#md5=39e9c9ac2c97288487f9faed0a99b05f
Cleaning up…
Exception:
Traceback (most recent call last):
File “/home/kegbotserver/kb/local/lib/python2.7/site-packages/pip/basecommand.py”, line 134, in main
status = self.run(options, args)
File “/home/kegbotserver/kb/local/lib/python2.7/site-packages/pip/commands/install.py”, line 236, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File “/home/kegbotserver/kb/local/lib/python2.7/site-packages/pip/req.py”, line 1058, in prepare_files
location = req_to_install.build_location(self.build_dir, not self.is_download)
File “/home/kegbotserver/kb/local/lib/python2.7/site-packages/pip/req.py”, line 175, in build_location
_make_build_dir(build_dir)
File “/home/kegbotserver/kb/local/lib/python2.7/site-packages/pip/req.py”, line 1390, in _make_build_dir
os.makedirs(build_dir)
File “/home/kegbotserver/kb/lib/python2.7/os.py”, line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: ‘/home/kegbotserver/kb/build’

Storing complete log in /home/kegbotserver/.pip/pip.log
(kb)[email protected]:~$ kegbot upgrade
Traceback (most recent call last):
File “/home/kegbotserver/kb/bin/kegbot”, line 32, in
management.execute_from_command_line()
File “/home/kegbotserver/kb/local/lib/python2.7/site-packages/django/core/management/init.py”, line 399, in execute_from_command_line
utility.execute()
File “/home/kegbotserver/kb/local/lib/python2.7/site-packages/django/core/management/init.py”, line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “/home/kegbotserver/kb/local/lib/python2.7/site-packages/django/core/management/init.py”, line 261, in fetch_command
commands = get_commands()
File “/home/kegbotserver/kb/local/lib/python2.7/site-packages/django/core/management/init.py”, line 107, in get_commands
apps = settings.INSTALLED_APPS
File “/home/kegbotserver/kb/local/lib/python2.7/site-packages/django/conf/init.py”, line 54, in getattr
self._setup(name)
File “/home/kegbotserver/kb/local/lib/python2.7/site-packages/django/conf/init.py”, line 49, in _setup
self._wrapped = Settings(settings_module)
File “/home/kegbotserver/kb/local/lib/python2.7/site-packages/django/conf/init.py”, line 132, in init
% (self.SETTINGS_MODULE, e)
ImportError: Could not import settings ‘pykeg.settings’ (Is it on sys.path? Is there an import error in the settings file?): No module named kombu.five
(kb)[email protected]:~$

Yep, looks like a mix of owners. Try to fix it this way:

$ echo $USER
$ sudo chown -R $USER /home/kegbotserver/
$ pip freeze | grep kegbot
$ pip install -U kegbot
$ kegbot upgrade

Hey Mike, Thanks for the suggestion, unfortunately same error.

I will either have to brin the server into work and get our Linux guy to look at it for me (he got it working for me the first go around) or go with the Keghub solution.

Leaning more towards the Keghub, this looks like the ideal solution. I do have a couple questions as there does not seem to be a lot of info yet.

Is this a fully hosted solution?
Does it support authentication? (I suspect the answer is yes as it states fully functional just like the server version)
What is the storage limit? (stats, pictures, etc) Can we pay for more if needed?

So after a long and draw out repair process… Still have a problem with the ‘kegbot upgrade’ script.

  1. Initially found permission issues with group ownership of the kegbotserver home folder and its child folders (eg ~/kb/bin ) and the likes. That is now resolved. Setting the owner and group to kegbotserver:kegbotserver.

  2. Then found few missing django modules required for the current kegbot server app. Those are now resolved. Again one had a permission issue and would not delete.

  3. after a couple of system reboots. Still unable to run the kebotserver.

both the upgrade and web page show following:

File "/home/kegbotserver/kb/local/lib/python2.7/site-packages/django/db/backends/ … compiler.py, util.py, base.py
return Database.Coursor.execute(self,query,parms)
django.db.utils.OperationalError: no such column: core_kegbotsite.server_version

For the likes of me I have not found a fix to this…? maybe a database merge or upgrade issue… .missing table… however do not know how to resolve this one. Have not worked to much with this django back end standalone python web shell…

Any help much appreciated… I know my co-worker would like to find out before the keg is empty again…

Cheers, Jafo.

@jafo2128: Hmm, looks like you’re coming from an old pre-1.0 kegbot version – does that sound correct?

The upgrade tool should warn you when this happens, but maybe it is tool old. Give these steps a try: Upgrading from Old Versions.