Skip to content
This repository has been archived by the owner on Jan 6, 2018. It is now read-only.

oozie 3.0.2 not creating mysql tables in db #833

Open
jabirahmed opened this issue Feb 8, 2012 · 1 comment
Open

oozie 3.0.2 not creating mysql tables in db #833

jabirahmed opened this issue Feb 8, 2012 · 1 comment

Comments

@jabirahmed
Copy link

i have installed mysql connector and built the new war

jabira@oozie2001:~$ jar -tvf oozie-3.0.2/oozie-server/webapps/oozie.war |grep mysq
789885 Wed Feb 08 12:04:48 UTC 2012 WEB-INF/lib/mysql-connector-java-5.1.18-bin.jar

also set the correct parameters in the oozie-site.xml

<property>
  <name>oozie.service.StoreService.jdbc.url</name>
  <description>
        JDBC URL.
    </description>
  <value>jdbc:mysql:localhost:3306/ooziedb;create=true</value>
</property>
<property>
  <name>oozie.service.StoreService.jdbc.username</name>
  <description>
        DB user name.
    </description>
  <value>oozieuser</value>
</property>
<property>
  <name>oozie.service.StoreService.jdbc.password</name>
  <description>
        DB user password.

        IMPORTANT: if password is emtpy leave a 1 space string, the service trims the value,
                   if empty Configuration assumes it is NULL.

        IMPORTANT: if the StoreServicePasswordService is active, it will reset this value with the value given in
                   the console.
    </description>
  <value>pass</value>
</property>
<property>
  <name>oozie.service.StoreService.pool.max.active.conn</name>
  <description>
         Max number of connections.
    </description>
  <value>10</value>
</property>

<property>
  <name>oozie.service.StoreService.jdbc.driver</name>
  <description>
        JDBC driver class.
    </description>
  <value>com.mysql.jdbc.Driver</value>
</property>

Oozie starts up fine too and i dont see any exceptions in logs other than

but when i check mysql i dont see any tables being created in the db

jabira@oozie2001:~$ mysql -uoozieuser --ppass ooziedb

mysql>
mysql> show tables;
Empty set (0.00 sec)

Not sure whats going wrong here

@jabirahmed
Copy link
Author

http://mail-archives.apache.org/mod_mbox/incubator-oozie-users/201111.mbox/%3CCAKFPOX9UfXABzehYpW4-vCuoNm7g+TUapfSMkp1vY1JZMCUOHg@mail.gmail.com%3E

This is the same issue I see in 3.0.2

Its using derby and not mysql

oozie.log:2012-02-09 00:37:40,867 INFO JPAService:536 - USER[-] GROUP[-] TOKEN[-] APP[-] JOB[-] ACTION[-] JPA configuration: DriverClassName=org.apache.derby.jdbc.EmbeddedDriver,Url=jdbc:derby:/home/jabira/setups/oozie-3.0.2/data/oozie-db;create=true,Username=sa,Password=,MaxActive=10

The issue was actually because of poor infact very poor documentation

The solutions was DB configuration properties
(StoreService) was for 2.x and , we should use Oozie 3.x ones (JPAService).
Valid in 3.x

oozie.service.JPAService.create.db.schema
oozie.service.JPAService.jdbc.driver
oozie.service.JPAService.jdbc.url
oozie.service.JPAService.jdbc.username
oozie.service.JPAService.jdbc.password
oozie.service.JPAService.pool.max.active.conn

Invalid in 3.x

jabira@jabir-vm:/setups/oozie-3.0.2$ cat conf/oozie-site.xml |grep StoreService
oozie.service.StoreService.create.db.schema
oozie.service.StoreService.jdbc.driver
oozie.service.StoreService.jdbc.url
oozie.service.StoreService.jdbc.username
oozie.service.StoreService.jdbc.password
IMPORTANT: if the StoreServicePasswordService is active, it will reset this value with the value given in
oozie.service.StoreService.pool.max.active.conn
jabira@jabir-vm:
/setups/oozie-3.0.2$

NEEDS TO BE DOCUMENTED

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant