Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Error CDH5 oozie

Error CDH5 oozie

Explorer

Hi.


I'm installing CDH5 express from cloudera manager and in the cluster setup I've got this message "Creating oozie database":

 

Failed to create Oozie database.

Program:oozie/oozie.sh ["db-command","create"]

 

Stderr:

Error: DB schema exists

Stack trace for the error was (for debug purposes):
--------------------------------------
java.lang.Exception: DB schema exists
	at org.apache.oozie.tools.OozieDBCLI.validateDBSchema(OozieDBCLI.java:877)
	at org.apache.oozie.tools.OozieDBCLI.createDB(OozieDBCLI.java:184)
	at org.apache.oozie.tools.OozieDBCLI.run(OozieDBCLI.java:127)
	at org.apache.oozie.tools.OozieDBCLI.main(OozieDBCLI.java:78)
--------------------------------------

 

Stdout:

Fri Apr 11 08:29:49 CEST 2014
JAVA_HOME=/usr/java/jdk1.7.0_45-cloudera
using 5 as CDH_VERSION
using /var/lib/oozie/tomcat-deployment as CATALINA_BASE

Validate DB Connection
DONE
Check DB schema does not exist

 

Thanks!!!

 

Miguel Angel.

 

8 REPLIES 8

Re: Error CDH5 oozie

New Contributor

Hi Miguel,

 

I hit the same problem just now, while upgrading from 4.6 to 5.0.  I got around this by deleting the contents of /var/lib/oozie/:

 

rm -rf /var/lib/oozie/*

 

Obviously, this is a pretty drastic step, but it got me through.

 

Cheers,

 

Mark Cusack

Re: Error CDH5 oozie

New Contributor
THanks, after I delete /var/lib/oozie/*,It works.

Re: Error CDH5 oozie

Explorer

yep; same exact issue; having a force reinstall flag would be a nice thing.

 

Had to rm -rf name node directory also.

 

I swear the devlopers are trolling us when we hit items like this. 

Re: Error CDH5 oozie

Explorer

Cloudera does not clean-up properely on re-installs;

 

Also noticed if you change hostnames; its is almost unrecoverable; this should be extra fun for manufacturing to customer deployments.

 

Some other pain points; note your paths may be different:

 

rm /mnt/ssd/dfs/nn/current/ -rf

rm /mnt/ssd/dfs/snn/current/ -rf
ansible compute -a "rm -rf /mnt/ssd/dfs/dn/current/"
rm -rf /var/lib/oozie/*

 

Anisble Playbook for uninstalling cloduer manager:

--
- name: unInstall cloudera
shell: service cloudera-scm-agent stop
ignore_errors: true
shell: service cloudera-scm-server stop
ignore_errors: true
- action: yum pkg={{item}} state=absent
with_items:
- cloudera-manager-agent
- cloudera-manager-daemons
- avro-tools
- crunch
- flume-ng
- hadoop-hdfs-fuse
- hadoop-hdfs-nfs3
- hadoop-httpfs
- hbase-solr
- hive-hbase
- hive-webhcat
- hue-beeswax
- hue-hbase
- hue-impala
- hue-pig
- hue-plugins
- hue-rdbms
- hue-search
- hue-spark
- hue-sqoop
- hue-zookeeper
- impala
- impala-shell
- kite
- llama
- mahout
- oozie
- pig
- pig-udf-datafu
- search
- sentry
- solr-mapreduce
- spark-python
- sqoop
- sqoop2
- whirr
- cloudera-manager-server
- cloudera-manager-server-db-2

- shell: yum clean all
- shell: rm -Rf /usr/share/cmf /var/lib/cloudera* /var/cache/yum/cloudera*
#- shell: "for u in hdfs mapred cloudera-scm hbase hue zookeeper oozie hive impala flume; do sudo kill $(ps -u $u -o pid=); done"
- shell: rm /tmp/.scm_prepare_node.lock
ignore_errors: true

Highlighted

Re: Error CDH5 oozie

New Contributor
I had the same issue and I did run the rm -rf /var/lib/oozie/* same command still did not fix the problem, any other thoughts.

Re: Error CDH5 oozie

New Contributor

I had the same problem and I run "sudo rm -rf /var/lib/oozie/*". It did not work.

Re: Error CDH5 oozie

Explorer

I had the same problem.And I fix it after drop database oozie on postgresql.Good Luck.

Re: Error CDH5 oozie

New Contributor

I did the same thing and at first it failed because the database didn't exist.  I had to recreate the database and set the password, and then the cluster install worked.  Here are the exact instructions;

 

To do this, you will need the root password (found from a file in the system as shown below) and the oozie password.  Early on in the configuration, it asked you to write them down.  I took a screenshot.  In any event, make sure you have it so you can reset the password after.

 

> cat /var/lib/cloudera-scm-server-db/data/generated_password.txt
<your password>

The password above was generated by /usr/share/cmf/bin/initialize_embedded_db.sh (part of the cloudera-manager-server-db package)
and is the password for the user 'cloudera-scm' for the database in the current directory.

Generated at 20171106-141157.

> psql -U cloudera-scm -p 7432 -h localhost -d postgres
Password for user cloudera-scm: <enter password from above>

psql (9.5.9)
Type "help" for help.

postgres=# \l
                                                List of databases
        Name        |       Owner        | Encoding |  Collate   |   Ctype    |         Access privileges         
--------------------+--------------------+----------+------------+------------+-----------------------------------
 amon               | amon               | UTF8     | en_US.UTF8 | en_US.UTF8 | 
 hive               | hive               | UTF8     | en_US.UTF8 | en_US.UTF8 | 
 nav                | nav                | UTF8     | en_US.UTF8 | en_US.UTF8 | 
 navms              | navms              | UTF8     | en_US.UTF8 | en_US.UTF8 | 
 oozie_oozie_server | oozie_oozie_server | UTF8     | en_US.UTF8 | en_US.UTF8 | 
 postgres           | cloudera-scm       | UTF8     | en_US.UTF8 | en_US.UTF8 | 
 rman               | rman               | UTF8     | en_US.UTF8 | en_US.UTF8 | 
 scm                | scm                | UTF8     | en_US.UTF8 | en_US.UTF8 | 
 template0          | cloudera-scm       | UTF8     | en_US.UTF8 | en_US.UTF8 | =c/"cloudera-scm"                +
                    |                    |          |            |            | "cloudera-scm"=CTc/"cloudera-scm"
 template1          | cloudera-scm       | UTF8     | en_US.UTF8 | en_US.UTF8 | =c/"cloudera-scm"                +
                    |                    |          |            |            | "cloudera-scm"=CTc/"cloudera-scm"
(10 rows)
postgres=# DROP DATABASE oozie_oozie_server;
DROP DATABASE
postgres=# CREATE DATABASE oozie_oozie_server;
CREATE DATABASE
postgres=# ALTER DATABASE oozie_oozie_server OWNER TO oozie_oozie_server;
postgres=# \password oozie_oozie_server
Enter new password: <Enter oozie database password>
Enter it again: <Enter again>
postgres=# \q

 

Then click "back" in the "Cluster Setup" page, and then click "Continue".  It will restart all the steps, but the first ones should complete quickly.  When it got to oozie this time, instead of failing right away, it completed the process.

 

Yay!

 

Hope this works for anyone else.

 

NOTE: I am not familiar with postgres .  It is possible that dropping only the schema will work without the extra steps of recreating the database and knowing the password.  What I did worked so I never got a chance to play around with it.