Upgrading from BDA 2.6/CDH 4.7 to BDA 4.0/CDH 5.1.2 Logging into Hue as Non-Superuser Raises Server Error(500) (Doc ID 1964479.1)

Last updated on JANUARY 26, 2015

Applies to:

Big Data Appliance Integrated Software - Version 2.6.0 to 4.0 [Release 2.6 to 4.0]
Linux x86-64

Symptoms

 
After upgrade from BDA 2.6/CDH 4.7 to BDA 4.0/CDH 5.1.2 logging into Hue as anything but the superuser raises:

Server Error (500)

Sorry, there's been an error. An email was sent to your administrators. Thank you for your patience.


Checking the "More Info" shows:

File Name Line Number Function Name
/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/handlers/base.py 111 get_response
/usr/lib/hue/desktop/core/src/desktop/views.py 289 index
/usr/lib/hue/desktop/core/src/desktop/views.py 56 home
/usr/lib/hue/desktop/core/src/desktop/api.py 37 _get_docs
/usr/lib/hue/desktop/core/src/desktop/models.py 88 get_history_tag
/usr/lib/hue/desktop/core/src/desktop/models.py 71 _get_tag
/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/models/manager.py 134 get_or_create
/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/models/query.py 445 get_or_create
/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/models/query.py 361 get
/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/models/query.py 85 __len__
/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/models/query.py 291 iterator
/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/models/sql/compiler.py 763 results_iter
/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/models/sql/compiler.py 818 execute_sql
/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/backends/mysql/base.py 114 execute
/usr/lib/hue/build/env/lib/python2.6/site-packages/MySQL_python-1.2.3c1-py2.6-linux-x86_64.egg/MySQLdb/cursors.py 173 execute
/usr/lib/hue/build/env/lib/python2.6/site-packages/MySQL_python-1.2.3c1-py2.6-linux-x86_64.egg/MySQLdb/connections.py 36 defaulterrorhandler


Additional Symptoms:

1. Checking the Hue tables in MySQL shows that 6 Hue tables are missing in the upgrade BDA V4.0 environment as compared with:
a) What is present in a new CDH 5.3/BDA 4.1 install.
b) What is present in a new CDH 5.1.0/BDA 3.1 install.

They missing tables are:

documentpermission_groups
documentpermission_users
desktop_document
desktop_document_tags
desktop_documentpermission
desktop_documenttag



2. It is not possible to sync the Hue database in CM although the upgrade completed successfully. (In CM stop Hue, Actions > Synchronize Database)
The stderr.out reports:

+ run_syncdb_and_migrate_subcommands
+ /usr/lib/hue/build/env/bin/hue syncdb --noinput
+ '[' 5 -ge 5 ']'
+ /usr/lib/hue/build/env/bin/hue migrate
Traceback (most recent call last):
  File "/usr/lib/hue/build/env/bin/hue", line 9, in <module>
    load_entry_point('desktop==3.6.0', 'console_scripts', 'hue')()
  File "/usr/lib/hue/desktop/core/src/desktop/manage_entry.py", line 60, in entry
    execute_manager(settings)
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/management/__init__.py", line 459, in execute_manager
    utility.execute()
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/management/base.py", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/management/base.py", line 232, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/South-0.8.2-py2.6.egg/south/management/commands/migrate.py", line 111, in handle
    ignore_ghosts = ignore_ghosts,
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/South-0.8.2-py2.6.egg/south/migration/__init__.py", line 200, in migrate_app
    applied_all = check_migration_histories(applied_all, delete_ghosts, ignore_ghosts)
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/South-0.8.2-py2.6.egg/south/migration/__init__.py", line 95, in check_migration_histories
    raise exceptions.GhostMigrations(ghosts)
south.exceptions.GhostMigrations:

 ! These migrations are in the database but not on disk:
    <oozie: 0022_change_examples_path_format>
 ! I'm not trusting myself; either fix this yourself by fiddling
 ! with the south_migrationhistory table, or pass --delete-ghost-migrations
 ! to South to have it delete ALL of these records (this may not be good).
 


3. From mysql, the output from "select * from south_migrationhistory" reports the oozie 0022_change_examples_path_format in the middle of the list:

Changes

Upgrade from BDA 2.6/CDH 4.7 to BDA 4.0/CDH 5.1.2

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms