Support Questions

Find answers, ask questions, and share your expertise

"Exception Value: ORA-00942: table or view does not exist" error when using Oracle19c with hue

avatar

I'm installing CDH 6.2 on rhel7 and using Oracle19C as metastore and backend db for all components wherever required. All services start normally, however when trying to login to hue, the page throws error.

 

CDH Parcel Version: CDH-6.2.0-1.cdh6.2.0.p0.967373

Oracle DB: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Oracle Client: 19.3.0.0.0

 

Tried with three cx_Oracle versions: cx_Oracle-5.2.1-py2.7 / cx_Oracle-5.3-py2.7 / cx_Oracle-7.2.0-py2.7

 



Environment: Request Method: GET Request URL: http://<URL>:8888/hue/accounts/login?next=/ Django Version: 1.11 Python Version: 2.7.5 Installed Applications: ['django.contrib.auth', 'django_openid_auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.staticfiles', 'django.contrib.admin', 'django_extensions', 'babeldjango', 'desktop', 'axes', 'about', 'beeswax', 'filebrowser', 'help', 'impala', 'jobbrowser', 'jobsub', 'metastore', 'oozie', 'pig', 'proxy', 'rdbms', 'security', 'useradmin', 'indexer', 'metadata', 'notebook', 'dashboard', 'kafka'] Installed Middleware: ['desktop.middleware.MetricsMiddleware', 'desktop.middleware.EnsureSafeMethodMiddleware', 'desktop.middleware.AuditLoggingMiddleware', 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'desktop.middleware.SpnegoMiddleware', 'desktop.middleware.HueRemoteUserMiddleware', 'django.middleware.locale.LocaleMiddleware', 'babeldjango.middleware.LocaleMiddleware', 'desktop.middleware.AjaxMiddleware', 'django.middleware.security.SecurityMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'desktop.middleware.ContentSecurityPolicyMiddleware', 'desktop.middleware.LoginAndPermissionMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'desktop.middleware.NotificationMiddleware', 'desktop.middleware.ExceptionMiddleware', 'desktop.middleware.ClusterMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.http.ConditionalGetMiddleware', 'desktop.middleware.MimeTypeJSFileFixStreamingMiddleware', 'desktop.middleware.EnsureSafeRedirectURLMiddleware', 'useradmin.middleware.LastActivityMiddleware'] Traceback: File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/core/handlers/exception.py" in inner 41. response = get_response(request) File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/core/handlers/base.py" in _legacy_get_response 249. response = self._get_response(request) File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/core/handlers/base.py" in _get_response 187. response = self.process_exception_by_middleware(e, request) File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/core/handlers/base.py" in _get_response 185. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/utils/decorators.py" in inner 185. return func(*args, **kwargs) File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/django_axes-2.2.0-py2.7.egg/axes/decorators.py" in decorated_login 267. if is_already_locked(request): File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/django_axes-2.2.0-py2.7.egg/axes/decorators.py" in is_already_locked 357. if not is_user_lockable(request): File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/django_axes-2.2.0-py2.7.egg/axes/decorators.py" in is_user_lockable 172. user = get_user_model().objects.get(**kwargs) File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/db/models/manager.py" in manager_method 85. return getattr(self.get_queryset(), name)(*args, **kwargs) File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/db/models/query.py" in get 373. num = len(clone) File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/db/models/query.py" in __len__ 232. self._fetch_all() File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/db/models/query.py" in _fetch_all 1102. self._result_cache = list(self._iterable_class(self)) File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/db/models/query.py" in __iter__ 53. results = compiler.execute_sql(chunked_fetch=self.chunked_fetch) File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/db/models/sql/compiler.py" in execute_sql 876. cursor.execute(sql, params) File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/db/backends/utils.py" in execute 65. return self.cursor.execute(sql, params) File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/db/utils.py" in __exit__ 94. six.reraise(dj_exc_type, dj_exc_value, traceback) File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/db/backends/utils.py" in execute 65. return self.cursor.execute(sql, params) File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/db/backends/oracle/base.py" in execute 481. return self.cursor.execute(query, self._param_generator(params)) Exception Type: DatabaseError at /hue/accounts/login Exception Value: ORA-00942: table or view does not exist

 Appreciate if anyone has faced similar issues and can assist.

 

Thanks.

1 ACCEPTED SOLUTION

avatar

Got it working myself.

 

Apparently because of some grant issues, hue wasn't able to create other objects in DB, hence although the service was starting, hue portal itself won't work.

 

What is strange although, is the fact that CM would report hue starting successfully. Not sure if this is the best behavior when CM is supposed to be monitoring and reporting correct health of each service it manages.

 

View solution in original post

4 REPLIES 4

avatar
Super Guru

Did you check if the Hue table have been created successfully in the database? Are you able to manuall connect to that database from the Hue host and with the credentials configured in Hue through JDBC and read from tables?

 

Note that Oracle 19c hasn't been tested or certified to work with CDH6 yet: https://www.cloudera.com/documentation/enterprise/6/release-notes/topics/rg_database_requirements.ht...

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

avatar

Hi @araujo ,

Thanks for your response.

 

Following objects have been created in the database under hue schema (which implicates not all tables got created in the database correcty):

OBJECT_NAMEOBJECT_TYPE
DJANGO_CO_APP_LABEL_76BD3D3B_UINDEX
SYS_C0013948INDEX
SYS_C0013950INDEX
DJANGO_CONTENT_TYPE_SQSEQUENCE
DJANGO_MIGRATIONS_SQSEQUENCE
DJANGO_CONTENT_TYPETABLE

DJANGO_MIGRATIONS

TABLE

 

In hue logs, I have tons of errors regarding missing tables for users etc.

 

Manual connections are working from hue host to the database using hue credentials.

 

I however noticed this in the hue startup logs which seems rather problematic (for alerts related to cm-managed env) as well as incomplete (for the last part i.e. running migrations and nothing afterwards even after CM reports that hue is successfully started):

 

CMF_CONF_DIR=
ALERT: This appears to be a CM Managed environment
ALERT: HUE_CONF_DIR must be set when running hue commands in CM Managed environment
ALERT: Please run 'hue <command> --cm-managed'
ALERT: This appears to be a CM Managed environment
ALERT: HUE_CONF_DIR must be set when running hue commands in CM Managed environment
ALERT: Please run 'hue <command> --cm-managed'
Operations to perform:
  Apply all migrations: admin, auth, axes, beeswax, contenttypes, desktop, django_openid_auth, jobsub, oozie, pig, sessions, sites, useradmin
Running migrations:

 stderror tab on CM states following:

 

[07/Aug/2019 09:08:57 +0000] 5081 MainThread redactor     INFO     Started launcher: /opt/cloudera/cm-agent/service/hue/hue.sh runcpserver
[07/Aug/2019 09:08:57 +0000] 5081 MainThread redactor     INFO     Re-exec watcher: /opt/cloudera/cm-agent/bin/cm proc_watcher 5099
[07/Aug/2019 09:08:57 +0000] 5100 MainThread redactor     INFO     Re-exec redactor: /opt/cloudera/cm-agent/bin/cm redactor --fds 3 5
[07/Aug/2019 09:08:57 +0000] 5100 MainThread redactor     INFO     Started redactor
+ date
+ date
Wed Aug  7 09:08:58 CEST 2019
++ dirname /opt/cloudera/cm-agent/service/hue/hue.sh
+ cloudera_config=/opt/cloudera/cm-agent/service/hue
++ cd /opt/cloudera/cm-agent/service/hue/../common
++ pwd
+ cloudera_config=/opt/cloudera/cm-agent/service/common
+ . /opt/cloudera/cm-agent/service/common/cloudera-config.sh
++ : /opt/cloudera/cm
++ export CLOUDERA_DIR
++ set -x
+ source_parcel_environment
+ '[' '!' -z /opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/meta/cdh_env.sh ']'
+ OLD_IFS=' 	
'
+ IFS=:
+ SCRIPT_ARRAY=($SCM_DEFINES_SCRIPTS)
+ DIRNAME_ARRAY=($PARCEL_DIRNAMES)
+ IFS=' 	
'
+ COUNT=1
++ seq 1 1
+ for i in '`seq 1 $COUNT`'
+ SCRIPT=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/meta/cdh_env.sh
+ PARCEL_DIRNAME=CDH-6.2.0-1.cdh6.2.0.p0.967373
+ . /opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/meta/cdh_env.sh
++ CDH_DIRNAME=CDH-6.2.0-1.cdh6.2.0.p0.967373
++ export CDH_HADOOP_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop
++ CDH_HADOOP_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop
++ export CDH_MR1_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop-0.20-mapreduce
++ CDH_MR1_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop-0.20-mapreduce
++ export CDH_HDFS_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop-hdfs
++ CDH_HDFS_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop-hdfs
++ export CDH_HTTPFS_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop-httpfs
++ CDH_HTTPFS_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop-httpfs
++ export CDH_MR2_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop-mapreduce
++ CDH_MR2_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop-mapreduce
++ export CDH_YARN_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop-yarn
++ CDH_YARN_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop-yarn
++ export CDH_HBASE_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hbase
++ CDH_HBASE_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hbase
++ export CDH_ZOOKEEPER_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/zookeeper
++ CDH_ZOOKEEPER_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/zookeeper
++ export CDH_HIVE_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hive
++ CDH_HIVE_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hive
++ export CDH_HUE_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue
++ CDH_HUE_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue
++ export CDH_OOZIE_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/oozie
++ CDH_OOZIE_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/oozie
++ export CDH_HUE_PLUGINS_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop
++ CDH_HUE_PLUGINS_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop
++ export CDH_FLUME_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/flume-ng
++ CDH_FLUME_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/flume-ng
++ export CDH_PIG_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/pig
++ CDH_PIG_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/pig
++ export CDH_HCAT_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hive-hcatalog
++ CDH_HCAT_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hive-hcatalog
++ export CDH_SENTRY_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/sentry
++ CDH_SENTRY_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/sentry
++ export JSVC_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/bigtop-utils
++ JSVC_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/bigtop-utils
++ export CDH_HADOOP_BIN=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop/bin/hadoop
++ CDH_HADOOP_BIN=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop/bin/hadoop
++ export CDH_IMPALA_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/impala
++ CDH_IMPALA_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/impala
++ export CDH_SOLR_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/solr
++ CDH_SOLR_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/solr
++ export CDH_HBASE_INDEXER_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hbase-solr
++ CDH_HBASE_INDEXER_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hbase-solr
++ export SEARCH_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/search
++ SEARCH_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/search
++ export CDH_SPARK_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/spark
++ CDH_SPARK_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/spark
++ export WEBHCAT_DEFAULT_XML=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/etc/hive-webhcat/conf.dist/webhcat-default.xml
++ WEBHCAT_DEFAULT_XML=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/etc/hive-webhcat/conf.dist/webhcat-default.xml
++ export CDH_KMS_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop-kms
++ CDH_KMS_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop-kms
++ export CDH_PARQUET_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/parquet
++ CDH_PARQUET_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/parquet
++ export CDH_AVRO_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/avro
++ CDH_AVRO_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/avro
++ export CDH_KAFKA_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/kafka
++ CDH_KAFKA_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/kafka
++ export CDH_KUDU_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/kudu
++ CDH_KUDU_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/kudu
+ locate_cdh_java_home
+ '[' -z '' ']'
+ '[' -z /opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/bigtop-utils ']'
+ local BIGTOP_DETECT_JAVAHOME=
+ for candidate in '"${JSVC_HOME}"' '"${JSVC_HOME}/.."' '"/usr/lib/bigtop-utils"' '"/usr/libexec"'
+ '[' -e /opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/bigtop-utils/bigtop-detect-javahome ']'
+ BIGTOP_DETECT_JAVAHOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/bigtop-utils/bigtop-detect-javahome
+ break
+ '[' -z /opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/bigtop-utils/bigtop-detect-javahome ']'
+ . /opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/bigtop-utils/bigtop-detect-javahome
++ BIGTOP_DEFAULTS_DIR=/etc/default
++ '[' -n /etc/default -a -r /etc/default/bigtop-utils ']'
++ JAVA11_HOME_CANDIDATES=('/usr/java/jdk-11' '/usr/lib/jvm/jdk-11' '/usr/lib/jvm/java-11-oracle')
++ OPENJAVA11_HOME_CANDIDATES=('/usr/lib/jvm/jdk-11' '/usr/lib64/jvm/jdk-11')
++ JAVA8_HOME_CANDIDATES=('/usr/java/jdk1.8' '/usr/java/jre1.8' '/usr/lib/jvm/j2sdk1.8-oracle' '/usr/lib/jvm/j2sdk1.8-oracle/jre' '/usr/lib/jvm/java-8-oracle')
++ OPENJAVA8_HOME_CANDIDATES=('/usr/lib/jvm/java-1.8.0-openjdk' '/usr/lib/jvm/java-8-openjdk' '/usr/lib64/jvm/java-1.8.0-openjdk' '/usr/lib64/jvm/java-8-openjdk')
++ MISCJAVA_HOME_CANDIDATES=('/Library/Java/Home' '/usr/java/default' '/usr/lib/jvm/default-java' '/usr/lib/jvm/java-openjdk' '/usr/lib/jvm/jre-openjdk')
++ case ${BIGTOP_JAVA_MAJOR} in
++ JAVA_HOME_CANDIDATES=(${JAVA8_HOME_CANDIDATES[@]} ${MISCJAVA_HOME_CANDIDATES[@]} ${OPENJAVA8_HOME_CANDIDATES[@]} ${JAVA11_HOME_CANDIDATES[@]} ${OPENJAVA11_HOME_CANDIDATES[@]})
++ '[' -z '' ']'
++ for candidate_regex in '${JAVA_HOME_CANDIDATES[@]}'
+++ ls -rvd /usr/java/jdk1.8.0_131
++ for candidate in '`ls -rvd ${candidate_regex}* 2>/dev/null`'
++ '[' -e /usr/java/jdk1.8.0_131/bin/java ']'
++ export JAVA_HOME=/usr/java/jdk1.8.0_131
++ JAVA_HOME=/usr/java/jdk1.8.0_131
++ break 2
+ get_java_major_version JAVA_MAJOR
+ '[' -z /usr/java/jdk1.8.0_131/bin/java ']'
++ /usr/java/jdk1.8.0_131/bin/java -version
+ local 'VERSION_STRING=java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)'
+ local 'RE_JAVA=[java|openjdk][[:space:]]version[[:space:]]\"1\.([0-9][0-9]*)\.?+'
+ [[ java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode) =~ [java|openjdk][[:space:]]version[[:space:]]\"1\.([0-9][0-9]*)\.?+ ]]
+ eval JAVA_MAJOR=8
++ JAVA_MAJOR=8
+ '[' 8 -lt 8 ']'
+ verify_java_home
+ '[' -z /usr/java/jdk1.8.0_131 ']'
+ echo JAVA_HOME=/usr/java/jdk1.8.0_131
+ export HUE_CONF_DIR=/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER
+ HUE_CONF_DIR=/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER
+ export HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hadoop-conf
+ HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hadoop-conf
+ '[' python27_version_check = runcpserver ']'
+ '[' -n 6 ']'
+ '[' 6 -ge 6 ']'
+ python27_version_check
+ python27_exists=0
+ python_vers=("/usr/bin" "/usr/local/python27/bin" "/opt/rh/python27/root/usr/bin")
+ for binpath in '${python_vers[@]}'
+ pybin=/usr/bin/python2.7
+ '[' '!' -e /usr/bin/python2.7 ']'
+ [[ /usr/bin == \/\o\p\t\/\r\h\/\p\y\t\h\o\n\2\7* ]]
++ run_python /usr/bin/python2.7
++ /usr/bin/python2.7 --version
++ '[' '!' 0 -eq 0 ']'
++ echo 0
+ out=0
+ '[' 0 -eq 0 ']'
+ export PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
+ PATH=/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
+ python27_exists=1
+ break
+ '[' 1 -eq 0 ']'
+ '[' -e /usr/share/oracle/instantclient/lib ']'
+ export LD_LIBRARY_PATH=/usr/share/oracle/instantclient/lib:
+ LD_LIBRARY_PATH=/usr/share/oracle/instantclient/lib:
+ add_postgres_to_pythonpath
+ grep -q '^\s*engine\s*=\s*postgres\+' hue.ini hue_safety_valve.ini hue_safety_valve_server.ini
+ '[' 6 -lt 6 ']'
+ return
+ [[ -d /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf ]]
+ export HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf
+ HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf
+ export HADOOP_MAPRED_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop-mapreduce
+ HADOOP_MAPRED_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop-mapreduce
+ [[ -d /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf ]]
+ chmod -R a+r /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf
+ export HIVE_CONF_DIR=/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hive-conf
+ HIVE_CONF_DIR=/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hive-conf
+ chmod -R a+r /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hive-conf
+ export HADOOP_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop
+ HADOOP_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop
+ export HIVE_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hive
+ HIVE_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hive
+ export HUE_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue
+ HUE_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue
+ export HBASE_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hbase
+ HBASE_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hbase
+ export PIG_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/pig
+ PIG_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/pig
+ export PIG_SCRIPT_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/pig/../..
+ PIG_SCRIPT_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/pig/../..
+ echo HUE_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue
+ echo HUE_CONF_DIR=/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER
+ echo HADOOP_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop
+ echo HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf
+ echo HIVE_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hive
+ echo HIVE_DEFAULT_XML=/etc/hive/conf.dist/hive-default.xml
+ echo HIVE_CONF_DIR=/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hive-conf
+ echo HBASE_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hbase
+ echo PIG_HOME=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/pig
+ HBASE_CONF_DIR=/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hbase-conf
+ [[ -d /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hbase-conf ]]
+ SQOOP2_CONF_DIR=/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/sqoop2-conf
+ [[ -d /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/sqoop2-conf ]]
+ echo SQOOP2_CONF_DIR=/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/sqoop2-conf
+ export PYTHON_EGG_CACHE=/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/.python-eggs
+ PYTHON_EGG_CACHE=/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/.python-eggs
+ perl -pi -e 's#\{\{JAVA_HOME}}#/usr/java/jdk1.8.0_131#g' /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue.ini /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue_safety_valve.ini /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue_safety_valve_server.ini
+ perl -pi -e 's#\{\{HBASE_HOME}}#/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hbase#g' /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue.ini /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue_safety_valve.ini /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue_safety_valve_server.ini
+ perl -pi -e 's#\{\{PIG_SCRIPT_HOME}}#/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/pig/../..#g' /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue.ini /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue_safety_valve.ini /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue_safety_valve_server.ini
+ perl -pi -e 's#\{\{HADOOP_CONF_DIR}}#/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf#g' /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue.ini /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue_safety_valve.ini /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue_safety_valve_server.ini
+ perl -pi -e 's#\{\{HUE_CONF_DIR}}#/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER#g' /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue.ini /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue_safety_valve.ini /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue_safety_valve_server.ini
+ [[ -d /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hbase-conf ]]
+ [[ -d /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/sqoop2-conf ]]
+ perl -pi -e 's#\{\{SQOOP2_CONF_DIR}}#/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/sqoop2-conf#g' /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue.ini /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue_safety_valve.ini /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue_safety_valve_server.ini
+ perl -pi -e 's#\{\{SQOOP2_CONF_DIR}}#/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/sqoop2-conf#g' /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/sqoop2-conf/sqoop.properties
+ '[' 6 -ge 4 ']'
+ perl -pi -e 's#\{\{HADOOP_HDFS_HOME}}#/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop-hdfs#g' /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue.ini /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue_safety_valve.ini /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue_safety_valve_server.ini
+ perl -pi -e 's#\{\{HADOOP_MR1_HOME}}#/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop-0.20-mapreduce#g' /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue.ini /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue_safety_valve.ini /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue_safety_valve_server.ini
+ perl -pi -e 's#\{\{HADOOP_MR2_HOME}}#/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop-mapreduce#g' /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue.ini /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue_safety_valve.ini /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue_safety_valve_server.ini
+ perl -pi -e 's#\{\{HADOOP_BIN}}#/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop/bin/hadoop#g' /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue.ini /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue_safety_valve.ini /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue_safety_valve_server.ini
+ SQOOP2_SCRIPT_HOME=/usr/lib/sqoop2/../..
+ perl -pi -e 's#\{\{SQOOP2_SCRIPT_HOME}}#/usr/lib/sqoop2/../..#g' /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue.ini /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue_safety_valve.ini /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/hue_safety_valve_server.ini
+ perl -pi -e 's#\{\{CDH_MR1_HOME}}#/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop-0.20-mapreduce#g' /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/core-site.xml /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/hadoop-env.sh /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/hdfs-site.xml /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/log4j.properties /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/mapred-site.xml /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/ssl-client.xml /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/topology.map /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/topology.py /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/yarn-site.xml
+ perl -pi -e 's#\{\{CDH_MR2_HOME}}#/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop-mapreduce#g' /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/core-site.xml /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/hadoop-env.sh /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/hdfs-site.xml /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/log4j.properties /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/mapred-site.xml /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/ssl-client.xml /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/topology.map /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/topology.py /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/yarn-site.xml
+ perl -pi -e 's#\{\{CDH_HADOOP_HOME}}#/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hadoop#g' /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/core-site.xml /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/hadoop-env.sh /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/hdfs-site.xml /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/log4j.properties /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/mapred-site.xml /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/ssl-client.xml /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/topology.map /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/topology.py /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/yarn-conf/yarn-site.xml
+ replace_conf_dir
+ echo CONF_DIR=/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER
+ echo CMF_CONF_DIR=
+ EXCLUDE_CMF_FILES=('cloudera-config.sh' 'hue.sh' 'impala.sh' 'sqoop.sh' 'supervisor.conf' 'config.zip' 'proc.json' '*.log' '*.keytab' '*jceks')
++ printf '! -name %s ' cloudera-config.sh hue.sh impala.sh sqoop.sh supervisor.conf config.zip proc.json '*.log' hue.keytab creds.localjceks
+ find /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER -type f '!' -path '/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER/logs/*' '!' -name cloudera-config.sh '!' -name hue.sh '!' -name impala.sh '!' -name sqoop.sh '!' -name supervisor.conf '!' -name config.zip '!' -name proc.json '!' -name '*.log' '!' -name hue.keytab '!' -name creds.localjceks -exec perl -pi -e 's#\{\{CMF_CONF_DIR}}#/var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER#g' '{}' ';'
+ make_scripts_executable
+ find /var/run/cloudera-scm-agent/process/79-hue-HUE_SERVER -regex '.*\.\(py\|sh\)$' -exec chmod u+x '{}' ';'
+ '[' runcpserver == beeswax_server ']'
+ set_classpath_in_var HADOOP_EXTRA_CLASSPATH_STRING
+ '[' -z HADOOP_EXTRA_CLASSPATH_STRING ']'
+ [[ -n /opt/cloudera/cm ]]
++ find /opt/cloudera/cm/lib/plugins -maxdepth 1 -name '*.jar'
++ tr '\n' :
+ ADD_TO_CP=/opt/cloudera/cm/lib/plugins/event-publish-6.2.0-shaded.jar:/opt/cloudera/cm/lib/plugins/tt-instrumentation-6.2.0.jar:
+ [[ -n '' ]]
+ eval 'OLD_VALUE=$HADOOP_EXTRA_CLASSPATH_STRING'
++ OLD_VALUE=
+ NEW_VALUE=/opt/cloudera/cm/lib/plugins/event-publish-6.2.0-shaded.jar:/opt/cloudera/cm/lib/plugins/tt-instrumentation-6.2.0.jar:
+ export HADOOP_EXTRA_CLASSPATH_STRING=/opt/cloudera/cm/lib/plugins/event-publish-6.2.0-shaded.jar:/opt/cloudera/cm/lib/plugins/tt-instrumentation-6.2.0.jar
+ HADOOP_EXTRA_CLASSPATH_STRING=/opt/cloudera/cm/lib/plugins/event-publish-6.2.0-shaded.jar:/opt/cloudera/cm/lib/plugins/tt-instrumentation-6.2.0.jar
+ HUE=/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/bin/hue
+ [[ runcpserver == runcpserver ]]
+ '[' 6 -lt 6 ']'
+ '[' '!' -z '' ']'
+ run_syncdb_and_migrate_subcommands
+ '[' 6 -ge 6 ']'
+ /opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/bin/hue makemigrations --noinput
Traceback (most recent call last):
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/bin/hue", line 14, in <module>
    load_entry_point('desktop', 'console_scripts', 'hue')()
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/desktop/core/src/desktop/manage_entry.py", line 216, in entry
    execute_from_command_line(sys.argv)
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/core/management/__init__.py", line 363, in execute_from_command_line
    utility.execute()
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/core/management/__init__.py", line 355, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/core/management/commands/makemigrations.py", line 110, in handle
    loader.check_consistent_history(connection)
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/db/migrations/loader.py", line 282, in check_consistent_history
    applied = recorder.applied_migrations()
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/db/migrations/recorder.py", line 65, in applied_migrations
    self.ensure_schema()
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/db/migrations/recorder.py", line 59, in ensure_schema
    raise MigrationSchemaMissing("Unable to create the django_migrations table (%s)" % exc)
django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table (ORA-01031: insufficient privileges
)
+ /opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/bin/hue migrate --fake-initial
Traceback (most recent call last):
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/bin/hue", line 14, in <module>
    load_entry_point('desktop', 'console_scripts', 'hue')()
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/desktop/core/src/desktop/manage_entry.py", line 216, in entry
    execute_from_command_line(sys.argv)
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/core/management/__init__.py", line 363, in execute_from_command_line
    utility.execute()
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/core/management/__init__.py", line 355, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/core/management/base.py", line 283, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/core/management/base.py", line 330, in execute
    output = self.handle(*args, **options)
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/core/management/commands/migrate.py", line 204, in handle
    fake_initial=fake_initial,
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/db/migrations/executor.py", line 115, in migrate
    state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/db/migrations/executor.py", line 145, in _migrate_all_forwards
    state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/db/migrations/executor.py", line 244, in apply_migration
    state = migration.apply(state, schema_editor)
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/db/backends/base/schema.py", line 92, in __exit__
    self.execute(sql)
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/db/backends/base/schema.py", line 119, in execute
    cursor.execute(sql, params)
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/db/backends/utils.py", line 65, in execute
    return self.cursor.execute(sql, params)
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/db/utils.py", line 94, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/db/backends/utils.py", line 65, in execute
    return self.cursor.execute(sql, params)
  File "/opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11-py2.7.egg/django/db/backends/oracle/base.py", line 480, in execute
    return self.cursor.execute(query, self._param_generator(params))
django.db.utils.DatabaseError: ORA-01031: insufficient privileges

+ '[' dumpdata = runcpserver ']'
+ '[' syncdb = runcpserver ']'
+ '[' ldaptest = runcpserver ']'
+ exec /opt/cloudera/parcels/CDH-6.2.0-1.cdh6.2.0.p0.967373/lib/hue/build/env/bin/hue runcpserver

This is weird because while there is an error in the stderr, service is reported to be  started successfully and also while error here says, `Unable to create the django_migrations table (ORA-01031: insufficient privileges)`, this table is created successfully in the DB.

 

Does this help pinning down the problem, in any way?


@araujo wrote:

Did you check if the Hue table have been created successfully in the database? Are you able to manuall connect to that database from the Hue host and with the credentials configured in Hue through JDBC and read from tables?

 

Note that Oracle 19c hasn't been tested or certified to work with CDH6 yet: https://www.cloudera.com/documentation/enterprise/6/release-notes/topics/rg_database_requirements.ht...


 

avatar

Got it working myself.

 

Apparently because of some grant issues, hue wasn't able to create other objects in DB, hence although the service was starting, hue portal itself won't work.

 

What is strange although, is the fact that CM would report hue starting successfully. Not sure if this is the best behavior when CM is supposed to be monitoring and reporting correct health of each service it manages.

 

avatar
New Contributor

@SandeepSingh 

Hue user has Dba privilage however i got the same issue, anyone can support?

which privilage exactly you mean?